  function Changedomain_search()
    {
    if(document.getElementById("domain search").value=="Enter Domain Name")
    {
    document.getElementById("domain search").value="";
    }
    }
    
    function Changedomain_search1()
    {
    if(document.getElementById("domain search").value=="")
    {
    document.getElementById("domain search").value="Enter Domain Name";
    }
    }
 
 //end search
 function ChangeName()
    {
    if(document.getElementById("Name").value=="Name")
    {
    document.getElementById("Name").value="";
    }
    }
    
    function ChangeName1()
    {
    if(document.getElementById("Name").value=="")
    {
    document.getElementById("Name").value="Name";
    }
    }
	// end name
	
	function ChangeEmail()
    {
    if(document.getElementById("Email").value=="Email")
    {
    document.getElementById("Email").value="";
    }
    }
    
     function ChangeEmail1()
    {
    if(document.getElementById("Email").value=="")
    {
    document.getElementById("Email").value="Email";
    }
    }
	// end email
	function ChangeMobile()
	{
    if(document.getElementById("Mobile").value=="Mobile")
    {
    document.getElementById("Mobile").value="";
    }
    }
    
     function ChangeMobile1()
    {
    if(document.getElementById("Mobile").value=="")
    {
    document.getElementById("Mobile").value="Mobile";
    }
    }
	// end telephone
	function ChangeQuery ()
	{
    if(document.getElementById("Query").value=="Query")
    {
    document.getElementById("Query").value="";
    }
    }
    
     function ChangeQuery1()
    {
    if(document.getElementById("Query").value=="")
    {
    document.getElementById("Query").value="Query";
    }
    }
    
 

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 validate_form()
	{
    	//var Email=document.form1.Email
	   	
  
 if ( document.form1.Name.value == "" || document.form1.Name.value == null)
    {
        alert ( "Please Enter Name." );
		document.form1.Name.focus()
        return false;
    }
	else if(document.form1.Name.value=="Name")
	{
	 alert ( "Please Enter Name." );
		document.form1.Name.focus()
        return false;
	}
	/*if ( document.form1.S_com.value == "" || document.form1.S_com.value==null)
    {
        alert ( "Please Enter Email." );
		document.form1.S_com.focus()
        return false;
    }*/
	
	/* if ( document.form1.S_add.value == "" || document.form1.S_add.value == null)
    {
        alert ( "Please Enter Query." );
		document.form1.S_add.focus()
        return false;
    }*/
	
	/* if ( document.form1.S_tel.value == "" || document.form1.S_tel.value == null)
    {
        alert ( "Please Enter Tel.Phone:." );
		document.form1.S_tel.focus()
        return false;
    }*/
	
 	else if ((document.form1.Email.value == null)||(document.form1.Email.value == ""))
	{
		alert("Please Enter your Email ID")
		document.form1.Email.focus()
		return false;
	}	
	
	else if (echeck(document.form1.Email.value)==false){
		document.form1.Email.value=""
		document.form1.Email.focus()
		return false;
	}
	
	
	 if ( document.form1.Mobile.value == "" || document.form1.Mobile.value==null)
    {
        alert ( "Please Enter Mobile No." );
		document.form1.Mobile.focus()
        return false;
    }
		else if(document.form1.Mobile.value=="Mobile")
	{
	 alert ( "Please Enter MobileNo." );
		document.form1.Mobile.focus()
        return false;
	}

	if ( document.form1.Query.value == "" || document.form1.Query.value == null)
    {
        alert ( "Please Enter Query." );
		document.form1.Query.focus()
        return false;
    }
		else if(document.form1.Query.value=="Query")
	{
	 alert ( "Please Enter Query" );
		document.form1.Query.focus()
        return false;
	}
	
	
	return true;
}

