<!-- Begin
function returnTrueOnly()
	{
		return true;
	}
	

function noenter() {
  return !(window.event && window.event.keyCode == 13); }
//   onkeypress="return noenter()"   (enter this in text fields)

function refresh()
{
		window.location.reload( true );
}

function openpopSmall(popurl){
	winpops=window.open(popurl,"","width=385,height=475,,resizable,scrollbars,")
}

function popthewin(url,windowname,w,h,x,y){
		window.open(url,windowname,"resizable=yes,toolbar=no,scrollbars=yes,menubar=no,status=no,directories=no,width="+w+",height="+h+",left="+x+",top="+y+"");
}

function openpopup(popurl){
	winpops=window.open(popurl,"","width=600,height=650,,resizable,scrollbars,")
}

function openDirectDeposit(){
	winpops=window.open("/secured/websend/DirectDeposit.asp","","width=600,height=650,,resizable,scrollbars,")
}

function entryFieldLimit(formField,fieldLabel)
		{
		  var result = true;
		  if ((formField.value.length < 1) || (formField.value.length > 100))
		  {
			alert('The ' + fieldLabel + ' field is missing OR is longer than 100 characters.');
			formField.focus();
			result = false;
		  }
		
		  return result;
		}

function validRequired(formField,fieldLabel)
{
		  var result = true;
		
		  if (formField.value == "")
		  {
			alert('Please enter a value for the "' + fieldLabel +'" field.');
			formField.focus();
			result = false;
		  }
}

function SubmitEmail(){
	// validate that all fields have data in them
	if (document.frmemail.txtEmailAddress.value == ""){
	window.alert("Please enter your Email address");
	return false;
	}else if (document.frmemail.txtDate.value == ""){
	window.alert("Please Enter a Date");
	return false;
	 }else if (document.frmemail.txtToothNumber.value == ""){
	window.alert("Please Enter a Tooth Number");
	return false;
	 }else if (document.frmemail.txtProcedures.value == ""){
	window.alert("Please Enter Procedures");
	return false;
	 }else if (document.frmemail.txtPatientName.value == ""){
	window.alert("Please Enter a Patient Name");
	return false;
	 }else if (document.frmemail.txtInsuredName.value == ""){
	window.alert("Please Enter the Insured Name");
	return false;
	 }else if (document.frmemail.txtSSN.value == ""){
	window.alert("Please Enter a SSN Number");
	return false;
	 }else if (document.frmemail.txtGroupNumber.value == ""){
	window.alert("Please Enter a Delta Group Number");
	return false;
	 }else if (document.frmemail.txtDentistName.value == ""){
	window.alert("Please Enter a Dentist Name");
	return false;
	 }else if (document.frmemail.txtLicense.value == ""){
	window.alert("Please Enter a DDS License");
	return false;
	 }else if (document.frmemail.file.value == ""){
	window.alert("Please choose and Xray to send");
	return false;
	 }else{
	 // get the name of the file that is about to be uploaded
	 strFileName = document.frmemail.file.value;
	 intChar = strFileName.lastIndexOf("\\") + 1;
	 document.frmemail.hidFileName.value = strFileName.substring(intChar,strFileName.length);
     //document.frmemail.submit();
     return true;
	 }
}

function SubmitEmailFile(){
	// validate that all fields have data in them
	if (document.frmemail.txtEmailAddress.value == ""){
	window.alert("Please enter your Email address");
	return false;
	}else if (document.frmemail.txtDate.value == ""){
	window.alert("Please Enter a Date");
	return false;
	 }else if (document.frmemail.txtName.value == ""){
	window.alert("Please Enter Your Name");
	return false;
	 }else if (document.frmemail.txtCompany.value == ""){
	window.alert("Please Enter the Company Name");
	return false;
	 }else if (document.frmemail.file.value == ""){
	window.alert("Please choose a file to send");
	return false;
	 }else{
	 // get the name of the file that is about to be uploaded
	 strFileName = document.frmemail.file.value;
	 intChar = strFileName.lastIndexOf("\\") + 1;
	 document.frmemail.hidFileName.value = strFileName.substring(intChar,strFileName.length);
     //document.frmemail.submit();
     return true;
	 }

}		

var haveCoverage = true

function ValidateForm()
{
	if (!ValField(rfpForm.name,'an',2,100,'y','Name')) return false;
	if (!ValField(rfpForm.title,'an',2,100,'y','Title')) return false;
	if (!ValField(rfpForm.organization,'an',2,200,'y','Organization')) return false;
	if (!isEmail(rfpForm.email)) return false;
	if (!ValField(rfpForm.street,'an',2,200,'y','Street')) return false;
	if (!ValField(rfpForm.city,'a',2,200,'y','City')) return false;
	if (!ValField(rfpForm.zip,'an',5,10,'y','Zip Code')) return false;
	if (!ValField(rfpForm.telephone,'an',10,13,'y','Telephone')) return false;
	if (!ValField(rfpForm.faxphone,'an',10,13,'y','Fax Phone')) return false;

	return true;
}
function submitYes(form)
{
   form.action = "site_proposal_yes.asp"
}

