//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      LoginValid      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function LoginValid() {

	if (isWhitespace(document.myform.MAccountName.value)) 
	{
	     alert("Please enter Account Name  ");
	     document.myform.MAccountName.focus();
	     return false;
	}  

	if (document.myform.MAccountName.value.length < 4) 
	{
	     alert("The Minimum length for Account Name should be 4 !");
	     document.myform.MAccountName.focus();
	     return false;
	 }

	if (isWhitespace(document.myform.MAccountPassword.value)) 
	{
	     alert("Please enter  Account Password ");
	     document.myform.MAccountPassword.focus();
	     return false;
	}  
	 if (document.myform.MAccountPassword.value.length < 4) 
	 {
	     alert("The Minimum length for Password should be 4 !");
	     document.myform.MAccountPassword.focus();
	     return false;
	 }
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~  ValidContact   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidContact() {
	var radio_choice = false;
	if (isWhitespace(document.myform.fname.value)) 
	{
	     alert("Please enter Your Name  ");
	     document.myform.fname.focus();
	     return false;
	}  
	if (document.myform.telephone.value.length > 0){ 
	if (IsPhone(document.myform.telephone.value)==false) {
		document.myform.telephone.focus();
			return false;
	}
	}
	
	if (isWhitespace(document.myform.email.value)) 
	{
	     alert("Please enter email ");
	     document.myform.email.focus();
	     return false;
	} 
	
	document.myform.email.value = NonSpace(document.myform.email.value);
	if (isEmail(document.myform.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.email.focus();
			return false;
	} 
	
/*	if (document.myform.subject){
		if (document.myform.subject.checked==true)
		radio_choice = true; 

		for (counter = 0;  counter < document.myform.subject.length; counter++)
		{
			if (document.myform.subject[counter].checked)
			radio_choice = true; 
		}
	}
	if (!radio_choice)
	{
		alert("Please select mail subject")
		return (false);
	}
*/	

	if (isWhitespace(document.myform.comments.value)) 
	{
	     alert("Please enter your comments! ");
	     document.myform.comments.focus();
	     return false;
	} 
	document.myform.sCMD.value = "upd";
	return true;
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~  ValidCustomer   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidCustomer() {
	if (document.frmSite.blob.value!="")	{
		myext = getExtension(document.frmSite.blob.value);
		if ((myext != "gif") && (myext != "jpg") && (myext != "jpeg") && (myext != "bmp")){
			alert ("Please Upload an Image with GIF,JPEG,BMP or JPG extension !");
			document.frmSite.blob.value.focus;
		return false; 
		}
	}			
	if (document.frmSite.width.value > 0)	{
		if (document.frmSite.width.value > 114) {
	     alert("The width of  Image is too big! ");
	     document.frmSite.width.focus();
	     return false;
		}
	}  
	if (document.frmSite.height.value > 0)	{
		if (document.frmSite.height.value > 65) {
	     alert("The height of  Image is too big!");
	     document.frmSite.height.focus();
	     return false;
		}
	}  	
	document.frmSite.sCMD.value = "upd";
	return true;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     ValidSiteHP      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidSiteHP() {
	if (document.frmSite.blob.value!="")	{
		myext = getExtension(document.frmSite.blob.value);
		if ((myext != "gif") && (myext != "jpg") && (myext != "jpeg") && (myext != "bmp")){
			alert ("Please Upload an Image with GIF,JPEG,BMP or JPG extension !");
			document.frmSite.blob.value.focus;
		return false; 
		}
	}	
	if (document.frmSite.width.value > 0)	{
		if (document.frmSite.width.value > 230) {
	     alert("The width of  Image is too big! ");
	     document.frmSite.width.focus();
	     return false;
		}
	}  
	if (document.frmSite.height.value > 0)	{
		if (document.frmSite.height.value > 230) {
	     alert("The height of  Image is too big!");
	     document.frmSite.height.focus();
	     return false;
		}
	}  	
	 return true;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~  ValidFloor   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidFloor() {
	var radio_choice = false;

	if (document.myform.check){
		if (document.myform.check.checked==true)
		radio_choice = true; 

		for (counter = 0;  counter < document.myform.check.length; counter++)
		{
			if (document.myform.check[counter].checked)
			radio_choice = true; 
		}
	}
	if (document.myform.checkBack){
		for (counter = 0;  counter < document.myform.checkBack.length; counter++)
		{
			if (document.myform.checkBack[counter].checked)
			radio_choice = true; 
		}
	}
	if (!radio_choice)
	{
		alert("Please select location(s).")
		return (false);
	}
	if (isWhitespace(document.myform.TAMBID.value)) 
	{
	     alert("Please enter Your TAMB Convention ID");
	     document.myform.TAMBID.focus();
	     return false;
	} 
	if (isNumber2(document.myform.TAMBID.value)==false) {
			document.myform.TAMBID.focus();
			return false;
	}
	
	document.myform.sCMD.value = "upd";
	return true;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     ValidPay      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidPay() {
	if ( (document.myform.PayType.options[document.myform.PayType.options.selectedIndex].value)=="0")
	{
			alert("Please enter Payment Type ");
			document.myform.PayType.focus();
			return false;
	}
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     ValidPayP      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidPayP()
{
	var radio_choice = false;
	if (document.myform.PayID){
		if (document.myform.PayID.checked==true)
		radio_choice = true; 

		for (counter = 0;  counter < document.myform.PayID.length; counter++)
		{
			if (document.myform.PayID[counter].checked)
			radio_choice = true; 
		}
	}
	if (!radio_choice)
	{
	alert("Please select one Payment.")
		return (false);
	}
		document.myform.submit( );
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     ValidPayment      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidPayment() {
	if (isWhitespace(document.myform.bname.value)) 
	{
	     alert("Please enter Payment Name");
	     document.myform.bname.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.baddr1.value)) 
	{
	     alert("Please enter Payment Address");
	     document.myform.baddr1.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.bcity.value)) 
	{
	     alert("Please enter City");
	     document.myform.bcity.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.bcountry.value)) 
	{
	     alert("Please enter Country");
	     document.myform.bcountry.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.bzip.value)) 
	{
	     alert("Please enter Zip Code");
	     document.myform.bzip.focus();
	     return false;
	} 
	 if (validateZIP(document.myform.bzip)==false) {
			document.myform.bzip.focus();
			return false;
	}

	if (isWhitespace(document.myform.email.value)) 
	{
	     alert("Please enter email ");
	     document.myform.email.focus();
	     return false;
	} 
	document.myform.email.value = NonSpace(document.myform.email.value);
	if (isEmail(document.myform.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.email.focus();
			return false;
	}  

	 return true;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     ValidCC     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidCC() {
	if (document.myform.MemberID.value=="" || document.myform.MemberID.value=="0") 
	{
	     alert("Please enter ID");
	     document.myform.MemberID.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.bname.value)) 
	{
	     alert("Please enter Name");
	     document.myform.bname.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.baddr1.value)) 
	{
	     alert("Please enter Address");
	     document.myform.baddr1.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.bcity.value)) 
	{
	     alert("Please enter City");
	     document.myform.bcity.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.bcountry.value)) 
	{
	     alert("Please enter Country");
	     document.myform.bcountry.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.bzip.value)) 
	{
	     alert("Please enter Zip Code");
	     document.myform.bzip.focus();
	     return false;
	} 
	 if (validateZIP(document.myform.bzip)==false) {
			document.myform.bzip.focus();
			return false;
	}

	if (isWhitespace(document.myform.email.value)) 
	{
	     alert("Please enter email ");
	     document.myform.email.focus();
	     return false;
	} 
	document.myform.email.value = NonSpace(document.myform.email.value);
	if (isEmail(document.myform.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.email.focus();
			return false;
	} 
	if ( (document.myform.cctype.options[document.myform.cctype.options.selectedIndex].value)=="0")
	{
	     alert("Please enter Credit Card Type");
	     document.forms[0].cctype.focus();
	     return false;
	}  
	
	if (isWhitespace(document.myform.cardnumber.value)) 
	{
	     alert("Please enter Credit Card Number ");
	     document.myform.cardnumber.focus();
	     return false;
	} 
	if (document.myform.cardnumber.value.length>0){ 
	document.myform.cardnumber.value = NonSpace(document.myform.cardnumber.value);
	if (isNumber1(document.myform.cardnumber.value)==false) {
			document.myform.cardnumber.focus();
			return false;
	}
	}
	if (document.myform.cardnumber.value.length!=16){ 
			alert("Please enter a valid Credit Card Number");
			document.myform.cardnumber.focus();
			return false;
	}  
	if (isWhitespace(document.myform.expmonth.value)) 
	{
	     alert("Please enter Expiration Month");
	     document.myform.expmonth.focus();
	     return false;
	} 
	if (isWhitespace(document.myform.expyear.value)) 
	{
	     alert("Please enter Expiration Year");
	     document.myform.expyear.focus();
	     return false;
	} 

	document.myform.sCMD.value = "upd";
	 return true;
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      ValidSearch      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidSearch() {

	var theForm = document.forms[0];
	var nr = theForm.length;
	var cod = 0;
   
	for (i=0; i<nr; i++){
		if (theForm.elements[i].type != "hidden" && theForm.elements[i].type != "submit" && theForm.elements[i].type != "radio"){
			if (theForm.elements[i].value != "" && theForm.elements[i].value != "0"){cod = 1;}
		}
	}
		if (cod == 0) {
			alert("Please, fill at least one field to Search!");
			theForm.BussTypes.focus();
			return false;
		}

        if (theForm.BussTypes.value == "0") {
                alert("Please choose a Business Type");
                theForm.BussTypes.focus();
                return false;
        }

        var ln = theForm.LastName.value;
        if (theForm.BussTypes.value == 1 || theForm.BussTypes.value == 15) {
                if (ln.length < 3) {
                   alert("Please enter at least the first three letters of the last name for brokers or loan officers");
                   theForm.LastName.focus();
                   return false;
                }
        }
	
	return true;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validCR    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validCR() {
	
	if (document.frmCR.mycode.value=="1"){ 
	if ( (document.frmCR.ClsID.options[document.frmCR.ClsID.options.selectedIndex].value)=="0")
	{
	     alert("Please enter Class!");
	     document.frmCR.ClsID.focus();
	     return false;
	}  
	}
	if (isWhitespace(document.frmCR.fname.value)) 
	{
	     alert("Please enter First Name");
	     document.frmCR.fname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.lname.value)) 
	{
	     alert("Please enter Last Name");
	     document.frmCR.lname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.cname.value)) 
	{
	     alert("Please enter Company Name");
	     document.frmCR.cname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.address1.value)) 
	{
	     alert("Please enter Address ");
	     document.frmCR.address1.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.city.value)) 
	{
	     alert("Please enter City");
	     document.frmCR.city.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.zipCode.value)) 
	{
	     alert("Please enter Zip Code");
	     document.frmCR.zipCode.focus();
	     return false;
	} 
	 if (validateZIP(document.frmCR.zipCode)==false) {
			document.frmCR.zipCode.focus();
			return false;
	}
	if (isWhitespace(document.frmCR.telephone.value)) 
	{
	     alert("Please enter Telephone ");
	     document.frmCR.telephone.focus();
	     return false;
	}  
	if (IsPhone(document.frmCR.telephone.value)==false) {
			document.frmCR.telephone.focus();
			return false;
	}
	if (document.frmCR.fax.value.length>0){ 
	if (IsFax(document.frmCR.fax.value)==false) {
			document.frmCR.fax.focus();
			return false;
	}
	
	}
	if (isWhitespace(document.frmCR.email.value)) 
	{
	     alert("Please enter email ");
	     document.frmCR.email.focus();
	     return false;
	} 
	if (document.frmCR.email.value.length>0){ 
	document.frmCR.email.value = NonSpace(document.frmCR.email.value);
	 
	if (isEmail(document.frmCR.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.frmCR.email.focus();
			return false;
	}  
	}	
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validER    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validER() {
	
	if (document.frmCR.mycode.value=="1"){ 
	if ( (document.frmCR.ClsID.options[document.frmCR.ClsID.options.selectedIndex].value)=="0")
	{
	     alert("Please enter Event!");
	     document.frmCR.ClsID.focus();
	     return false;
	}  
	}
	if (isWhitespace(document.frmCR.fname.value)) 
	{
	     alert("Please enter First Name");
	     document.frmCR.fname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.lname.value)) 
	{
	     alert("Please enter Last Name");
	     document.frmCR.lname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.cname.value)) 
	{
	     alert("Please enter Company Name");
	     document.frmCR.cname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.address1.value)) 
	{
	     alert("Please enter Address ");
	     document.frmCR.address1.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.city.value)) 
	{
	     alert("Please enter City");
	     document.frmCR.city.focus();
	     return false;
	}  
	if (isWhitespace(document.frmCR.zipCode.value)) 
	{
	     alert("Please enter Zip Code");
	     document.frmCR.zipCode.focus();
	     return false;
	} 
	 if (validateZIP(document.frmCR.zipCode)==false) {
			document.frmCR.zipCode.focus();
			return false;
	}
	if (isWhitespace(document.frmCR.telephone.value)) 
	{
	     alert("Please enter Telephone ");
	     document.frmCR.telephone.focus();
	     return false;
	}  
	if (IsPhone(document.frmCR.telephone.value)==false) {
			document.frmCR.telephone.focus();
			return false;
	}
	if (document.frmCR.fax.value.length>0){ 
	if (IsFax(document.frmCR.fax.value)==false) {
			document.frmCR.fax.focus();
			return false;
	}
	
	}
	if (isWhitespace(document.frmCR.zipCode.value)) 
	{
	     alert("Please enter Zip Code");
	     document.frmCR.zipCode.focus();
	     return false;
	} 
	if ((isWhitespace(document.frmCR.MembAttend.value) || document.frmCR.MembAttend.value=="0") && (isWhitespace(document.frmCR.NonMembAttend.value) || document.frmCR.NonMembAttend.value=="0"))
	{
	     alert("You must fill in at least one Member or Non Member to Attend ");
	     document.frmCR.MembAttend.focus();
	     return false;
	} 
	if (document.frmCR.email.value.length>0){ 
	document.frmCR.email.value = NonSpace(document.frmCR.email.value);
	 
	if (isEmail(document.frmCR.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.frmCR.email.focus();
			return false;
	}  
	}	
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validPAC    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validPAC() {
	
	if (isWhitespace(document.frmPAC.bname.value)) 
	{
	     alert("Please enter your name as it appears on your Credit Card");
	     document.frmPAC.bname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmPAC.cname.value)) 
	{
	     alert("Please enter your Employer");
	     document.frmPAC.cname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmPAC.occupation.value)) 
	{
	     alert("Please enter your Occupation");
	     document.frmPAC.occupation.focus();
	     return false;
	}  
	if (isWhitespace(document.frmPAC.baddr1.value)) 
	{
	     alert("Please enter Address ");
	     document.frmPAC.baddr1.focus();
	     return false;
	}  
	if (isWhitespace(document.frmPAC.bcity.value)) 
	{
	     alert("Please enter City");
	     document.frmPAC.bcity.focus();
	     return false;
	}  
	if (isWhitespace(document.frmPAC.bstate.value)) 
	{
	     alert("Please enter State");
	     document.frmPAC.bstate.focus();
	     return false;
	}  
	if (isWhitespace(document.frmPAC.bzip.value)) 
	{
	     alert("Please enter Zip Code");
	     document.frmPAC.bzip.focus();
	     return false;
	} 
	 if (validateZIP(document.frmPAC.bzip)==false) {
			document.frmPAC.bzip.focus();
			return false;
	}
	if (isWhitespace(document.frmPAC.phone.value)) 
	{
	     alert("Please enter Telephone ");
	     document.frmPAC.phone.focus();
	     return false;
	}  
	if (IsPhone(document.frmPAC.phone.value)==false) {
			document.frmPAC.phone.focus();
			return false;
	}
        if (document.frmPAC.email.value.length==0)
        {
	     alert("Please enter your E-Mail address");
	     document.frmPAC.email.focus();
	     return false;
	}  

	if (document.frmPAC.email.value.length>0){ 
	document.frmPAC.email.value = NonSpace(document.frmPAC.email.value);
	 
	if (isEmail(document.frmPAC.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.frmPAC.email.focus();
			return false;
	}  
	}
        if (isWhitespace(document.frmPAC.chargetotal.value) || document.frmPAC.chargetotal.value=="0")
        {
	     alert("Please enter amount to contribute");
	     document.frmPAC.chargetotal.focus();
	     return false;
	}  
           
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validGolf    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validGolf() {
	
        if ((isWhitespace(document.frmEV.p1name.value)) && (isWhitespace(document.frmEV.p2name.value)) && (isWhitespace(document.frmEV.p3name.value)) && (isWhitespace(document.frmEV.p4name.value)))
        {
             alert("Please enter at least one player's name");
             document.frmEV.p1name.focus();
             return false;
        }

        if (!(isWhitespace(document.frmEV.p1name.value)))
        {
             if (isWhitespace(document.frmEV.p1comp.value))
             {
                  alert("Please enter Company for Player #1");
                  document.frmEV.p1comp.focus();
                  return false;
             }
             if (isWhitespace(document.frmEV.p1phone.value))
             {
                  alert("Please enter Phone for Player #1");
                  document.frmEV.p1phone.focus();
                  return false;
             }
             if (IsPhone(document.frmEV.p1phone.value)==false) {
	          document.frmEV.p1phone.focus();
                  return false;
             }
             if (isWhitespace(document.frmEV.p1hndcp.value))
             {
                  alert("Please enter Handicap for Player #1");
                  document.frmEV.p1hndcp.focus();
                  return false;
             }
        }

        if (!(isWhitespace(document.frmEV.p2name.value)))
        {
             if (isWhitespace(document.frmEV.p2comp.value))
             {
                  alert("Please enter Company for Player #2");
                  document.frmEV.p2comp.focus();
                  return false;
             }
             if (isWhitespace(document.frmEV.p2phone.value))
             {
                  alert("Please enter Phone for Player #2");
                  document.frmEV.p2phone.focus();
                  return false;
             }
             if (IsPhone(document.frmEV.p2phone.value)==false) {
	          document.frmEV.p2phone.focus();
                  return false;
             }
             if (isWhitespace(document.frmEV.p2hndcp.value))
             {
                  alert("Please enter Handicap for Player #2");
                  document.frmEV.p2hndcp.focus();
                  return false;
             }
        }

        if (!(isWhitespace(document.frmEV.p3name.value)))
        {
             if (isWhitespace(document.frmEV.p3comp.value))
             {
                  alert("Please enter Company for Player #3");
                  document.frmEV.p3comp.focus();
                  return false;
             }
             if (isWhitespace(document.frmEV.p3phone.value))
             {
                  alert("Please enter Phone for Player #3");
                  document.frmEV.p3phone.focus();
                  return false;
             }
             if (IsPhone(document.frmEV.p3phone.value)==false) {
	          document.frmEV.p3phone.focus();
                  return false;
             }
             if (isWhitespace(document.frmEV.p3hndcp.value))
             {
                  alert("Please enter Handicap for Player #3");
                  document.frmEV.p3hndcp.focus();
                  return false;
             }
        }

        if (!(isWhitespace(document.frmEV.p4name.value)))
        {
             if (isWhitespace(document.frmEV.p4comp.value))
             {
                  alert("Please enter Company for Player #4");
                  document.frmEV.p4comp.focus();
                  return false;
             }
             if (isWhitespace(document.frmEV.p4phone.value))
             {
                  alert("Please enter Phone for Player #4");
                  document.frmEV.p4phone.focus();
                  return false;
             }
             if (IsPhone(document.frmEV.p4phone.value)==false) {
	          document.frmEV.p4phone.focus();
                  return false;
             }
             if (isWhitespace(document.frmEV.p4hndcp.value))
             {
                  alert("Please enter Handicap for Player #4");
                  document.frmEV.p4hndcp.focus();
                  return false;
             }
        }

	if (document.frmEV.mycode.value=="1"){ 
	if ( (document.frmEV.EvtID.options[document.frmEV.EvtID.options.selectedIndex].value)=="0")
	{
	     alert("Please enter Class!");
	     document.frmEV.EvtID.focus();
	     return false;
	}  
	}
	if (isWhitespace(document.frmEV.fname.value)) 
	{
	     alert("Please enter First Name in card holder's information");
	     document.frmEV.fname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmEV.lname.value)) 
	{
	     alert("Please enter Last Name in card holder's information");
	     document.frmEV.lname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmEV.cname.value)) 
	{
	     alert("Please enter Company Name in card holder's information");
	     document.frmEV.cname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmEV.address1.value)) 
	{
	     alert("Please enter Address in card holder's information");
	     document.frmEV.address1.focus();
	     return false;
	}  
	if (isWhitespace(document.frmEV.city.value)) 
	{
	     alert("Please enter City in card holder's information");
	     document.frmEV.city.focus();
	     return false;
	}  
	if (isWhitespace(document.frmEV.zipCode.value)) 
	{
	     alert("Please enter Zip Code in card holder's information");
	     document.frmEV.zipCode.focus();
	     return false;
	} 
	 if (validateZIP(document.frmEV.zipCode)==false) {
			document.frmEV.zipCode.focus();
			return false;
	}
	if (isWhitespace(document.frmEV.telephone.value)) 
	{
	     alert("Please enter Telephone in card holder's information");
	     document.frmEV.telephone.focus();
	     return false;
	}  
	if (IsPhone(document.frmEV.telephone.value)==false) {
			document.frmEV.telephone.focus();
			return false;
	}
	if (document.frmEV.fax.value.length>0){ 
	if (IsFax(document.frmEV.fax.value)==false) {
			document.frmEV.fax.focus();
			return false;
	}
	
	}
	if (isWhitespace(document.frmEV.email.value)) 
	{
	     alert("Please enter email in card holder's information");
	     document.frmEV.email.focus();
	     return false;
	} 
	if (document.frmEV.email.value.length>0){ 
	document.frmEV.email.value = NonSpace(document.frmEV.email.value);
	 
	if (isEmail(document.frmEV.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.frmEV.email.focus();
			return false;
	}  
	}

	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validLN()    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validLN() {


	if (document.forms[0].legnet.checked == false){
				alert ("Please Accept To Join TAMB Legislative Network ! ");
				document.forms[0].legnet.focus();
				return false ;
			}
	 

	if (isWhitespace(document.frmNL.name.value)) 
	{
	     alert("Please enter Your Name !");
	     document.frmNL.name.focus();
	     return false;
	}  
	
	if (isWhitespace(document.frmNL.firm.value)) 
	{
	     alert("Please enter Company Name !");
	     document.frmNL.firm.focus();
	     return false;
	}  
	if (isWhitespace(document.frmNL.address.value)) 
	{
	     alert("Please enter Address !");
	     document.frmNL.address.focus();
	     return false;
	}  
	if (isWhitespace(document.frmNL.csz.value)) 
	{
	     alert("Please enter City/State/Zip !");
	     document.frmNL.csz.focus();
	     return false;
	}  
	if (isWhitespace(document.frmNL.phone.value)) 
	{
	     alert("Please enter Telephone !");
	     document.frmNL.phone.focus();
	     return false;
	}  
	if (IsPhone(document.frmNL.phone.value)==false) {
			document.frmNL.phone.focus();
			return false;
	}
	
	if (isWhitespace(document.frmNL.email.value)) 
	{
	     alert("Please enter Your Email !");
	     document.frmNL.email.focus();
	     return false;
	}  
	if (document.frmNL.email.value.length>0){ 
	document.frmNL.email.value = NonSpace(document.frmNL.email.value);
	if (isEmail(document.frmNL.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.frmNL.email.focus();
			return false;
	}  
	}
	if (isWhitespace(document.frmNL.precinct.value)) 
	{
	     alert("Please enter Precinct !");
	     document.frmNL.precinct.focus();
	     return false;
	} 
	
		if (isWhitespace(document.frmNL.us.value)) 
	{
	     alert("Please enter US Cong Dist !");
	     document.frmNL.us.focus();
	     return false;
	}  
	if (isWhitespace(document.frmNL.sen.value)) 
	{
	     alert("Please enter State Sen Dist !");
	     document.frmNL.sen.focus();
	     return false;
	}  
	if (isWhitespace(document.frmNL.leg.value)) 
	{
	     alert("Please enter State Leg Dist !");
	     document.frmNL.leg.focus();
	     return false;
	}  
	
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validAdv    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validAdv() {

	if (isWhitespace(document.frmAdv.fname.value)) 
	{
	     alert("Please enter First Name");
	     document.frmAdv.fname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmAdv.lname.value)) 
	{
	     alert("Please enter Last Name");
	     document.frmAdv.lname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmAdv.cname.value)) 
	{
	     alert("Please enter Company Name");
	     document.frmAdv.cname.focus();
	     return false;
	}  
	if (isWhitespace(document.frmAdv.address1.value)) 
	{
	     alert("Please enter Address ");
	     document.frmAdv.address1.focus();
	     return false;
	}  
	if (isWhitespace(document.frmAdv.city.value)) 
	{
	     alert("Please enter City");
	     document.frmAdv.city.focus();
	     return false;
	}  
	if (isWhitespace(document.frmAdv.telephone.value)) 
	{
	     alert("Please enter Telephone ");
	     document.frmAdv.telephone.focus();
	     return false;
	}  
	if (IsPhone(document.frmAdv.telephone.value)==false) {
			document.frmAdv.telephone.focus();
			return false;
	}
	
	if (isWhitespace(document.frmAdv.email.value)) 
	{
	     alert("Please enter email ");
	     document.frmAdv.email.focus();
	     return false;
	}  
	if (document.frmAdv.email.value.length>0){ 
	document.frmAdv.email.value = NonSpace(document.frmAdv.email.value);
	
	if (isEmail(document.frmAdv.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.frmAdv.email.focus();
			return false;
	} 
	} 
	if (isWhitespace(document.frmAdv.comments.value)) 
	{
	     alert("Please enter Comments ");
	     document.frmAdv.comments.focus();
	     return false;
	}  

	 return true;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~  ValidMember   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidMember() {

	if (isWhitespace(document.myform.MAccountName.value)) 
	{
	     alert("Please enter  Account Name  ");
	     document.myform.MAccountName.focus();
	     return false;
	}  

	if (document.myform.MAccountName.value.length < 4) 
	{
	     alert("The Minimum length for Account Name should be 4 !");
	     document.myform.MAccountName.focus();
	     return false;
	 }

	if (isWhitespace(document.myform.MAccountPassword.value)) 
	{
	     alert("Please enter  Password ");
	     document.myform.MAccountPassword.focus();
	     return false;
	}  
	 if (document.myform.MAccountPassword.value.length < 6) 
	 {
	     alert("The Minimum length for Password should be 6 !");
	     document.myform.MAccountPassword.focus();
	     return false;
	 }
	 
	 
	if ( (document.myform.MDFWAMBCodeTypeID.options[document.myform.MDFWAMBCodeTypeID.options.selectedIndex].value)=="0")
	{
			alert("Please enter DFWAMB Membership Type ");
			document.myform.MDFWAMBCodeTypeID.focus();
			return false;
	}
	if ( (document.myform.MBussTypeID.options[document.myform.MBussTypeID.options.selectedIndex].value)=="0")
	{
			alert("Please enter Business Type ");
			document.myform.MBussTypeID.focus();
			return false;
	}
	if (isWhitespace(document.myform.MFirstName.value)) 
	{
			alert("Please enter  First Name  ");
			document.myform.MFirstName.focus();
			return false;
	}

	if (document.myform.MFirstName.value.length < 3) 
	{
			alert("Please enter a valid  First Name ");
			document.myform.MFirstName.focus();
			return false;
	}
	  
	if (isWhitespace(document.myform.MLastName.value)) 
	{
			alert("Please enter  Last Name  ");
			document.myform.MLastName.focus();
			return false;
	}

	if (document.myform.MLastName.value.length  < 3) 
	{
			alert("Please enter a valid  Last Name ");
			document.myform.MLastName.focus();
			return false;
	}
	if (isWhitespace(document.myform.MCompanyName.value)) 
	{
			alert("Please enter Company Name ");
			document.myform.MCompanyName.focus();
			return false;
	}	
	if (isWhitespace(document.myform.MBusAddress1.value)) 
	{
			alert("Please enter Address ");
			document.myform.MBusAddress1.focus();
			return false;
	}	
	if (isWhitespace(document.myform.MBusCity.value)) 
	{
			alert("Please enter City ");
			document.myform.MBusCity.focus();
			return false;
	}	
	if (isWhitespace(document.myform.MBusZip.value)) 
	{
			alert("Please enter Zip Code ");
			document.myform.MBusZip.focus();
			return false;
	}
	 if (validateZIP(document.myform.MBusZip)==false) {
			document.myform.MBusZip.focus();
			return false;
	}
	if (document.myform.MHomeZip.value.length>0){ 
	 if (validateZIP(document.myform.MHomeZip)==false) {
				document.myform.MHomeZip.focus();
				return false;
	} 
	}
	if (document.myform.MMAILZip.value.length>0){ 
	 if (validateZIP(document.myform.MMAILZip)==false) {
				document.myform.MMAILZip.focus();
				return false;
	} 
	}
	if (isWhitespace(document.myform.MPhone1.value)) {
			alert("Please enter Phone No ");
			document.myform.MPhone1.focus();
			return false;
	}
	if (isNumber1(document.myform.MPhone1.value)==false) {
			document.myform.MPhone1.focus();
			return false;
	}
	if (document.myform.MPhone1.value.length  < 3) 
	{
			alert("Please enter 3 numbers! ");
			document.myform.MPhone1.focus();
			return false;
	}	
	if (isWhitespace(document.myform.MPhone2.value)) {
			alert("Please enter Phone No ");
			document.myform.MPhone2.focus();
			return false;
	}
	if (isNumber1(document.myform.MPhone2.value)==false) {
			document.myform.MPhone2.focus();
			return false;
	}
	if (document.myform.MPhone2.value.length  < 3) 
	{
			alert("Please enter 3 numbers! ");
			document.myform.MPhone2.focus();
			return false;
	}
	if (isWhitespace(document.myform.MPhone3.value)) {
			alert("Please enter Phone No ");
			document.myform.MPhone3.focus();
			return false;
	}
	if (isNumber1(document.myform.MPhone3.value)==false) {
			document.myform.MPhone3.focus();
			return false;
	}
	if (document.myform.MPhone3.value.length  < 4) 
	{
			alert("Please enter 4 numbers! ");
			document.myform.MPhone3.focus();
			return false;
	}	
	
	
	if (document.myform.MFax1.value.length> 0){
	if (isWhitespace(document.myform.MFax1.value)) {
			alert("Please enter Fax No ");
			document.myform.MFax1.focus();
			return false;
	}	
	}
	if (document.myform.MFax1.value.length> 0){
	if (isNumber1(document.myform.MFax1.value)==false) {
			document.myform.MFax1.focus();
			return false;
	}
	}
	if (document.myform.MFax1.value.length> 0){
	if (document.myform.MFax1.value.length  < 3) {
			alert("Please enter 3 numbers! ");
			document.myform.MFax1.focus();
			return false;
	}	
	}
	if (document.myform.MFax1.value.length> 0){
	if (isWhitespace(document.myform.MFax2.value)) {
			alert("Please enter Fax No ");
			document.myform.MFax2.focus();
			return false;
	}
	}	
	if (document.myform.MFax2.value.length> 0){
	if (isNumber1(document.myform.MFax2.value)==false) {
			document.myform.MFax2.focus();
			return false;
	}
	}
	if (document.myform.MFax2.value.length> 0){
	if (document.myform.MFax2.value.length  < 3) {
			alert("Please enter 3 numbers! ");
			document.myform.MFax2.focus();
			return false;
	}	
	}
	
	if (document.myform.MFax2.value.length> 0){
	if (isWhitespace(document.myform.MFax3.value)) {
			alert("Please enter Fax No ");
			document.myform.MFax3.focus();
			return false;
	}	
	}
	if (document.myform.MFax3.value.length> 0){
	if (isNumber1(document.myform.MFax3.value)==false) {
			document.myform.MFax3.focus();
			return false;
	}
	}
	if (document.myform.MFax3.value.length> 0){
	if (document.myform.MFax3.value.length  < 3) {
			alert("Please enter 3 numbers! ");
			document.myform.MFax3.focus();
			return false;
	}	
	}
	if (isWhitespace(document.myform.MEmail.value)) 
	{
			alert("Please enter Email Address");
			document.myform.MEmail.focus();
			return false;
	}	
	if (document.myform.MEmail.value.length>0){ 
	document.myform.MEmail.value = NonSpace(document.myform.MEmail.value);

	if (isEmail(document.myform.MEmail.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.MEmail.focus();
			return false;
	}
	}
	
	document.myform.sCMD.value = "upd";
	return true;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      ValidExhibitors      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidExhibitors() {
	if (isWhitespace(document.myform.ExCompany.value)) 
	{
	     alert("Please enter  Company ");
	     document.myform.ExCompany.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.ExFirstName.value)) 
	{
	     alert("Please enter First Name ");
	     document.myform.ExFirstName.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.ExLastName.value)) 
	{
	     alert("Please enter Last Name ");
	     document.myform.ExLastName.focus();
	     return false;
	}  	
	if ( (document.myform.ExStateID.options[document.myform.ExStateID.options.selectedIndex].value)=="0")
	{
			alert("Please enter State");
			document.myform.ExStateID.focus();
			return false;
	}
	if (isWhitespace(document.myform.ExCity.value)) 
	{
	     alert("Please enter City ");
	     document.myform.ExCity.focus();
	     return false;
	}  	
	if (document.myform.ExZip.value.length>0){ 
	 if (validateZIP(document.myform.ExZip)==false) {
				document.myform.ExZip.focus();
				return false;
	} 
	}
	if (document.myform.ExPhone.value.length>0){ 
	if (IsPhone(document.myform.ExPhone.value)==false) {
			document.myform.ExPhone.focus();
			return false;
	}
	}	
	if (document.myform.ExFax.value.length>0){ 
	if (IsFax(document.myform.ExFax.value)==false) {
			document.myform.ExFax.focus();
			return false;
	}
	}
	if (document.myform.ExEmail.value.length>0){ 
	document.myform.ExEmail.value = NonSpace(document.myform.ExEmail.value);
	if (isEmail(document.myform.ExEmail.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.ExEmail.focus();
			return false;
	}
	}
	document.myform.sCMD.value = "upd";
	 return true;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      ValidAttendees      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidAttendees() {
	if (isWhitespace(document.myform.AttCompany.value)) 
	{
	     alert("Please enter  Company ");
	     document.myform.AttCompany.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.AttFirstName.value)) 
	{
	     alert("Please enter First Name ");
	     document.myform.AttFirstName.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.AttLastName.value)) 
	{
	     alert("Please enter  Last Name ");
	     document.myform.AttLastName.focus();
	     return false;
	}  	

	if ( (document.myform.AttStateID.options[document.myform.AttStateID.options.selectedIndex].value)=="0")
	{
			alert("Please enter State");
			document.myform.AttStateID.focus();
			return false;
	}
	if (document.myform.AttZip.value.length>0){ 
	 if (validateZIP(document.myform.AttZip)==false) {
				document.myform.AttZip.focus();
				return false;
	} 
	}
	if (document.myform.AttPhone.value.length>0){ 
	if (IsPhone(document.myform.AttPhone.value)==false) {
			document.myform.AttPhone.focus();
			return false;
	}
	}	
	if (document.myform.AttFax.value.length>0){ 
	if (IsFax(document.myform.AttFax.value)==false) {
			document.myform.AttFax.focus();
			return false;
	}
	}
	if (document.myform.AttEmail.value.length>0){ 
	document.myform.AttEmail.value = NonSpace(document.myform.AttEmail.value);
	if (isEmail(document.myform.AttEmail.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.AttEmail.focus();
			return false;
	}
	}
	document.myform.sCMD.value = "upd";
	 return true;
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~  ValidCustomerX   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidCustomerX() {

	if ( (document.frmSite.CustomerSalutation.options[document.frmSite.CustomerSalutation.options.selectedIndex].value)=="0")
	{
			alert("Please enter Salutation  ");
			document.frmSite.CustomerSalutation.focus();
			return false;
	}

	if (isWhitespace(document.frmSite.CustomerFirstName.value)) 
	{
			alert("Please enter  First Name  ");
			document.frmSite.CustomerFirstName.focus();
			return false;
	}

	if (document.frmSite.CustomerFirstName.value.length ==1) 
	{
			alert("Please enter a valid  First Name ");
			document.frmSite.CustomerFirstName.focus();
			return false;
	}
	  
	if (isWhitespace(document.frmSite.CustomerLastName.value)) 
	{
			alert("Please enter  Last Name  ");
			document.frmSite.CustomerLastName.focus();
			return false;
	}

	if (document.frmSite.CustomerLastName.value.length ==1) 
	{
			alert("Please enter a valid  Last Name ");
			document.frmSite.CustomerLastName.focus();
			return false;
	}
	if (isWhitespace(document.frmSite.CustomerCompanyName.value)) 
	{
			alert("Please enter a valid Company Name ");
			document.frmSite.CustomerCompanyName.focus();
			return false;
	}	
	if (document.frmSite.width.value > 0)	{
		if (document.frmSite.width.value > 114) {
	     alert("The width of  Image is too big! ");
	     document.frmSite.width.focus();
	     return false;
		}
	}  
	if (document.frmSite.height.value > 0)	{
		if (document.frmSite.height.value > 84) {
	     alert("The height of  Image is too big!");
	     document.frmSite.height.focus();
	     return false;
		}
	}  		
	if (document.frmSite.CustomerAddress1.value.length <2) 
	{
			alert("Please enter  Address ");
			document.frmSite.CustomerAddress1.focus();
			return false;
	}

	if (isWhitespace(document.frmSite.CustomerCity.value)) 
	{
			alert("Please enter  City ");
			document.frmSite.CustomerCity.focus();
			return false;
	}
	if (isWhitespace(document.frmSite.CustomerZip.value)) 
	{
			alert("Please enter Zip Code ");
			document.frmSite.CustomerZip.focus();
			return false;
	}

	 if (validateZIP(document.frmSite.CustomerZip)==false) {
				document.frmSite.CustomerZip.focus();
				return false;
	} 
	if (isWhitespace(document.frmSite.CustomerPhone.value)) 
	{
			alert("Please enter Phone No ");
			document.frmSite.CustomerPhone.focus();
			return false;
	}	
	if (IsPhone(document.frmSite.CustomerPhone.value)==false) {
			document.frmSite.CustomerPhone.focus();
			return false;
	}
	  if (document.frmSite.CustomerFax.value.length > 0) {
			if (IsFax(document.frmSite.CustomerFax.value)==false) {
					document.frmSite.CustomerFax.focus();
					return false;
			}
	 }	
	if (isWhitespace(document.frmSite.CustomerAccountName.value)) 
	{
	     alert("Please enter  Account Name  ");
	     document.frmSite.CustomerAccountName.focus();
	     return false;
	}  

	if (document.frmSite.CustomerAccountName.value.length < 4) 
	{
	     alert("The Minimum length for Account Name should be 4 !");
	     document.frmSite.CustomerAccountName.focus();
	     return false;
	 }

	if (isWhitespace(document.frmSite.CustomerPassword.value)) 
	{
	     alert("Please enter  Password ");
	     document.frmSite.CustomerPassword.focus();
	     return false;
	}  
	 if (document.frmSite.CustomerPassword.value.length < 6) 
	 {
	     alert("The Minimum length for Password should be 6 !");
	     document.frmSite.CustomerPassword.focus();
	     return false;
	 }
	 
	if (isWhitespace(document.frmSite.ConfirmPassword.value)) 
	{
	     alert("Please Confirm Password ");
	     document.frmSite.ConfirmPassword.focus();
	     return false;
	} 	 
	 if (document.frmSite.ConfirmPassword.value.length < 6) 
	 {
	     alert("The Minimum length for Password should be 6 !");
	     document.frmSite.ConfirmPassword.focus();
	     return false;
	 }	 
	 
	 if (document.frmSite.ConfirmPassword.value != document.frmSite.CustomerPassword.value ) 
	 {
	     alert("Passwords does not match!");
	     document.frmSite.ConfirmPassword.focus();
	     return false;
	 }	 
	 	 
 
	document.frmSite.sCMD.value = "upd";
	return true;
}

//____________________________________________________________________________________
//_____________     ValidMessage      ________________________________________________

function ValidMessage() {
	if (isWhitespace(document.myform.Subject.value)) 
	{
	     alert("Please enter Subject! ");
	     document.myform.Subject.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.xText.value)) 
	{
	     alert("Please enter Message Text! ");
	     document.myform.xText.focus();
	     return false;
	}  
	 return true;
}



//____________________________________________________________________________________
//___________    ValidForum    _______________________________________________________

function ValidForum() {
	if (isWhitespace(document.myform.ForumName.value)) 
	{
	     alert("Please enter Forum Name!");
	     document.myform.ForumName.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.ForumDescription.value)) 
	{
	     alert("Please enter Forum Description!");
	     document.myform.ForumDescription.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.ForumStartDate.value)) 
	{
	     alert("Please enter Forum Start Date!");
	     document.myform.ForumStartDate.focus();
	     return false;
	}  	
	
	if (document.myform.ID.value==0) {
	if (isWhitespace(document.myform.Subject.value)) 
	{
	     alert("Please enter Subject! ");
	     document.myform.Subject.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.xText.value)) 
	{
	     alert("Please enter Message Text! ");
	     document.myform.xText.focus();
	     return false;
	}  
	if ( (document.myform.Moderator.options[document.myform.Moderator.options.selectedIndex].value)=="0")
	{
			alert("Please enter Moderator");
			document.myform.Moderator.focus();
			return false;
	}
	}
	
	 return true;
}

//____________________________________________________________________________________
//_____________     ValidSend      ________________________________________________

function ValidSend() {
	if (isWhitespace(document.myform.Email.value)) 
	{
			alert("Please enter Your Email Address");
			document.myform.Email.focus();
			return false;
	}	
	document.myform.Email.value = NonSpace(document.myform.Email.value);

	if (isEmail(document.myform.Email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.Email.focus();
			return false;
	}
	if (isWhitespace(document.myform.REmail.value)) 
	{
			alert("Please enter Recipient's Email Address");
			document.myform.REmail.focus();
			return false;
	}	
	document.myform.REmail.value = NonSpace(document.myform.REmail.value);

	if (isEmail(document.myform.REmail.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.REmail.focus();
			return false;
	}
	
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validF    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validF() {

	if (isWhitespace(document.myform.fname.value)) 
	{
	     alert("Please enter First Name");
	     document.myform.fname.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.lname.value)) 
	{
	     alert("Please enter Last Name");
	     document.myform.lname.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.cname.value)) 
	{
	     alert("Please enter Company Name");
	     document.myform.cname.focus();
	     return false;
	}  
	if (isWhitespace(document.myform.email.value)) 
	{
	     alert("Please enter email ");
	     document.myform.email.focus();
	     return false;
	} 
	if (document.myform.email.value.length>0){ 
	document.myform.email.value = NonSpace(document.myform.email.value);
	 
	if (isEmail(document.myform.email.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.email.focus();
			return false;
	}  
	}
	if (isWhitespace(document.myform.xText.value)) 
	{
	     alert("Please enter Company Name");
	     document.myform.xText.focus();
	     return false;
	}  
		
	 return true;
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      NonSpace      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function NonSpace(field) {

	var xpos =0;
	var xlen =field.length;
	var xpos1 =0;
	var xpos2 =xlen;

	for (var i=0; i < xlen; i++) {
		temp = "" + field.substring(i, i+1);
		if (temp == " ") {xpos++;}
		else {var xpos1=xpos;break;  }
	}
	field = field.substring(xpos1, xlen)
	var xlen1 = field.length;

	for (var i=0; i < xlen1; i++) {
		temp = "" + field.substring(i, i+1);
		if (temp != " ") {xpos1++;}
		else {xpos2=i;break;  }
	}
	field = field.substring(0, xpos2)
	return field;
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      IsChar      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


var mikExp = /[$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\|]/;

function IsChar(val) {
var strPass = val.value;
var strLength = strPass.length;
var lchar = val.value.charAt((strLength) - 1);
if(lchar.search(mikExp) != -1) {
var tst = val.value.substring(0, (strLength) - 1);
val.value = tst;
   }
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~   IsChara   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function IsChara(form) {
if(form.value.length < 1) {
alert("Please fill this field; cannot be empty.");
return false;
}
if(form.value.search(mikExp) == -1) {
return true;
}
else {
alert("Sorry, but the following characters\n\r\n\r@ $ % ^ & * # ( ) [ ] \\ { + } ` ~ =  | \n\r\n\rare not allowed!\n");
form.select();
form.focus();
return false;
}
return true;
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~   Valid_Date   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




function Valid_Date(datein){
        
        var indate=datein;
        if (indate.indexOf("-")!=-1){
                var sdate = indate.split("-")
        }
        else {
                var sdate = indate.split("/")
        }
        var chkDate=new Date(Date.parse(indate))
        var cmpDate=(chkDate.getMonth()+1)+"/"+(chkDate.getDate())+"/"+(chkDate.getFullYear())
        var indate2=(Math.abs(sdate[0]))+"/"+(Math.abs(sdate[1]))+"/"+(Math.abs(sdate[2]))

		if ((chkDate.getFullYear() > 3000)||(chkDate.getFullYear() < 1900)) {
                alert("You've entered an invalid year");
				return false;
		}				
		if ((Math.abs(sdate[2]) > 3000)||(Math.abs(sdate[2])< 1900)) {
                alert("You've entered an invalid year");
				return false;
		}				


   if (indate2=="0/NaN/NaN"){
				return true;
   }        
	else {
 		
        if (indate2!=cmpDate){
                alert("You've entered an invalid date or date format.  Please use the MM/DD/YYYY format.");
				return false;
        }
        else {
                if (cmpDate=="NaN/NaN/NaN"){
                        alert("You've entered an invalid date or date format. Please use the MM/DD/YYYY format.");
						return false;
                }
                else {
						return true;
                }       
        }
}        
}







//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     isEmail      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
        return true;
    else
        return false;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     IsPhone      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function IsPhone(str)          // is phone str valid
    {
    if (str.length != 12) 
              // nope - wrong str length
		{
		alert('Invalid PhoneNo. Must be in the form NNN-NNN-NNNN.');
		return false;
	}		
  for (i=0; i<12; i++)
    {
    if (i == 3 || i == 7)
    {
      if (str.charAt(i) != "-")     // nope - "-" missing
			{
			alert(' Missing - . PhoneNo  must be in the form NNN-NNN-NNNN.');
			return false;
			}
	}		
	else
    {
      if (!isNum(str.charAt(i)))
		{
		alert('Non-numeric characters. PhoneNo must be in the form NNN-NNN-NNNN.');
		return false;
		}
	}		
  }
  return true;                     

}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     IsFax      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function IsFax(str)          // is Fax str valid
    {
    if (str.length != 12) 
              // nope - wrong str length
		{
		alert('Invalid FaxNo. Must be in the form NNN-NNN-NNNN.');
		return false;
	}		
  for (i=0; i<12; i++)
    {
    if (i == 3 || i == 7)
    {
      if (str.charAt(i) != "-")     // nope - "-" missing
			{
			alert(' Missing - . FaxNo  must be in the form NNN-NNN-NNNN.');
			return false;
			}
	}		
	else
    {
      if (!isNum(str.charAt(i)))
		{
		alert('Non-numeric characters. FaxNo must be in the form NNN-NNN-NNNN.');
		return false;
		}
	}		
  }
  return true;                     

}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validateZIP      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


function validateZIP(field) {
var valid = "0123456789-";
var hyphencount = 0;

if (field.value.length!=5 && field.value.length!=10) {
alert("Please enter your 5 digit or ( 5 + 4 ) digit  ZIP  code.");
return false;
}
for (var i=0; i < field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your ZIP code.  Please try again.");
return false;
}
if ((hyphencount > 1) || ((field.value.length==10) && ""+field.value.charAt(5)!="-")) {
alert("The hyphen character should be used with a properly formatted 5 digit+four  ZIP  code, like '12345-6789'.   Please try again.");
return false;
   }
}
return true;
}



function isNum(chr)            // is character a number?
  {
  if (chr < "0" || chr > "9")  // nope
    return false;
  else                         // yep
    return true;
  }



function isNumber(InString)  {
        RefString="123456789";

        for (Count=0; Count < InString.length; Count++)  {
            TempChar= InString.substring (Count, Count+1);
            if (RefString.indexOf (TempChar, 0)==-1) { 
				alert("Please enter numbers only: 1 - 9 ");
				return false;
			}
		}
        return true;
}

function isNumber1(InString)  {
        RefString="0123456789";

        for (Count=0; Count < InString.length; Count++)  {
            TempChar= InString.substring (Count, Count+1);
            if (RefString.indexOf (TempChar, 0)==-1) { 
				alert("Please enter numbers only: 0 - 9 ");
				return false;
			}
		}
        return true;
}

function isNumber2(InString)  {
        RefString="0123456789-";

        for (Count=0; Count < InString.length; Count++)  {
            TempChar= InString.substring (Count, Count+1);
            if (RefString.indexOf (TempChar, 0)==-1) { 
				alert("Please enter a valid Member ID");
				return false;
			}
		}
        return true;
}

function validateam(field) {
var valid = "123456789:";
var sep = 0;

if (field.value.length <4) {
alert("The GenericTime shall be at least 4 chars long.");
return false;
}
for (var i=0; i < field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (temp == ":") sep++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your GenericTime.  Please try again.");
return false;
}
if ((sep > 1) || ((field.value.length==5) && ""+field.value.charAt(2)!=":")) {
alert("The ':' character should be used with a properly format, like 7:00.   Please try again.");
return false;
   }
if ((sep > 1) || ((field.value.length==4) && ""+field.value.charAt(1)!=":")) {
alert("The ':' character should be used with a properly format, like 7:00.   Please try again.");
return false;
   }
}
return true;
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validateW      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


function validateW(field) {
var valid = "0123456789.";
var hyphencount = 0;


for (var i=0; i < field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);

if (temp == ".") hyphencount++;
	if (valid.indexOf(temp) == "-1") {
	alert("Invalid characters.\n You must type only decimal numbers less than 1.");
	return false;
	}
}
if (field.value >= 1) {
	alert("You must type only decimal numbers less than 1.");
	return false;
}


return true;
}

var reWhitespace = /^\s+$/
// warnEmpty (theField, s)             Notify user that required field theField is empty.


// Notify user that required field theField is empty.
// String s describes expected contents of theField.value.
// Put focus in theField and return false.

function warnEmpty (theField, s)
{   theField.focus()
    alert(mPrefix + s + mSuffix)
    return false
}



// Check whether string s is empty.

function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}



// Returns true if string s is empty or 
// whitespace characters only.

function isWhitespace (s)

{   // Is s empty?
//    return (isEmpty(s));
    return (isEmpty(s) || reWhitespace.test(s));
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goSort      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goSort(url,sSortBy,sSortOrd)
{
//		document.forms[0].sCMD.value = "sort";
		document.forms[0].action = url;
		document.forms[0].SortBy.value  = sSortBy;
		document.forms[0].SortOrd.value = sSortOrd;

		document.forms[0].submit( );
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~   DelConf   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function DelConf(url)   {
	if (confirm("This Record will be deleted! Are you sure !?"))
		{
		document.forms[0].sCMD.value = "del";
		document.forms[0].action = url;

		document.forms[0].submit();
		}
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goRefresh      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goRefresh(url)   
{

		document.forms[0].sCMD.value = "";
		document.forms[0].action = url;
		document.forms[0].submit();
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goDel      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goDel(url,ID)   
{
	if (confirm("This Record will be deleted! Are you sure !?"))
		{
		document.forms[0].sCMD.value = "del";
		document.forms[0].ID.value = ID;
		document.forms[0].action = url;
		document.forms[0].submit();
		}
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goMod      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goMod(url,ID)   
{
		document.forms[0].sCMD.value = "edit";
		document.forms[0].action = url;
		document.forms[0].ID.value = ID;
		document.forms[0].submit();
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goAdd      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goAdd(url)   
{

		document.forms[0].sCMD.value = "add";
		document.forms[0].ID.value = "";
		document.forms[0].action = url;
		document.forms[0].submit();
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goSubm      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goSubm(url,xID,yID)
{
		document.forms[0].TemplateID.value = xID;
		document.forms[0].ColorID.value = yID;
		document.forms[0].action = url;
		document.forms[0].submit();
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goPage      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goPage(xpage)   
{
//		document.frmTemp1.sCMD.value = "upd";
		document.frmTemp1.page.value  = xpage;
//		document.frmTemp1.sSQL.value = sSQL;
		document.frmTemp1.submit();
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goPageB      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goPageB(xpage,sorder)   
{
//		document.frmTemp1.sCMD.value = "upd";
		document.frmTemp1.page.value  = xpage;
//		document.frmTemp1.sSQL.value = sSQL;
		document.frmTemp1.submit();
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goPageM      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goPageM(xpage)   
{
//		document.frmTemp1.sCMD.value = "upd";
		document.frmTemp1.page.value  = xpage;
//		document.frmTemp1.sSQL.value = sSQL;
		document.frmTemp1.submit();
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goSubmit      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goSubmit(xAction)
{
		document.myform.sCMD.value = xAction;
		document.myform.action = "Login.asp";
		document.myform.submit( );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goSubmitM      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goSubmitM(xAction)
{
		document.myform.sCMD.value = xAction;
		document.myform.action = "Login.asp";
		document.myform.submit( );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     doSubmit      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function doSubmit(xdate)
{
		document.myform.mydate.value = xdate;
		document.myform.action = "EvCalendar.asp";
		document.myform.submit( );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     doSubmitM      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function doSubmitM(xdate,xid)
{
		document.myform.mydate.value = xdate;
		document.myform.action = "ClassSchedule.asp";
		document.myform.submit( );
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     doLogin     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function doLogin(xID)
{
	if (document.myform.MemberID.value==0) 
	{
			alert("You have to login in order to access the forums!");
			document.myform.IDD.focus();
			return false;
	}	
		document.myform.ID.value = xID;
		document.myform.action = "ForumMessages.asp";
		document.myform.submit( );

}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goPost     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goPost(xParent,xLevel,xThread,xUrl)
{
	document.myform.Parent.value = xParent;
	document.myform.Level.value = xLevel;
	document.myform.Thread.value = xThread;
	document.myform.xFrom.value = xUrl;
	document.myform.action = "ForumMessagePost.asp";
	document.myform.submit( );

}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      getExtension      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function getExtension(field) {
	var xpos =0;
	var xlen =field.length;
	for (var i=xlen; i > 0 ; i--) {
		temp = "" + field.substring(i, i-1);
		if (temp != ".") {xpos--;}
			else {break;
		}
	}
	return (field.substring(xlen+xpos, xlen));
}



function ovrRow(eItem)
{
	eItem.DefaultBgColor=eItem.style.backgroundColor;
	eItem.style.backgroundColor="#CCCC99";		green
	
	eItem.style.cursor="hand"
}

function outRow(eItem)
{
	eItem.style.backgroundColor=eItem.DefaultBgColor;
	eItem.style.cursor="hand"
}

function ovrTD(Item,col_mover)
{
	Item.style.backgroundColor=col_mover;	

	Item.style.cursor="hand"
}

function outTD(Item,col_mout)
{
	Item.style.backgroundColor=col_mout; 
	Item.style.cursor="hand"
}

function go(eItem){top.location.href= findTag(eItem).getAttribute("HREF")}



function xCheck(x,col_check)
    {
    xItem = x.parentElement.parentElement.parentElement
	if (x.checked) {
		xItem.DefaultBgColor=xItem.style.backgroundColor;
		xItem.style.backgroundColor=col_check;
		xItem.style.cursor="hand";
	}
	else {
		xItem.style.backgroundColor=xItem.DefaultBgColor;
		xItem.style.cursor="hand";
	}
}
   
    

