


function openPopup() {
   var url="/products/familyversions/buyingguide/tablepopup.html";
   var height = 500;            
   var width = 600;             
   var att='width=' + width + ',height=' + height;
   WorkingMessagePopup=window.open(url,"wmp",att);
}

function openFlash(url) {
   var height = 400;            
   var width = 400;             
   var att='width=' + width + ',height=' + height;
   WorkingMessagePopup=window.open(url,"wmp",att);
}

function openAlert(urlcase) {
   var url="/about/guides1.html?urlcase=" + urlcase;
   var height = 331;            
   var width = 591;             
   var att='width=' + width + ',height=' + height;
   WorkingMessagePopup=window.open(url,"wmp",att);
}

function demos(product,host) {
   var url="";
   var height = 512;            
   var width = 759; 
   var windowName ="wmp";
   if(host=="external") {
   		url = "http://www.llsupdates.com/"+product+"/";	
	} else if(host=="flash") {
		url = "/demos/tour/tourUS.html";
		height = 503;
		width = 819;
		windowName="mywindow";
		
	} else {
		url = "/demos/"+product+"/";
	}           
   var att='width=' + width + ',height=' + height + ',menubar=no,resizable=no,toolbar=no,scrollbars=yes';
   WorkingMessagePopup=window.open(url,windowName,att);
} 
function changeLocation(dropdown)
{
	
    var myindex  = dropdown.selectedIndex
    var SelValue = dropdown.options[myindex].value
    top.location.href = SelValue;
	if(SelValue =="") {
		alert("Please choose an option");
		return false;
	} else {
    	return true;
	}
}

function productTour()
{
	 window.open('/demos/tour/tourUS.html','mywindow','width=819,height=503,menubar=no,resizable=no,toolbar=no, scrollbars=yes');
}



function show(thistag) {
		  	obj = document.getElementById(thistag);
		  	obj.style.display = 'inline';	
}
function hide(thistag) {
	  		obj = document.getElementById(thistag);
			obj.style.display = 'none';
			text = document.getElementById('school');
			text.value = '';
			text = document.getElementById('title');
			text.value = '';
}
function popUp(URL){
day = new Date();
id = day.getTime();
w=320;
h=310;
if (URL.substring(URL.length-3, URL.length) == "mov"){
	w=255;
	h=209;
}
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+w+",height="+h+",left = 0,top = 0');");
}


function toggle(id) {
if(document.getElementById(id).className == "displaynone") {
	document.getElementById(id).className = "displayblock";
	document.getElementById("i" + id).src = "/images/icons/minus.gif";
	document.getElementById("i" + id).title = "Collapse";
	document.getElementById("i" + id).alt = "Collapse";
} else {
	document.getElementById(id).className = "displaynone";
	document.getElementById("i" + id).src = "/images/icons/plus.gif";
	document.getElementById("i" + id).title = "Expand";
	document.getElementById("i" + id).alt = "Expand";
}
}		



function checkemail(obj) {
var obj = eval(obj);
if (obj.email != null) {
	var tmpaddress = obj.email.value;
}
if (obj.custEmail != null) {
	var tmpaddress = obj.custEmail.value;
}
if (obj.email_address_r != null) {
	var tmpaddress = obj.email_address_r.value;
}
var tvar;
	if ((tmpaddress.indexOf('@') < 0) || ((tmpaddress.charAt(tmpaddress.length-4) != '.') && (tmpaddress.charAt(tmpaddress.length-3) != '.'))) {
		tvar = "\n     -  Correct E-mail Address";
	} else {
        tvar = "";
	}
	return tvar;
}

function chkChecks(obj){
var isChecked=false;
var cvar;
 for(var i=0;i<obj["session[]"].length;i++){
  if(obj["session[]"][i].checked){
  isChecked=true;
  }
 }
 if(!isChecked){
  cvar = "\n     -  Please select a 30-minute webinar";
 } else {
        cvar = "";
 }
 return cvar;
}

function checkCheckBoxChecked(obj) {
	var obj = eval(obj);
	if(obj.sign_up_for_live_webinar.checked) {
		for(var i=0;i<obj["session[]"].length;i++){
  			obj["session[]"][i].disabled = false;
		}
	} else {
		for(var i=0;i<obj["session[]"].length;i++){
  			obj["session[]"][i].disabled = true;
			obj["session[]"][i].checked = false;
		}
	}
}