function submitNo(form)
{
   form.action = "site_proposal_no.asp"
}

//Trim leading and trailing spaces
String.prototype.trim = function()
	{
		return this.replace(/(^\s*)|(\s*$)/g, "");
	}

//checks to see if it is a number
function isNumber(control){
	if (isNaN(control.value)){
		alert(control.value + ' is not a valid number');
		control.focus();
		control.select();
		return false
	}
	    return true
}

function IsDate(control,controlName){
	var sDate=control.value;
	var err=0;
	var psj=0;
	var a,b,d,f;
	if (sDate.indexOf("/")>=1){
		a=sDate.split("/",3);
	} else {a=sDate.split("-",3);}
	b = a[0];	//month	
	d = a[1];	//day
	f = a[2];	//year

	var integer = /(^-?\d\d*$)/; //integer
	if (integer.exec(b) && integer.exec(d) && integer.exec(f)) {
		//basic error checking
		if (b<1 || b>12 || !b) err = 1;
		if (d<1 || d>31 || !d) err = 1;
		if (f<0 || !f) err = 1;
		if (f.length != 4 && f.length != 2) err = 1;
		//advanced error checking

		// months with 30 days
		if (b==4 || b==6 || b==9 || b==11){
			if (d==31) err=1;
		}

		// february, leap year
		if (b==2){
			// feb
			var g=parseInt(f/4)
			if (isNaN(g)) {
				err=1;
			}

			if (d>29) err=1;
				if (d == 29) {
					if (err == 0) {
						err = 1;
		  			if ((f/4) == parseInt(f/4)) err = 0;
						if ((f/100) == parseInt(f/100)) err = 1;
   					if ((f/400) == parseInt(f/400)) err =0;
					}
				}
			}

		if (err == 0){
			return true;
		}
		alert(controlName + ' is not a valid date\nDate MUST be in the form of mm/dd/yyyy');
		control.focus();
		control.select();
		return false
	}
	alert(controlName + ' is not a valid date\nDate MUST be in the form of mm/dd/yyyy');
	control.focus();
	control.select();
	return false
}

//Form validation 
//DataType a=alpha an=AlphaNumeric n=Numeric
//Required y=yes m=no
function ValField(theField,DataType,DataMin,DataMax,Required,DisplayFieldName){
	var f=theField;
	var value=f.value.trim();
	var Valid=true;
	var DisplayMessage='';
	
	if (Required.toUpperCase()=='Y' && (Valid)){
		if(value==''){
			Valid=false;
			DisplayMessage=DisplayFieldName + ' is a required field';
		}
	}	
	
	
	if (value.length < DataMin && (Valid)){
		Valid=false;
		DisplayMessage=DisplayFieldName + '\nMust have a Minimum length of ' + DataMin ;
	}
	
	if (value.length > DataMax && (Valid)){
		Valid=false;
		DisplayMessage=DisplayFieldName + '\nMust have a Maximum length of ' + DataMax ;
	}
	
	if (DataType.toUpperCase()=='N' && (Valid)){
		if(isNaN(value)){
			Valid=false;
			DisplayMessage=DisplayFieldName + '\nMust be Numeric';
		}
	}
	
	
	if (! Valid){
		alert(DisplayMessage);
		f.focus();
		f.select();
		return false;
	}
	
	return true;
}

//Check for valid email address
function isEmail(theField){
	var f=theField;
	var EmailValidation=true;
	var EMLen = theField.value.length;
	
	for (var i = 0; i <= theField.value.length; i++){
		if (theField.value.charAt(i) == "@"){
			EmailValidation=true;
			break;
		}
		else{
			EmailValidation=false;
		}
	}
	
	for (var i = 0; i <= theField.value.length; i++){
		if (theField.value.charAt(i) == "."){
			EmailValidation=true;
			break;
		}
		else{
			EmailValidation=false;
		}
	}
	
	if (! EmailValidation){
		alert('E-Mail address is invalid');
		f.focus();
		f.select();
		return false;
	}
	return true;
}

function ValidateForm1()
{
	if (!ValField(rfpForm.currentCarrier,'an',2,100,'y','Current Carrier')) return false;
	if (rfpForm.renewMonth.value == '') {
		alert('Renew Month\nMust be selected'); 
		rfpForm.renewMonth.focus();
		return false;
	}
	if (rfpForm.renewYear.value == '') {
		alert('Renew Year\nMust be selected'); 
		rfpForm.renewYear.focus();
		return false;
	}
	return true;
}




