function populate()
{
   if (!document.getElementById('iemarquee')) return;

    if (iedom)
    {
        cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
        cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
        //cross_marquee.innerHTML=marqueecontent
        actualheight=cross_marquee.offsetHeight
    }
    else if (document.layers)
    {
        ns_marquee=document.ns_marquee.document.ns_marquee2
        ns_marquee.top=parseInt(marqueeheight)+8
        //ns_marquee.document.write(marqueecontent)
        //ns_marquee.document.close()
        actualheight=ns_marquee.document.height
    }
    
    lefttime=setInterval("scrollmarquee()",100)
}
function scrollmarquee()
{
    if (iedom)
    {
        if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8))
        cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px"
        else
        cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
        }
    else if (document.layers)
    {
        if (ns_marquee.top>(actualheight*(-1)+8))
        ns_marquee.top-=copyspeed
        else
        ns_marquee.top=parseInt(marqueeheight)+8
    }
}
//Specify the marquee's width (in pixels)
var marqueewidth="248px"
//Specify the marquee's height
var marqueeheight="130px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=2
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1
//Specify the marquee's content
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
//var marqueecontent='<ul><li><a href="/Heb/About/PressItem.asp?ContentID=30">טוטאל מדיה בועידת האינטרנט של TheMarker</a></li><li><a href="/Heb/About/PressItem.asp?ContentID=26">כנס השיווק 2010: האינטרנט הסלולרי יעבור את השימוש באינטרנט הרגיל</a></li><li><a href="/Heb/About/PressItem.asp?ContentID=29">אתר שיווק: על כלי מדידה ואופטימזציה מתקדמים ועל פיילוט ראשון בישראל ל- DFA</a></li><li><a href="/Heb/About/PressItem.asp?ContentID=24">סיכום 2009: זינוק של14% בהוצאה לפרסום באינטרנט</a></li><li><a href="/Heb/About/PressItem.asp?ContentID=25">שבע תחזיות לשנת 2010, כולל גידול בבאנרים, זינוק של 40% בפירסום וידאו והגברת השימוש במערכות מדידה וטארגטינג מתקדמות. </a></li></ul>'
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
var actualheight=''
var cross_marquee, ns_marquee
window.onload=populate

function ValidateContactForm(){
        if (document.getElementById("FirstName").value == ""){
            alert("בבקשה הזן/ני את שמך הפרטי");
               document.getElementById("FirstName").focus();
               return false;
        }
        if (document.getElementById("LastName").value == ""){
            alert("בבקשה הזן/ני את שם המשפחה");
               document.getElementById("LastName").focus();
               return false;
        }
        if (!isEmail(document.getElementById("Email"))){
            alert("בבקשה הזן/ני כתובת דואר אלקטרוני תקינה");
            document.getElementById("Email").focus();
            return false;
        }
        if (document.getElementById("Phone").value == ""){
            alert("בבקשה הזן/ני מספר הטלפון");
               document.getElementById("Phone").focus();
               return false;
        }
        if (document.getElementById("Subject").value == ""){
            alert("בבקשה הזן/ני את נושא ההודעה");
               document.getElementById("Subject").focus();
               return false;
        }    
        if (document.getElementById("Message").value == ""){
            alert("בבקשה הזן/ני את הודעתך");
               document.getElementById("Message").focus();
               return false;
        }
        return true;
    }

function ValidateSideForm(){
        if (document.getElementById("FullName").value == ""){
            alert("בבקשה הזן/ני את שמך המלא");
               document.getElementById("FullName").focus();
               return false;
        }
        if (document.getElementById("Company").value == ""){
            alert("בבקשה הזן/ני את שם החברה");
               document.getElementById("Company").focus();
               return false;
        }
        if (document.getElementById("Phone").value == ""){
            alert("בבקשה הזן/ני מספר הטלפון");
               document.getElementById("Phone").focus();
               return false;
        }
        if (!isEmail(document.getElementById("Email")) && (document.getElementById("Email").value != "")){
            alert("בבקשה הזן/ני כתובת דואר אלקטרוני תקינה");
            document.getElementById("Email").focus();
            return false;
        }
        return true;
    }

function PageInitalization(){
    document.getElementById("TopMenuContact").id = "current";
    document.getElementById("FirstName").focus();
    document.getElementById("TopMenuAdExchange").id = "current";
    document.getElementById("SideMenuSignup").className = 'uberlink';
    document.getElementById("PrimaryWebsiteURL").focus();
}

	function ValidateSignupForm(){

		if (document.getElementById("PrimaryWebsiteURL").value == ""){
			alert("בבקשה הזן/ני כתובת האתר העיקרי");
	       	document.getElementById("PrimaryWebsiteURL").focus();
	       	return false;
		}
		if (!document.getElementById("ConfirmPrivacyPolicyOnSite").checked){
			alert("בכדי להשלים את תהליך הרישום עליך לאשר את כל תנאיו");
	       	document.getElementById("ConfirmPrivacyPolicyOnSite").focus();
	       	return false;
		}

		if (document.getElementById("Company").value == ""){
	        alert("בבקשה הזן/ני את שם החברה");
	       	document.getElementById("Company").focus();
	       	return false;
		}
		if (document.getElementById("PrivateName").value == ""){
			alert("בבקשה הזן/ני את שמך הפרטי");
	       	document.getElementById("PrivateName").focus();
	       	return false;
		}
		if (document.getElementById("FamilyName").value == ""){
			alert("בבקשה הזן/ני את שם משפחתך");
	       	document.getElementById("FamilyName").focus();
	       	return false;
		}
		if (!isEmail(document.getElementById("Email"))){
			alert("בבקשה הזן/ני כתובת דואר אלקטרוני תקינה");
        	document.getElementById("Email").focus();
        	return false;
		}
		if (!document.getElementById("ConfirmAuthorizedSignature").checked){
			alert("בכדי להשלים את תהליך הרישום עליך לאשר את כל תנאיו");
	       	document.getElementById("ConfirmAuthorizedSignature").focus();
	       	return false;
		}

	/*	if (!document.getElementById("Confirm3MonthManagement").checked){
			alert("בכדי להשלים את תהליך הרישום עליך לאשר את כל תנאיו");
	       	document.getElementById("Confirm3MonthManagement").focus();
	       	return false;
		}*/
		if (!document.getElementById("ConfirmGoogleTerms").checked){
			alert("בכדי להשלים את תהליך הרישום עליך לאשר את כל תנאיו");
	       	document.getElementById("ConfirmGoogleTerms").focus();
	       	return false;
		}
		if (!document.getElementById("ConfirmAdExchangeTerms").checked){
			alert("בכדי להשלים את תהליך הרישום עליך לאשר את כל תנאיו");
	       	document.getElementById("ConfirmAdExchangeTerms").focus();
	       	return false;
		}

		return true;
	}

function isEmail(Email){
	return Email.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\.biz)|(\..{2,2}))$)\b/gi);
}

