window.defaultStatus="Find the work-at-home opportunities right for You!";

if (document.all) {
document.onmouseover = showLink;
}


function showLink() {

if (window.event.srcElement.tagName == "A") {
	if (window.event.srcElement.innerText != "") {
	window.status = window.event.srcElement.innerText; return true;
			}
	}

	if (window.event.srcElement.tagName == "IMG" && window.event.srcElement.parentElement.tagName =="A" ) {
		window.status = window.event.srcElement.alt; return true;
	}

}

function addfav () {
	var bookmarkurl="http://www.surveysponsors.com";
	var bookmarktitle="SurveySponsors.com - free paid surveys, work-at-home jobs";
	if (document.all) {
		window.external.AddFavorite(bookmarkurl,bookmarktitle);
	}

}

function checkRegisterForm(formobj) {
	var unselect = false;	
	var errs = false;
	var alertMsg = "Please, make a valid selection!:\n";

	document.sform.fname.value = document.sform.fname.value.replace(/^\s*|\s*$/g,"");
	document.sform.lname.value = document.sform.lname.value.replace(/^\s*|\s*$/g,"");
	document.sform.email.value = document.sform.email.value.replace(/^\s*|\s*$/g,"");
	document.sform.zip.value = document.sform.zip.value.replace(/^\s*|\s*$/g,"");

	if (document.sform.fname.value == "" || document.sform.fname.value == null){
		alert ("Please, enter your first name.");
		errs = true;
		document.sform.fname.focus();
		return false;
	}
				
				
	if (document.sform.lname.value == "" || document.sform.fname.value == null){
		alert ("Please, enter your last name.");
		errs = true;
		unselect = true;
		document.sform.lname.focus();
		return false;
	}	

	if (document.sform.email.value == "" || document.sform.email.value == null){
		alert ("Please, enter your email address.");
		errs = true;
		unselect = true;
		document.sform.email.focus();
		return false;
	}


	if (formobj.gender.options[formobj.gender.selectedIndex].value == 0) {
		alert("Please, specify your gender.")
		errs = true;
		formobj.gender.focus();
		return false;
	}

	if (formobj.age.options[formobj.age.selectedIndex].value == 0) {
		alert("Please, specify your age.");
		errs = true;
		formobj.age.focus();
		return false;
	}

	if (formobj.country.options[formobj.country.selectedIndex].value == "0") {
		alert("Please, select country.");
		errs = true;
		formobj.country.focus();
		return false;
	}


	if (formobj.zip.value == ""  || formobj.zip.value == null) {
		alert("Please, enter zip code.");
		errs = true;
		formobj.zip.focus();
		return false;
	}

				
	if (echeck(document.sform.email.value)==false) {
		alert("Invalid email address!");
		errs = true;
		unselect = true;
		document.sform.email.focus();
		return false;
	}

	if (count_preferences==false) {
		errs = true;
		return false;
	}
	
	if (errs == true) {
		return false;
	}  else {
		return true;
	}
}

function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){

		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){

		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){

		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){

		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){

		    return false
		 }

		 if (str.indexOf(" ")!=-1){

		    return false
		 }

 		 return true
	}


function ga_to(pageName, id) {
	trackClick("/out/list/" + pageName + "/" + id);
}

function ga_ta(pageName, id) {
	trackClick("/out/ad/" + pageName + "/" + id);
}	

function trackClick(clickData) {
	if (typeof(pageTracker) != "undefined") {
		pageTracker._trackPageview(clickData);
	}	
}