function DefaultDate(){
	// put today's date in the date field by default
	var date = new Date();
	var m = (date.getMonth()) + 1;
	var d = date.getDate();
	var y = date.getFullYear();
	var today = m + "/" +  d + "/" + y; 
	document.frmemail.txtDate.value = today;
}

function SubmitEmail(){
	// validate that all fields have data in them
	if (document.frmemail.txtEmailAddress.value == ""){
	window.alert("Please enter your Email address");
	return false;
	}else if (document.frmemail.txtDate.value == ""){
	window.alert("Please Enter a Date");
	return false;
	 }else if (document.frmemail.txtToothNumber.value == ""){
	window.alert("Please Enter a Tooth Number");
	return false;
	 }else if (document.frmemail.txtProcedures.value == ""){
	window.alert("Please Enter Procedures");
	return false;
	 }else if (document.frmemail.txtPatientName.value == ""){
	window.alert("Please Enter a Patient Name");
	return false;
	 }else if (document.frmemail.txtInsuredName.value == ""){
	window.alert("Please Enter the Insured Name");
	return false;
	 }else if (document.frmemail.txtSSN.value == ""){
	window.alert("Please Enter a SSN Number");
	return false;
	 }else if (document.frmemail.txtGroupNumber.value == ""){
	window.alert("Please Enter a Delta Group Number");
	return false;
	 }else if (document.frmemail.txtDentistName.value == ""){
	window.alert("Please Enter a Dentist Name");
	return false;
	 }else if (document.frmemail.txtLicense.value == ""){
	window.alert("Please Enter a DDS License");
	return false;
	 }else if (document.frmemail.file.value == ""){
	window.alert("Please choose and Xray to send");
	return false;
	 }else{
	 // get the name of the file that is about to be uploaded
	 strFileName = document.frmemail.file.value;
	 intChar = strFileName.lastIndexOf("\\") + 1;
	 document.frmemail.hidFileName.value = strFileName.substring(intChar,strFileName.length);
     //document.frmemail.submit();
     return true;
	 }
}

function SubmitEmailFile(){
	// validate that all fields have data in them
	if (document.frmemail.txtEmailAddress.value == ""){
	window.alert("Please enter your Email address");
	return false;
	}else if (document.frmemail.txtDate.value == ""){
	window.alert("Please Enter a Date");
	return false;
	 }else if (document.frmemail.txtName.value == ""){
	window.alert("Please Enter Your Name");
	return false;
	 }else if (document.frmemail.txtCompany.value == ""){
	window.alert("Please Enter the Company Name");
	return false;
	 }else if (document.frmemail.file.value == ""){
	window.alert("Please choose a file to send");
	return false;
	 }else{
	 // get the name of the file that is about to be uploaded
	 strFileName = document.frmemail.file.value;
	 intChar = strFileName.lastIndexOf("\\") + 1;
	 document.frmemail.hidFileName.value = strFileName.substring(intChar,strFileName.length);
     //document.frmemail.submit();
     return true;
	 }
}

function submitGroupSupply() {
	if (!ValField(grpSupply.name,'an',2,100,'y','Name')) return false;
	if (!ValField(grpSupply.companyName,'an',2,100,'y','Company')) return false;
	if (!ValField(grpSupply.group,'an',2,200,'y','Group Number')) return false;
	if (!ValField(grpSupply.phone,'an',10,13,'y','Telephone')) return false;
	if (!isEmail(grpSupply.email)) return false;
	
	if (!ValField(grpSupply.providerBooks,'an',1,10,'y','Provider Books')) return false;
	if (!ValField(grpSupply.claimForms,'an',1,10,'y','Claim Forms')) return false;
	if (!ValField(grpSupply.enrollForms,'an',1,10,'y','Enrollment Form-English')) return false;
	if (!ValField(grpSupply.enrollFormSpanish,'an',1,10,'y','Enrollment Form - Spanish')) return false;
	if (!ValField(grpSupply.enrollKits,'an',1,10,'y','Enrollment Kits')) return false;
	if (!ValField(grpSupply.noAutoSub,'an',1,12,'y','Security Code')) return false;

	return true;
}

function submitGeneralComment() {
	if (!ValField(document.gencomment.name,'an',2,100,'y','Name')) return false;
//	if (IsNumeric(document.gencomment.name.value) == true)
//		 { window.alert("Your Name can not be a number.");
//		 document.gencomment.name.focus(); 
//		 return false;}  	
	if (!ValField(document.gencomment.phone,'an',10,10,'n','Telephone')) return false;
	if (!isEmail(document.gencomment.email)) return false;
	if (!ValField(document.gencomment.message,'an',3,1000,'y','Message')) return false;
	if (!ValField(document.gencomment.noAutoSub,'an',2,12,'y','Security Code')) return false;
	
	return true;
}