function chkSummerChecks(obj){
var isChecked1=false;
var isChecked2=false;
var isChecked3=false;
var isChecked4=false;
var cvar;
  if(obj["sign_up_for_live_webinar"].checked){
  isChecked1=true;
 }
 if(obj["view_async_webinar"].checked){
  isChecked2=true;
 }
 if(obj["view_product_tour"].checked){
  isChecked3=true;
 }
 if(obj["would_like_to_hear_from_rep"].checked){
  isChecked4=true;
 }
 if(!isChecked1 && !isChecked2 && !isChecked3 && !isChecked4){
  cvar = "\n     -  Please select at least 1 Avoiding Summer Learning Loss option.";
 } else {
        cvar = "";
 }
 return cvar;
}

function chkSimpleChecks(obj){
var isChecked1=false;
var isChecked2=false;
var cvar;
  if(obj["sign_up_for_live_webinar"].checked){
  isChecked1=true;
 }
 if(obj["view_product_tour"].checked){
  isChecked2=true;
 }
 if(!isChecked1 && !isChecked2){
  cvar = "\n     -  Please select at least 1 Wichita Overview option.";
 } else {
        cvar = "";
 }
 return cvar;
}




// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()-. ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}
function checkphone(obj) {
var obj = eval(obj);
var tmpphone = obj.phone.value;
var error = "";
	if (checkInternationalPhone(tmpphone)==false){
		error = "\n     -  Please Enter a Valid Phone Number";
	}
return error;
}

function WithoutContent(ss) {
if(ss.length > 0) { return false; }
return true;
}

function NoneWithContent(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].value.length > 0) { return false; }
	}
return true;
}

function NoneWithCheck(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].checked) { return false; }
	}
return true;
}

function WithoutCheck(ss) {
if(ss.checked) { return false; }
return true;
}

function WithoutSelectionValue(ss) {
for(var i = 0; i < ss.length; i++) {
	if(ss[i].selected) {
		if(ss[i].value.length) { 
			return false; 
		}
	}
}
return true;
}

function checkRequiredFields(obj) {
var obj = eval(obj);
var missinginfo = "";
	if (obj.yourname != null) {
		if(WithoutContent(obj.yourname.value)) { 
			missinginfo += "\n     -  Your Name";
		} 
	}
	if (obj.email != null) {
		if(WithoutContent(obj.email.value)) { 
			missinginfo += "\n     -  E-mail Address";
		}
		if(!WithoutContent(obj.email.value)) { 
			missinginfo += checkemail(obj);
		} 
	}
if (obj.friendsemail != null) {
		if(WithoutContent(obj.friendsemail.value)) { 
			missinginfo += "\n     -Friend's E-mail Address";
		}
		if(!WithoutContent(obj.friendsemail.value)) { 
			missinginfo += checkemail(obj);
		} 
	}
	
	if (obj.phone != null) {
		if(WithoutContent(obj.phone.value)) { 
			missinginfo += "\n     -  Phone";
		}
		if(!WithoutContent(obj.phone.value)) { 
			missinginfo += checkphone(obj);
		}
	}
	if (obj.schoolname != null) {
		if(WithoutContent(obj.schoolname.value)) {
			missinginfo += "\n     -  School Name";
		} 
	} 
	if (obj.address != null) {
		if(WithoutContent(obj.address.value)) {
			missinginfo += "\n     -  School Address";
		} 
	}
	if (obj.city != null) {
		if(WithoutContent(obj.city.value)) {
			missinginfo += "\n     -  City";
		} 
	}
	if (obj.state != null) {
		if(WithoutContent(obj.state.value)) {
			missinginfo += "\n     -  State";
		} 
	}
	if (obj.zip != null) {
		if(WithoutContent(obj.zip.value)) {
			missinginfo += "\n     -  Zip";
		} 
	}
	if (obj.custName != null) {
		if(WithoutContent(obj.custName.value)) { 
			missinginfo += "\n     -  Name";
		} 
	}
	if (obj.custEmail != null) {
		if(WithoutContent(obj.custEmail.value)) { 
			missinginfo += "\n     -  E-mail Address";
		}
		if(!WithoutContent(obj.custEmail.value)) { 
			missinginfo += checkemail(obj);
		} 
	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			alert(missinginfo);
		return false;
		}
	return true;
	} // end of function CheckRequiredFields()
	
