

<!--//
function open_Custom_Window(page,Dims) {
	OpenWin = this.open(page, "new",Dims )
}


<!---- === Confirm Delete Link === ----->
function del_Record(delthis) {
if(confirm("Do you really want to delete this record"))
window.location=delthis;
}


function mouseover(col)
 {col.style.background = "White"
 col.style.color= "White"; }
function mouseout(col)
 { col.style.background = "#FF934A"; // This color value should match to DropDownTableBGColor value
   col.style.color= "White";  }


function gutterOver(col)
 {col.style.background = "#EEEEEE"
 col.style.color= ""; }
function gutterOut(col)
 { col.style.background = ""; // This color value should match to DropDownTableBGColor value
   col.style.color= "";  }


function checkContact(){

	var emailID=document.contactForm.EmailAddress

	if (document.contactForm.Title.value == "" ) {
		alert("Please add a Title");
		document.contactForm.Title.focus();
		return false;
	}

	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email Address")
		emailID.focus()
		return false;
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false;
	}


   	if (document.contactForm.TelNumBusiness.value == 0) {
      		alert("Please enter a telephone number.");
      		document.contactForm.TelNumBusiness.focus();
      		return false;
      	} else if (IsNumeric(document.contactForm.TelNumBusiness.value) == false) {
      		alert("Please enter a correct telephone number\nNumbers Only!");
      		
      		document.contactForm.TelNumBusiness.focus();
      		document.contactForm.TelNumBusiness.value='';      		
      		return false;
      	}


		return true;

}	


function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid E-mail Address")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail Address")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail Address")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail Address")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail Address")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail Address")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail Address")
		    return false
		 }

 		 return true					
	}
	
	
function IsNumeric(strString)
   //  check for valid numeric strings	
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
}

//-->