//Sales Calendar Admin (secured/schedule)
function submitsalemeet()
{
		if (document.calform.datebox.value == ""){
			window.alert("Meeting Date is Required.");
			calform.datebox.focus();
			return false;}
			
   		if (document.calform.datebox.value.length < 8) {	  
			window.alert("Invalid Date format - MM/DD/YYYY.");
			calform.datebox.focus();
			return false;}

		 if ((calform.startHR.options[calform.startHR.selectedIndex].value == "99") && (calform.startMM.options[calform.startMM.selectedIndex].value != "99"))
			  {
				window.alert('Start Time value is not valid.');
				calform.startHR.focus();
				return false;
			  }
		 if ((calform.startHR.options[calform.startHR.selectedIndex].value != "99") && (calform.startMM.options[calform.startMM.selectedIndex].value == "99"))
			  {
				window.alert('Start Time value is not valid.');
				calform.startHR.focus();
				return false;
			  }

		 if ((calform.endHR.options[calform.endHR.selectedIndex].value == "99") && (calform.endMM.options[calform.endMM.selectedIndex].value != "99"))
			  {
				window.alert('End Time value is not valid.');
				calform.endHR.focus();
				return false;
			  }
		 if ((calform.endHR.options[calform.endHR.selectedIndex].value != "99") && (calform.endHR.options[calform.endMM.selectedIndex].value == "99"))
			  {
				window.alert('End Time value is not valid.');
				calform.endHR.focus();
				return false;
			  }


		 if ((calform.endHR.options[calform.endHR.selectedIndex].value != "99") && (calform.endHR.options[calform.endMM.selectedIndex].value != "99"))
			  {
				 if ((calform.startHR.options[calform.startHR.selectedIndex].value == "99") || (calform.startMM.options[calform.startMM.selectedIndex].value == "99"))
					{
					window.alert('Start and End times are inconsistent.');
					calform.startHR.focus();
					return false;
				   }
			  }


//compare times
		  var strDate = calform.datebox.value;
		  
		  var strTimeS = calform.startHR.value + ':' + calform.startMM.value + ':00 ' + calform.startAP.value;
		  var combineStringS = strDate + ' ' + strTimeS;
		 //alert(combineStringS);
	
		  var strTimeE = calform.endHR.value + ':' + calform.endMM.value + ':00 ' + calform.endAP.value;
		  var combineStringE = strDate + ' ' + strTimeE;
		 //alert(combineStringE);
	
		   var dteNow =  new Date(combineStringS);
		   var dteExp =  new Date(combineStringE);

		//check to see if start time is earlier than end time
			if (dteNow > dteExp) {
				window.alert("Start time is after End time.");
				return false;
				}

		if (document.calform.grpName.value == ""){
			window.alert("Group Name is Required.");
			calform.grpName.focus();
			return false;}

//  
		  return true;
}

// board of directors calendar entry
function submitBODmeet()
{
		if (document.calform.committeeBX.options[calform.committeeBX.selectedIndex].value == "0"){
			window.alert("Committee Name is Required.");
			calform.committeeBX.focus();
			return false;}

		if (document.calform.datebox.value == ""){
			window.alert("Meeting Date is Required.");
			calform.datebox.focus();
			return false;}
			
   		if (document.calform.datebox.value.length < 8) {	  
			window.alert("Invalid Date format - MM/DD/YYYY.");
			calform.datebox.focus();
			return false;}

//		 if ((calform.startHR.options[calform.startHR.selectedIndex].value == "99") && (calform.startMM.options[calform.startMM.selectedIndex].value == "99"))
//			  {
//				window.alert('Start Time value is required.');
//				calform.startHR.focus();
//				return false;
//			  }

		 if ((calform.startHR.options[calform.startHR.selectedIndex].value == "99") && (calform.startMM.options[calform.startMM.selectedIndex].value != "99"))
			  {
				window.alert('Start Time value is not valid.');
				calform.startHR.focus();
				return false;
			  }
		 if ((calform.startHR.options[calform.startHR.selectedIndex].value != "99") && (calform.startMM.options[calform.startMM.selectedIndex].value == "99"))
			  {
				window.alert('Start Time value is not valid.');
				calform.startHR.focus();
				return false;
			  }

		 if ((calform.endHR.options[calform.endHR.selectedIndex].value == "99") && (calform.endMM.options[calform.endMM.selectedIndex].value != "99"))
			  {
				window.alert('End Time value is not valid.');
				calform.endHR.focus();
				return false;
			  }
		 if ((calform.endHR.options[calform.endHR.selectedIndex].value != "99") && (calform.endHR.options[calform.endMM.selectedIndex].value == "99"))
			  {
				window.alert('End Time value is not valid.');
				calform.endHR.focus();
				return false;
			  }


		 if ((calform.endHR.options[calform.endHR.selectedIndex].value != "99") && (calform.endHR.options[calform.endMM.selectedIndex].value != "99"))
			  {
				 if ((calform.startHR.options[calform.startHR.selectedIndex].value == "99") || (calform.startMM.options[calform.startMM.selectedIndex].value == "99"))
					{
					window.alert('Start and End times are inconsistent.');
					calform.startHR.focus();
					return false;
				   }
			  }


//compare times
		  var strDate = calform.datebox.value;
		  
		  var strTimeS = calform.startHR.value + ':' + calform.startMM.value + ':00 ' + calform.startAP.value;
		  var combineStringS = strDate + ' ' + strTimeS;
		 //alert(combineStringS);
	
		  var strTimeE = calform.endHR.value + ':' + calform.endMM.value + ':00 ' + calform.endAP.value;
		  var combineStringE = strDate + ' ' + strTimeE;
		 //alert(combineStringE);
	
		   var dteNow =  new Date(combineStringS);
		   var dteExp =  new Date(combineStringE);

		//check to see if start time is earlier than end time
			if (dteNow > dteExp) {
				window.alert("Start time is after end time.");
				return false;
				}
		if (document.calform.locationBX.value == ""){
			window.alert("Location of meeting is required.");
			calform.locationBX.focus();
			return false;}

//  
		  return true;
}