function checkOfferForm(obj) {
var obj = eval(obj);
var missinginfo = "";
	if (obj.nameFirst != null) {
		if(WithoutContent(obj.nameFirst.value)) { 
			missinginfo += "\n     -  First Name";
		} 
	}
	if (obj.nameLast != null) {
		if(WithoutContent(obj.nameLast.value)) { 
			missinginfo += "\n     -  Last Name";
		} 
	}
	if (obj.Position != null) {
		if(WithoutContent(obj.Position.value)) { 
			missinginfo += "\n     -  Position";
		}
	}
	if (obj.schoolName != null) {
		if(WithoutContent(obj.schoolName.value)) { 
			missinginfo += "\n     -  School Name";
		}
	}
	if (obj.schoolname != null) {
		if(WithoutContent(obj.schoolname.value)) {
			missinginfo += "\n     -  School Name";
		} 
	} 
	if (obj.StreetAddress != null) {
		if(WithoutContent(obj.StreetAddress.value)) {
			missinginfo += "\n     -  School Address";
		} 
	}
	if (obj.city != null) {
		if(WithoutContent(obj.city.value)) {
			missinginfo += "\n     -  City";
		} 
	}
	if (obj.state != null) {
		if(WithoutContent(obj.state.value)) {
			missinginfo += "\n     -  State";
		} 
	}
	if (obj.zip != null) {
		if(WithoutContent(obj.zip.value)) {
			missinginfo += "\n     -  Zip";
		} 
	}
	if (obj.phone != null) {
		if(WithoutContent(obj.phone.value)) { 
			missinginfo += "\n     -  Phone";
		} 
	}
	if (obj.email != null) {
		if(WithoutContent(obj.email.value)) { 
			missinginfo += "\n     -  E-mail Address";
		}
	}
	if (obj.friendsemail != null) {
		if(WithoutContent(obj.friendsemail.value)) { 
			missinginfo += "\n     - Friend's E-mail Address";
		}
	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			alert(missinginfo);
	} else {
		obj.submit();
	}
} // end of function CheckOfferForm()

function checkUsergroupForm(obj) {
var obj = eval(obj);
var missinginfo = "";
	if (obj.name_r != null) {
		if(WithoutContent(obj.name_r.value)) { 
			missinginfo += "\n     -  Name";
		} 
	}
	if (obj.school != null) {
		if(WithoutContent(obj.school.value)) { 
			missinginfo += "\n     -  School Name";
		}
	}
	if (obj.school_address != null) {
		if(WithoutContent(obj.school_address.value)) {
			missinginfo += "\n     -  School Address";
		} 
	} 
	if (obj.school_city != null) {
		if(WithoutContent(obj.school_city.value)) {
			missinginfo += "\n     -  City";
		} 
	}
	if (obj.school_state != null) {
		if(WithoutContent(obj.school_state.value)) {
			missinginfo += "\n     -  State";
		} 
	}
	if (obj.school_zip != null) {
		if(WithoutContent(obj.school_zip.value)) {
			missinginfo += "\n     -  Zip";
		} 
	}
	if (obj.phone_r != null) {
		if(WithoutContent(obj.phone_r.value)) { 
			missinginfo += "\n     -  Phone";
		} 
	}
	if (obj.email_address_r != null) {
		if(WithoutContent(obj.email_address_r.value)) { 
			missinginfo += "\n     -  E-mail Address";
		}
	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			alert(missinginfo);
	} else {
		obj.submit();
	}
} // end of function CheckUsergroupForm()

