function test()
		{
		alert('aaaa');
		document.getElementById('show').style.color='red';
		document.getElementById('show2').style.color='blue';
		document.getElementById('show1').style.color='blue';
		}

	function test1()
		{
	//	alert('ddddddddddddd');
		document.getElementById('show').style.color='blue';
		document.getElementById('show1').style.color='red';
		document.getElementById('show2').style.color='blue';
		}
	function test2()
		{
		//alert('ddddddddddddd');
		document.getElementById('show').style.color='blue';
		document.getElementById('show1').style.color='blue';
		document.getElementById('show2').style.color='red';
		document.getElementById('show3').style.color='blue';
		document.getElementById('show4').style.color='blue';

		}
	
	function test3()
		{
		//alert('ddddddddddddd');
		document.getElementById('show').style.color='blue';
		document.getElementById('show1').style.color='blue';
		document.getElementById('show2').style.color='blue';
		document.getElementById('show3').style.color='red';
		document.getElementById('show4').style.color='blue';
		}
	function test4()
		{
		document.getElementById('show').style.color='blue';
		document.getElementById('show1').style.color='blue';
		document.getElementById('show2').style.color='blue';
		document.getElementById('show3').style.color='blue';
		document.getElementById('show4').style.color='red';
		}
		
		


	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 ValidateForm1(){
	var emailID=document.frm2.femail;
	var first_name=document.frm2.first_name;
	var last_name=document.frm2.last_name;
	var address=document.frm2.address;
	var city=document.frm2.city;
	var state=document.frm2.state;
	var fzip=document.frm2.fzip;
	var countryname=document.frm2.countryname;
	var fphone=document.frm2.fphone;
	var message=document.frm2.message;

	if ((first_name.value==null)||(first_name.value=="")){
		alert("Please Enter your first name")
		first_name.focus()
		return false
	}

if ((last_name.value==null)||(last_name.value=="")){
		alert("Please Enter your last name")
		last_name.focus()
		return false
	}
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email ID")
		emailID.focus()
		return false
	}

	if (echeck(emailID.value)==false){
		emailID.value=""
		emailID.focus()
		return false
	}
//////////////////////////////////////////////////////
	if ((address.value==null)||(address.value=="")){
		alert("Please Enter your Address")
		address.focus()
		return false
	}
if ((city.value==null)||(city.value=="")){
		alert("Please Enter your City Name")
		city.focus()
		return false
	}
		if ((state.value==null)||(state.value=="")){
		alert("Please Enter your State Name")
		state.focus()
		return false
	}
		if ((fzip.value==null)||(fzip.value=="")){
		alert("Please Enter your Zip Code")
		fzip.focus()
		return false
	}
		if ((countryname.value=="")){
		alert("Please Select Your Country Name")
		countryname.focus()
		return false
	}


if ((fphone.value==null)||(fphone.value=="")){
		alert("Please Enter your Telephone No.")
		fphone.focus()
		return false
	}


if (isNaN(fphone.value)){
		alert("Please Enter the numeric value in  Telephone No.")
		fphone.focus()
		return false
	}

		if ((message.value==null)||(message.value=="")){
		alert("Please Enter your Message")
		message.focus()
		return false
	}
return true
 }