//functions for randam rollover menus
function showImage(imageName)
		{
		   if (document.images)
		   {
			  document[imageName].src = eval(imageName + "On.src");
		   } 
		}

function valButtonOne(btn) {
    var cnt = -1;
    for (var i=btn.length-1; i > -1; i--) {
        if (btn[i].checked) {cnt = i; i = -1;}
    }
    if (cnt > -1) return true;
    else 
		  {	 return false;}
}


function hideImage(imageName)
		{
		   if (document.images)
		   {
			  document[imageName].src = eval(imageName + "Off.src");
		   } 
		}

if (document.images)
	{
   // Main Menu Buttons - Top
		   indEligOn = new Image();
		   indEligOn.src = "/images/title_WhoIsElig_2.jpg";
		   indEligOff = new Image();
		   indEligOff.src = "/images/title_WhoIsElig_1.jpg"
		   
		   indCoverOn = new Image();
		   indCoverOn.src = "/images/title_WhatIsCovered_2.jpg";
		   indCoverOff = new Image();
		   indCoverOff.src = "/images/title_WhatIsCovered_1.jpg"
		
		   indDentistOn = new Image();
		   indDentistOn.src = "/images/title_DoesDentist_2.jpg";
		   indDentistOff = new Image();
		   indDentistOff.src = "/images/title_DoesDentist_1.jpg"
		
		   indPlanCostOn = new Image();
		   indPlanCostOn.src = "/images/title_PlanCost_2.jpg";
		   indPlanCostOff = new Image();
		   indPlanCostOff.src = "/images/title_PlanCost_1.jpg"

		   indHowEnrollOn = new Image();
		   indHowEnrollOn.src = "/images/title_HowEnroll_2.jpg";
		   indHowEnrollOff = new Image();
		   indHowEnrollOff.src = "/images/title_HowEnroll_1.jpg"

// Spanish rollover begin
		   indEligSPOn = new Image();
		   indEligSPOn.src = "/espanol/images/title_WhoIsElig_2.jpg";
		   indEligSPOff = new Image();
		   indEligSPOff.src = "/espanol/images/title_WhoIsElig_1.jpg"
		   
		   indCoverSPOn = new Image();
		   indCoverSPOn.src = "/espanol/images/title_WhatIsCovered_2.jpg";
		   indCoverSPOff = new Image();
		   indCoverSPOff.src = "/espanol/images/title_WhatIsCovered_1.jpg"
		
		   indDentistSPOn = new Image();
		   indDentistSPOn.src = "/espanol/images/title_DoesDentist_2.jpg";
		   indDentistSPOff = new Image();
		   indDentistSPOff.src = "/espanol/images/title_DoesDentist_1.jpg"
		
		   indPlanCostSPOn = new Image();
		   indPlanCostSPOn.src = "/espanol/images/title_PlanCost_2.jpg";
		   indPlanCostSPOff = new Image();
		   indPlanCostSPOff.src = "/espanol/images/title_PlanCost_1.jpg"

		   indHowEnrollSPOn = new Image();
		   indHowEnrollSPOn.src = "/espanol/images/title_HowEnroll_2.jpg";
		   indHowEnrollSPOff = new Image();
		   indHowEnrollSPOff.src = "/espanol/images/title_HowEnroll_1.jpg"
		   
		   
		   showClicAquiOn = new Image();
		   showClicAquiOn.src = "/espanol/images/clickhere2_sp.jpg";
		   showClicAquiOff = new Image();
		   showClicAquiOff.src = "/espanol/images/clickhere1_sp.jpg"		   

		   
		   showChgFormSPOn = new Image();
		   showChgFormSPOn.src = "/espanol/images/curve_Change2_sp.jpg";
		   showChgFormSPOff = new Image();
		   showChgFormSPOff.src = "/espanol/images/curve_Change1_sp.jpg"

// Spanish rollover end


		   indContinueOn = new Image();
		   indContinueOn.src = "/images/clickContinue_1.jpg";
		   indContinueOff = new Image();
		   indContinueOff.src = "/images/clickContinue_2.jpg"

		   indContinuebOn = new Image();
		   indContinuebOn.src = "/images/continue_o.jpg";
		   indContinuebOff = new Image();
		   indContinuebOff.src = "/images/continue_b.jpg"
		   
		   homeBlkOn = new Image();
		   homeBlkOn.src = "/images/home_f2.jpg";
		   homeBlkOff = new Image();
		   homeBlkOff.src = "/images/home_f1.jpg"

		   siteBlkOn = new Image();
		   siteBlkOn.src = "/images/sitemap_f2.gif";
		   siteBlkOff = new Image();
		   siteBlkOff.src = "/images/sitemap.gif"

		   contactBlkOn = new Image();
		   contactBlkOn.src = "/images/contact_f2.gif";
		   contactBlkOff = new Image();
		   contactBlkOff.src = "/images/contact.gif"

		   registerGolfOn = new Image();
		   registerGolfOn.src = "/images/RegisterButton2.jpg";
		   registerGolfOff = new Image();
		   registerGolfOff.src = "/images/RegisterButton.jpg"
		   
		   donateOn = new Image();
		   donateOn.src = "/images/DonateArtworkB.jpg";
		   donateOff = new Image();
		   donateOff.src = "/images/DonateArtwork.jpg"
		   
		   qzContinueOn = new Image();
		   qzContinueOn.src = "/images/continue_b.jpg";
		   qzContinueOff = new Image();
		   qzContinueOff.src = "/images/continue_o.jpg"


		   regSeminarOn = new Image();
		   regSeminarOn.src = "/images/registerForSeminar2.png";
		   regSeminarOff = new Image();
		   regSeminarOff.src = "/images/registerForSeminar1.png"

		   continueButOn = new Image();
		   continueButOn.src = "/images/continueB2.png";
		   continueButOff = new Image();
		   continueButOff.src = "/images/continueB1.png"

		   generateFormOn = new Image();
		   generateFormOn.src = "/images/generateFormB.png";
		   generateFormOff = new Image();
		   generateFormOff.src = "/images/generateFormA.png"

		   siteBlk2On = new Image();
		   siteBlk2On.src = "/images/home_sp_2.jpg";
		   siteBlk2Off = new Image();
		   siteBlk2Off.src = "/images/home_sp_1.jpg"


		   showChgFormOn = new Image();
		   showChgFormOn.src = "/images/3image_ChangeForm2.jpg";
		   showChgFormOff = new Image();
		   showChgFormOff.src = "/images/3image_ChangeForm1.jpg"

		   showBrokerAgreeOn = new Image();
		   showBrokerAgreeOn.src = "/images/curve_BrokerAgreementDark.jpg";
		   showBrokerAgreeOff = new Image();
		   showBrokerAgreeOff.src = "/images/curve_BrokerAgreementLite.jpg"

		   registerClientOn = new Image();
		   registerClientOn.src = "/images/brokerClickHere.jpg";
		   registerClientOff = new Image();
		   registerClientOff.src = "/images/brokerClickHere2.jpg"

		   showChgStateOn = new Image();
		   showChgStateOn.src = "/images/articleImages/stateEnrollClick2.png";
		   showChgStateOff = new Image();
		   showChgStateOff.src = "/images/articleImages/stateEnrollClick1.png"
}