function checkMDRForm(obj) {
var obj = eval(obj);
var missinginfo = "";
//alert(obj);
	if (obj.formType != null && obj.formType.value =="webinar") {
 		if(chkChecks(obj)) { 
     		missinginfo += "\n     -  Please choose at least one 30-minute webinar";
    	}
   	}
	if (obj.firstName != null) {
		if(WithoutContent(obj.firstName.value)) { 
			missinginfo += "\n     -  First Name";
		} 
	}
	if (obj.lastName != null) {
		if(WithoutContent(obj.lastName.value)) { 
			missinginfo += "\n     -  Last Name";
		} 
	}
	if (obj.title != null) {
		if(WithoutContent(obj.title.value)) { 
			missinginfo += "\n     -  Title";
		} 
	}
	if (obj.email_address_r != null) {
		  if(checkemail(obj)) { 
			  missinginfo += "\n     -  E-mail Address";
		  }
	  }
	  if (obj.phone != null) {
		  if(checkphone(obj)) { 
			  missinginfo += "\n     -  Phone Number";
		  }
	  }
	//if(document.getElementById("main_user_admin").checked==true) {
	if(obj.main_user_admin != null && obj.main_user_admin.checked==true) {
		if (obj.countrySelect != null) {
		   if(WithoutSelectionValue(obj.countrySelect)){ 
			missinginfo += "\n     -  Country";
		   } 
		  }
		  if (obj.stateSelect != null) {
			if(WithoutSelectionValue(obj.stateSelect)) { 
			 missinginfo += "\n     -  State";
			} 
		  }
		  if (obj.citySelect != null) {
			if(WithoutSelectionValue(obj.citySelect)) { 
			 missinginfo += "\n     -  City";
			} 
		  }
		  if (obj.schoolSelect != null) {
					if(WithoutSelectionValue(obj.schoolSelect)) { 
					  missinginfo += "\n     -  School";
					} 
				}

	  if(obj.mdr_info_is_correct.value=="yes") {
		  if (obj.school != null) {
			  if(WithoutContent(obj.school.value)) { 
				  missinginfo += "\n     -  School Name";
			  }
		  }
		  if (obj.school_address != null) {
			  if(WithoutContent(obj.school_address.value)) {
				  missinginfo += "\n     -  School Address";
			  } 
		  } 
		  if (obj.school_city != null) {
			  if(WithoutContent(obj.school_city.value)) {
				  missinginfo += "\n     -  School City";
			  } 
		  }
		  if (obj.school_state != null) {
			  if(WithoutContent(obj.school_state.value)) {
				  missinginfo += "\n     -  School State";
			  } 
		  }
		  if (obj.school_zip != null) {
			  if(WithoutContent(obj.school_zip.value)) {
				  missinginfo += "\n     -  School Zip";
			  } 
		  }
		  if (obj.phone_r != null) {
			  if(WithoutContent(obj.phone_r.value)) { 
				  missinginfo += "\n     -  School Phone";
			  } 
		  }
	  }
	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			//return false;
			alert(missinginfo);
			//obj.action =="";
	} else {
		obj.submit();
		//alert("form ok");
	}
} // end of checkMDRForm()

function checkMDRSummerForm(obj) {
var obj = eval(obj);
var missinginfo = "";
//alert(obj);
	if (obj.firstName != null) {
		if(WithoutContent(obj.firstName.value)) { 
			missinginfo += "\n     -  First Name";
		} 
	}
	if (obj.title != null) {
		if(WithoutContent(obj.title.value)) { 
			missinginfo += "\n     -  Title";
		} 
	}
	if (obj.lastName != null) {
		if(WithoutContent(obj.lastName.value)) { 
			missinginfo += "\n     -  Last Name";
		} 
	}
	if (obj.email_address_r != null) {
		  if(checkemail(obj)) { 
			  missinginfo += "\n     -  E-mail Address";
		  }
	  }
	  if(chkSummerChecks(obj)) { 
     	missinginfo += "\n     -  Please choose at least one Avoiding Summer Learning Loss option";
    }
	if(obj.sign_up_for_live_webinar != null && obj.sign_up_for_live_webinar.checked==true) {
		if(chkChecks(obj)) { 
     		missinginfo += "\n     -  Please choose at least one 30-minute webinar";
    	}
	}
	//if(document.getElementById("main_user_admin").checked==true) {
	if(obj.main_user_admin != null && obj.main_user_admin.checked==true) {
	  if (obj.countrySelect != null) {
		  if(WithoutContent(obj.countrySelect.value)) { 
			  missinginfo += "\n     -  Country";
		  } 
	  }
	  if (obj.citySelect != null) {
		  if(WithoutContent(obj.citySelect.value)) { 
			  missinginfo += "\n     -  City";
		  } 
	  }
	  if (obj.stateSelect != null) {
		  if(WithoutContent(obj.stateSelect.value)) { 
			  missinginfo += "\n     -  State";
		  } 
	  }
	  if (obj.school != null) {
		  if(WithoutContent(obj.school.value)) { 
			  missinginfo += "\n     -  School Name";
		  }
	  }
	  if (obj.school_address != null) {
		  if(WithoutContent(obj.school_address.value)) {
			  missinginfo += "\n     -  School Address";
		  } 
	  } 
	  if (obj.school_city != null) {
		  if(WithoutContent(obj.school_city.value)) {
			  missinginfo += "\n     -  School City";
		  } 
	  }
	  if (obj.school_state != null) {
		  if(WithoutContent(obj.school_state.value)) {
			  missinginfo += "\n     -  School State";
		  } 
	  }
	  if (obj.school_zip != null) {
		  if(WithoutContent(obj.school_zip.value)) {
			  missinginfo += "\n     -  School Zip";
		  } 
	  }
	  if (obj.phone_r != null) {
		  if(WithoutContent(obj.phone_r.value)) { 
			  missinginfo += "\n     -  School Phone";
		  } 
	  }
	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			//return false;
			alert(missinginfo);
			//obj.action =="";
	} else {
		obj.submit();
		//alert("form ok");
	}
} // end of checkMDRForm()

