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 ID")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid E-mail ID")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid E-mail ID")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid E-mail ID")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid E-mail ID")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid E-mail ID")
		    return false
		 }

 		 return true					
	}

function ValidateForm(){
	var emailID=document.frmSample.EmailAddress
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		emailID.style.background = "#CFD8E4";
		return false
	}
	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		emailID.style.background = "#CFD8E4";
		return false
	}
	return true
 }
 
 

function doClear(theText) {
  if (theText.value == theText.defaultValue) {
    theText.value = ""
    }
}


if (document.images) {
	button_1 = new Image
	button_1_roll = new Image
	button_2 = new Image
	button_2_roll = new Image
	button_3 = new Image
	button_3_roll = new Image
	button_4 = new Image
	button_4_roll = new Image
	button_5 = new Image
	button_5_roll = new Image
	button_6 = new Image
	button_6_roll = new Image
	button_maina = new Image
	button_maina_roll = new Image
	button_mainb = new Image
	button_mainb_roll = new Image
	button_mainc = new Image
	button_mainc_roll = new Image

	button_1.src = "../images/button_1.gif"
	button_1_roll.src = "../images/button_1_roll.gif"
	button_2.src = "../images/button_2.gif"
	button_2_roll.src = "../images/button_2_roll.gif"
	button_3.src = "../images/button_3.gif"
	button_3_roll.src = "../images/button_3_roll.gif"
	button_4.src = "../images/button_4.gif"
	button_4_roll.src = "../images/button_4_roll.gif"
	button_5.src = "../images/button_5.gif"
	button_5_roll.src = "../images/button_5_roll.gif"
	button_6.src = "../images/button_6.gif"
	button_6_roll.src = "../images/button_6_roll.gif"
	button_maina.src = "../images/button_main_a.jpg"
	button_maina_roll.src = "../images/button_main_a_roll.jpg"
	button_mainb.src = "../images/button_main_b.jpg"
	button_mainb_roll.src = "../images/button_main_b_roll.jpg"
	button_mainc.src = "../images/button_main_c.jpg"
	button_mainc_roll.src = "../images/button_main_c_roll.jpg"
	}
	
else {
	button_1 = ""
	button_1_roll = ""
	button_2 = ""
	button_2_roll = ""
	button_3 = ""
	button_3_roll = ""
	button_4 = ""
	button_4_roll = ""
	button_5 = ""
	button_5_roll = ""
	button_6 = ""
	button_6_roll = ""
	button_maina = ""
	button_maina_roll = ""
	button_mainb = ""
	button_mainb_roll = ""
	button_mainc = ""
	button_mainc_roll = ""
	}
	