function goToThanks()
{
	if (form1.frmplan.options[document.form1.frmplan.selectedIndex].value == "0")	  
		  {window.alert("Please select the Delta Dental product.");	
		  form1.frmplan.focus();
		  return false;}
		  
	if (valButtonOne(document.form1.howHeard) == false)
		  {window.alert("Please select how you heard about the Individual Plan."+ '\n' +"¿Cómo se enteró de la Delta Dental Plan Individual?");	
		  return false;}
}


function goToEnrolForm()
{
	if (valButtonOne(document.form1.howHeard) == false)
		  {window.alert("Please select how you heard about the Individual Plan."+ '\n' +"¿Cómo se enteró de la Delta Dental Plan Individual?");	
		  return false;}
}

function FormEventSubmit()
{
		if (document.calform.eventCode.value == ""){
			window.alert("An event code is required.");
			calform.eventCode.focus();
			return false;}
	
	}
	
function SubmitFoundCountact()
{
	if (!ValField(theContact.name,'an',2,100,'y','Name')) return false;
	if (!ValField(theContact.companyName,'an',2,100,'y','Company Name')) return false;
	
	if (!ValField(theContact.phone,'n',10,10,'n','Telephone')) return false;
	if (!isEmail(theContact.email)) return false;
	if (!ValField(theContact.message,'an',1,1000,'y','Message')) return false;

	return true;
}