function checkSimpleWebinar(obj) {
var obj = eval(obj);
var missinginfo = "";
//alert(obj);
	if (obj.firstName != null) {
		if(WithoutContent(obj.firstName.value)) { 
			missinginfo += "\n     -  First Name";
		} 
	}
	if (obj.lastName != null) {
		if(WithoutContent(obj.lastName.value)) { 
			missinginfo += "\n     -  Last Name";
		} 
	}
	if (obj.email_address_r != null) {
		  if(checkemail(obj)) { 
			  missinginfo += "\n     -  E-mail Address";
		  }
	  }
	  if(chkSimpleChecks(obj)) { 
     	missinginfo += "\n     -  Please choose at least one Lexia Reading Overview option";
    }
	if(obj.sign_up_for_live_webinar != null && obj.sign_up_for_live_webinar.checked==true) {
		if(chkChecks(obj)) { 
     		missinginfo += "\n     -  Please choose at least one 30-minute webinar";
    	}
	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			//return false;
			alert(missinginfo);
			//obj.action =="";
	} else {
		obj.submit();
		//alert("form ok");
	}
} // end of checkMDRForm()

function checkMDRFormDownload(obj) {
var obj = eval(obj);
var missinginfo = "";
//alert(obj);
	if (obj.firstName != null) {
		if(WithoutContent(obj.firstName.value)) { 
			missinginfo += "\n     -  First Name";
		} 
	}
	if (obj.lastName != null) {
		if(WithoutContent(obj.lastName.value)) { 
			missinginfo += "\n     -  Last Name";
		} 
	}
	if (obj.title != null) {
		if(WithoutContent(obj.title.value)) { 
			missinginfo += "\n     -  Title";
		} 
	}
	if (obj.email_address_r != null) {
		  if(checkemail(obj)) { 
			  missinginfo += "\n     -  E-mail Address";
		  }
	  }
	//if(document.getElementById("main_user_admin").checked==true) {
	if(obj.main_user_admin != null && obj.main_user_admin.checked==true) {
	  if (obj.countrySelect != null) {
		  if(WithoutContent(obj.countrySelect.value)) { 
			  missinginfo += "\n     -  Country";
		  } 
	  }
	  if (obj.stateSelect != null) {
		  if(WithoutContent(obj.stateSelect.value)) { 
			  missinginfo += "\n     -  State";
		  } 
	  }
	  if (obj.citySelect != null) {
		  if(WithoutContent(obj.citySelect.value)) { 
			  missinginfo += "\n     -  City";
		  } 
	  }
	  if (obj.school != null) {
		  if(WithoutContent(obj.school.value)) { 
			  missinginfo += "\n     -  School Name";
		  }
	  }
	  if (obj.school_address != null) {
		  if(WithoutContent(obj.school_address.value)) {
			  missinginfo += "\n     -  School Address";
		  } 
	  } 
	  if (obj.school_city != null) {
		  if(WithoutContent(obj.school_city.value)) {
			  missinginfo += "\n     -  School City";
		  } 
	  }
	  if (obj.school_state != null) {
		  if(WithoutContent(obj.school_state.value)) {
			  missinginfo += "\n     -  School State";
		  } 
	  }
	  if (obj.school_zip != null) {
		  if(WithoutContent(obj.school_zip.value)) {
			  missinginfo += "\n     -  School Zip";
		  } 
	  }
	  if (obj.phone_r != null) {
		  if(WithoutContent(obj.phone_r.value)) { 
			  missinginfo += "\n     -  School Phone";
		  } 
	  }
	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			//return false;
			alert(missinginfo);
			//obj.action =="";
	} else {
		obj.submit();
		if (obj.formTitle != null && obj.formTitle.value=="Inquiry Product Tour: Lexia Reading Product Tour") {
			productTour();
		}
		//alert("form ok");
	}
} // end of checkMDRForm()