function takeTheQuiz()
//    /quiz/index.asp
{
	if (theContact.forWho.options[theContact.forWho.selectedIndex].value == "0")	  
		  {window.alert("Who is the subject of this assessment?");	
		  theContact.forWho.focus();
		  return false;}
	if (document.theContact.nameBX.value != "")
		{
			if (!ValField(theContact.nameBX,'an',1,1000,'y','Your Name')) return false;	
		}
}

function quizEmail(){
		if (!isEmail(theContact.emailBX)) return false;
}

function checkRadios() {
 var el = document.forms[0].elements;
 for(var i = 0 ; i < el.length ; ++i) {
  if(el[i].type == "radio") {
   var radiogroup = el[el[i].name]; // get the whole set of radio buttons.
   var itemchecked = false;
   for(var j = 0 ; j < radiogroup.length ; ++j) {
    if(radiogroup[j].checked) {
	 itemchecked = true;
	 break;
	}
   }
   if(!itemchecked) { 
    alert("Please choose an answer for "+el[i].name+".");
    if(el[i].focus)
     el[i].focus();
	return false;
   }
  }
 }
 return true;
}


function bodAttendence()
{
	if (document.attendOne.attendPassword.value == ""){
		window.alert("A password code is required.");
		attendOne.attendPassword.focus();
		return false;}
	if (attendOne.attendType.options[attendOne.attendType.selectedIndex].value == "none")	  
		{window.alert("Please select your attendace type.");	
		 attendOne.attendType.focus();
		 return false;}
}


function submitBrokerAuth()
{
	
	if (!ValField(calform.theidOne,'n',3,5,'n','Arizona Broker ID')) return false;
	if (!ValField(calform.theidTwo,'n',7,12,'n','Tax Identification Number')) return false;

	return true;

}

// Broker Contracting  -- /secured/broker/contract_Index.asp  *****************************************************************************************
function submitBrokerContract()
{
	if (brkOnlineForm.optionBX.options[brkOnlineForm.optionBX.selectedIndex].value == "0")	    //category
		{window.alert("Please select Broker Category.");	
		 brkOnlineForm.optionBX.focus();
		 return false;}

	if (!ValField(brkOnlineForm.licAddressFull,'an',3,100,'n','Business Address')) return false;	    //address
	if (isNaN(brkOnlineForm.licAddressFull.value) == false){
			alert('Business Address can not be a number');
			brkOnlineForm.licAddressFull.focus();
			return false;}			

	if (!ValField(brkOnlineForm.licCityName,'an',3,50,'n','Business City')) return false;	    //city
	if (isNaN(brkOnlineForm.licCityName.value) == false){
			alert('Business City can not be a number');
			brkOnlineForm.licCityName.focus();
			return false;}			

	if (brkOnlineForm.licStateName.options[brkOnlineForm.licStateName.selectedIndex].value == "0")	  	    //state
		{window.alert("Please select State.");	
		 brkOnlineForm.licStateName.focus();
		 return false;}

	if (!ValField(brkOnlineForm.licZipCode,'n',5,5,'n','Business ZipCode')) return false;	    //zip

	if (!ValField(brkOnlineForm.licTelephone,'n',10,10,'n','Telephone')) return false;	    //phone

	if (!isEmail(brkOnlineForm.licEmail)) return false; // email 

	if (brkOnlineForm.licExemptBU.options[brkOnlineForm.licExemptBU.selectedIndex].value == "0")	  	    //back up withholding from w9
		{window.alert("Please select a Backup Withholding Option.");	
		 brkOnlineForm.licExemptBU.focus();
		 return false;}

	if (document.brkOnlineForm.licSSN.value != ""){  	    //social security
		if (!ValField(brkOnlineForm.licSSN,'n',9,9,'n','SSN')) return false;
	}
	
	if (document.brkOnlineForm.lictaxid.value != ""){		    //tax id
		if (!ValField(brkOnlineForm.lictaxid,'n',9,9,'n','Tax ID')) return false;
	}
	
	if ((document.brkOnlineForm.licSSN.value == "") &&  (document.brkOnlineForm.lictaxid.value == "")){	    //either ssn or tid must be present
				alert('Either a SSN or TIN is required to continue');
				brkOnlineForm.licSSN.focus();
				return false;
	}	
	
	if ((document.brkOnlineForm.licSSN.value != "") &&  (document.brkOnlineForm.lictaxid.value != "")){	    //select ssn or tid not both
				alert('Only one tax identification value is required, enter SSN or TIN.');
				brkOnlineForm.licSSN.focus();
				return false;
	}	
	
	
	
	if (!ValField(brkOnlineForm.licAZInsure,'n',2,12,'n','AZ License Number')) return false; 	    //az license
	
	//if company name missing, must have first and last name
	if ((document.brkOnlineForm.licBusinessName.value == "") &&  (document.brkOnlineForm.licNameFirst.value == "") && (document.brkOnlineForm.licNameFirst.value == "")){
				alert('First and Last names required if Business name is not avaiable.');
				brkOnlineForm.licNameFirst.focus();
				return false;}			
	
	if (document.brkOnlineForm.licNameFirst.value != ""){
		if (!ValField(brkOnlineForm.licNameFirst,'an',3,20,'n','First Name')) return false;
		if (isNaN(brkOnlineForm.licNameFirst.value) == false){
				alert('First Name can not be a number');
				brkOnlineForm.licNameFirst.focus();
				return false;}			
		}

	if (document.brkOnlineForm.licNameFirst.value != ""){
		if (!ValField(brkOnlineForm.licNameLast,'an',3,20,'n','Last Name')) return false;
		if (isNaN(brkOnlineForm.licNameLast.value) == false){
				alert('Last Name can not be a number');
				brkOnlineForm.licNameLast.focus();
				return false;}			
	}
	
	if (document.brkOnlineForm.licBusinessName.value != ""){
		if (!ValField(brkOnlineForm.licBusinessName,'an',3,100,'n','Business Name')) return false;
		if (isNaN(brkOnlineForm.licBusinessName.value) == false){
				alert('Business Name can not be a number');
				brkOnlineForm.licBusinessName.focus();
				return false;}			
	}

	if (brkOnlineForm.bxAgree.options[brkOnlineForm.bxAgree.selectedIndex].value == "0")	  
		{window.alert("Please select 'I Agree' from the Terms and Conditions list to continue.");	
		 brkOnlineForm.bxAgree.focus();
		 return false;}

	if (brkOnlineForm.bxSignature.options[brkOnlineForm.bxSignature.selectedIndex].value == "0")	  
		{window.alert("Please select 'I Agree' from the Electronic Signature list to continue.");	
		 brkOnlineForm.bxSignature.focus();
		 return false;}


return true;
}