function checkMDRStateSpecificForm(obj) {
var obj = eval(obj);
var missinginfo = "";
//alert(obj);
	if (obj.formType != null && obj.formType.value =="webinar") {
 		if(chkChecks(obj)) { 
     		missinginfo += "\n     -  Please choose at least one 30-minute webinar";
    	}
   	}
	if (obj.firstName != null) {
		if(WithoutContent(obj.firstName.value)) { 
			missinginfo += "\n     -  First Name";
		} 
	}
	if (obj.lastName != null) {
		if(WithoutContent(obj.lastName.value)) { 
			missinginfo += "\n     -  Last Name";
		} 
	}
	if (obj.title != null) {
		if(WithoutContent(obj.title.value)) { 
			missinginfo += "\n     -  Title";
		} 
	}
	if (obj.email_address_r != null) {
		  if(checkemail(obj)) { 
			  missinginfo += "\n     -  E-mail Address";
		  }
	  }
	  if (obj.phone != null) {
		  if(checkphone(obj)) { 
			  missinginfo += "\n     -  Phone Number";
		  }
	  }
	//if(document.getElementById("main_user_admin").checked==true) {
	  if (obj.countrySelect != null) {
		  if(WithoutContent(obj.countrySelect.value)) { 
			  missinginfo += "\n     -  Country";
		  } 
	  }
	  if (obj.stateSelect != null) {
		  if(WithoutContent(obj.stateSelect.value)) { 
			  missinginfo += "\n     -  State";
		  } 
	  }
	  if (obj.citySelect != null) {
		  if(WithoutContent(obj.citySelect.value)) { 
			  missinginfo += "\n     -  City";
		  } 
	  }
	  if (obj.school != null) {
		  if(WithoutContent(obj.school.value)) { 
			  missinginfo += "\n     -  School Name";
		  }
	  }
	  if (obj.school_address != null) {
		  if(WithoutContent(obj.school_address.value)) {
			  missinginfo += "\n     -  School Address";
		  } 
	  } 
	  if (obj.school_city != null) {
		  if(WithoutContent(obj.school_city.value)) {
			  missinginfo += "\n     -  School City";
		  } 
	  }
	  if (obj.school_state != null) {
		  if(WithoutContent(obj.school_state.value)) {
			  missinginfo += "\n     -  School State";
		  } 
	  }
	  if (obj.school_zip != null) {
		  if(WithoutContent(obj.school_zip.value)) {
			  missinginfo += "\n     -  School Zip";
		  } 
	  }
	  if (obj.phone_r != null) {
		  if(WithoutContent(obj.phone_r.value)) { 
			  missinginfo += "\n     -  School Phone";
		  } 
	  }
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			//return false;
			alert(missinginfo);
			//obj.action =="";
	} else {
		obj.submit();
		//alert("form ok");
	}
} // end of checkMDRForm()