function btnroll1(img_name1, img_src1, img_name2, img_src2)
   {
   document[img_name1].src = img_src1;
   document[img_name2].src = img_src2;
   }
function btnroll2(img_name1, img_src1, img_name2, img_src2)
   {
   document[img_name1].src = img_src1;
   document[img_name2].src = img_src2;
   }
function btnroll3(img_name1, img_src1, img_name2, img_src2)
   {
   document[img_name1].src = img_src1;
   document[img_name2].src = img_src2;
   }


function submitReorder()
{
		if (!ValField(document.calform.txtName,'an',3,100,'n','First and Last Name')) return false;
		if (isNaN(document.calform.txtName.value) == false){
				alert('First and Last Name can not be a number');
				document.calform.txtName.focus();
				return false;}		
								
		if (!ValField(document.calform.txtClinicName,'an',3,100,'n','Clinic Name')) return false;
		if (isNaN(document.calform.txtClinicName.value) == false){
				alert('Clinic Name can not be a number');
				document.calform.txtClinicName.focus();
				return false;}		
				
								
		if (!ValField(document.calform.txtAddress,'an',3,100,'n','Street Address')) return false;
		if (isNaN(document.calform.txtAddress.value) == false){
				alert('Address can not be a number');
				document.calform.txtAddress.focus();
				return false;}					


		if (!ValField(document.calform.txtCity,'an',3,25,'n','City Name')) return false;
		if (isNaN(document.calform.txtCity.value) == false){
				alert('City Name can not be a number');
				document.calform.txtCity.focus();
				return false;}					


		if (!ValField(document.calform.txtState,'a',2,2,'a','State Abbreviation')) return false;
		if (isNaN(document.calform.txtState.value) == false){
				alert('State abbreviation can not be a number');
				document.calform.txtState.focus();
				return false;}					

		if (!ValField(document.calform.txtZipCode,'n',5,5,'n','Zip Code')) return false;

		if (!ValField(document.calform.txtPhone,'n',10,10,'n','Phone Number')) return false;
		
		if (!isEmail(document.calform.txtEmail)) return false;
		
		
		return true;

}


function textCounter(field, countfield, maxlimit) {
	if (field.value.length > maxlimit) // if too long...trim it!
	field.value = field.value.substring(0, maxlimit);
	// otherwise, update 'characters left' counter
	else 
	countfield.value = maxlimit - field.value.length;
}


// *****************************************************************************************