function checkMDRIntForm(obj) {
var obj = eval(obj);
var missinginfo = "";
//alert(obj);
	if (obj.firstName != null) {
		if(WithoutContent(obj.firstName.value)) { 
			missinginfo += "\n     -  First Name";
		} 
	}
	if (obj.lastName != null) {
		if(WithoutContent(obj.lastName.value)) { 
			missinginfo += "\n     -  Last Name";
		} 
	}
	if (obj.title != null) {
		if(WithoutContent(obj.title.value)) { 
			missinginfo += "\n     -  Title";
		} 
	}
	if (obj.street != null) {
		if(WithoutContent(obj.street.value)) { 
			missinginfo += "\n     -  Address";
		} 
	}
	if (obj.city != null) {
		if(WithoutContent(obj.city.value)) { 
			missinginfo += "\n     -  City";
		} 
	}
	
	if (obj.country != null) {
		if(WithoutContent(obj.country.value)) { 
			missinginfo += "\n     -  Country";
		} 
	}
	if (obj.email_address_r != null) {
	  if(checkemail(obj)) { 
		  missinginfo += "\n     -  E-mail Address";
	  }
  	}
  	if (obj.phone != null) {
	  if(checkphone(obj)) { 
		  missinginfo += "\n     -  Phone Number";
	  }
  	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			alert(missinginfo);
	} else {
		obj.submit();
		//alert("form ok");
	}
} // end of checkMDRForm()



function checkLearnMoreForm(obj) {
var obj = eval(obj);
var missinginfo = "";
	if (obj.name_r != null) {
		if(WithoutContent(obj.name_r.value)) { 
			missinginfo += "\n     -  Name";
		} 
	}
	if (obj.school != null) {
		if(WithoutContent(obj.school.value)) { 
			missinginfo += "\n     -  School Name";
		}
	}
	if (obj.school_address != null) {
		if(WithoutContent(obj.school_address.value)) {
			missinginfo += "\n     -  School Address";
		} 
	} 
	if (obj.school_city != null) {
		if(WithoutContent(obj.school_city.value)) {
			missinginfo += "\n     -  City";
		} 
	}
	if (obj.school_state != null) {
		if(WithoutContent(obj.school_state.value)) {
			missinginfo += "\n     -  State";
		} 
	}
	if (obj.school_zip != null) {
		if(WithoutContent(obj.school_zip.value)) {
			missinginfo += "\n     -  Zip";
		} 
	}
	if (obj.phone_r != null) {
		if(WithoutContent(obj.phone_r.value)) { 
			missinginfo += "\n     -  Phone";
		} 
	}
	if (obj.offer_code != null) {
		if(WithoutContent(obj.offer_code.value)) { 
			missinginfo += "\n     -  Offer Code";
		} 
	}
	if (obj.email_address_r != null) {
		if(WithoutContent(obj.email_address_r.value)) { 
			missinginfo += "\n     -  E-mail Address";
		}
	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			alert(missinginfo);
	} else {
		obj.submit();
	}
} // end of function CheckLearnMoreForm()

function checkAdwordForm(obj) {
var obj = eval(obj);
var missinginfo = "";
	if (obj.inqSource != null) {
		var myOption = -1;
		for (i=obj.inqSource.length-1; i > -1; i--) {
			if (obj.inqSource[i].checked) {
				myOption = i; 
				i = -1;
			}
		}
		if (myOption == -1) {
			missinginfo += "\n     -  Role";
		} 
	}
	if (obj.fname != null) {
		if(WithoutContent(obj.fname.value)) { 
			missinginfo += "\n     -  First Name";
		} 
	}
	if (obj.lname != null) {
		if(WithoutContent(obj.lname.value)) { 
			missinginfo += "\n     -  Last Name";
		} 
	}
	if (obj.zipcode != null) {
		if(WithoutContent(obj.zipcode.value)) {
			missinginfo += "\n     -  Zip";
		} 
	}
	if (obj.email != null) {
		if(WithoutContent(obj.email.value)) { 
			missinginfo += "\n     -  E-mail Address";
		}
	}
	if (obj.title != null) {
		if(document.getElementById("title").selectedIndex == 0) { 
			missinginfo += "\n     -  Title";
		}
	}
	if (obj.school != null) {
		if(document.getElementById("title").selectedIndex < 9 && WithoutContent(obj.school.value)) { 
			missinginfo += "\n     -  School";
		}
	}
// Put field checks above this point.
	if(missinginfo.length > 2) {
		missinginfo ="_____________________________\n" +
			"Please fill in the following information:\n" +
			missinginfo + "\n_____________________________" +
			"\nPlease re-enter and submit again.";
			alert(missinginfo);
	} else {
		obj.submit();
	}
} // end of function CheckAdwordForm()




function writeYear() {
	var time=new Date();
	var year=time.getYear();
	if (year < 2000)    
	year = year + 1900; 
	document.write(year);
}

function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
cntfield.value = maxlimit - field.value.length;
}


