
		function domn()
			{
			if(document.mail.dom[0].checked==true)
				{
				if(navigator.appName=='Microsoft Internet Explorer')
					document.getElementById("new_domain").style.display="block";
				else
					document.getElementById("new_domain").style.display="table-row";
					
					
				document.getElementById("existing_domain").style.display="none";
				document.getElementById("d_duration").style.visibility="visible";
				}
			else
				{
				if(navigator.appName=='Microsoft Internet Explorer')
					document.getElementById("existing_domain").style.display="block";
				else
					document.getElementById("existing_domain").style.display="table-row";


				document.getElementById("new_domain").style.display="none";
				document.getElementById("d_duration").style.visibility="hidden";
				}
			}
		function rest()
			{
			if(navigator.appName=='Microsoft Internet Explorer')
					document.getElementById('new_domain').style.display='block';
				else
					document.getElementById('new_domain').style.display='table-row';
					
					
				document.getElementById('existing_domain').style.display='none'
				document.getElementById("custom_show").style.display="none";
			}
		function rest2()
			{
			document.mail.pack[0].checked=true;
			document.mail.dom[0].checked=true;
			
			}
		function custom()
			{
			//alert(document.mail.pack[3].selected);
			if(document.mail.pack[4].checked==true)
				document.getElementById("custom_show").style.display="block";
			else
				document.getElementById("custom_show").style.display="none";
			
			return false;
			}
		function createObj()
			{
			var obj;
			if(navigator.appName=='Microsoft Internet Explorer')
				obj=new ActiveXObject("Microsoft.XMLHTTP");
			else
				obj=new XMLHttpRequest();
			
			return obj;
			}
		function sendmail()
			{
			
			var d = document.mail;
			if(d.dom[0].checked==true & d.desired_domain1.value=='')
				{
				alert("fill up all the domain name fields");
				return false;
				}
			if(d.dom[1].checked==true & d.existing_domain.value=='')
				{
				alert("fill up all the domain name fields");
				return false;
				}
		  
			if(d.name.value=='' || d.phone.value=='' || d.email.value=='')
				{
					alert("fill up all the fields properly");
					if(d.name.value=='')
						{
						d.name.focus();
						}
					else
						{
						if(d.phone.value=='')
							d.phone.focus();
						else
							d.email.focus();
						}	 
					return false;
				}
		 	if(echeck(d.email.value)==false)
					return false;
			}
		
		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					
	}
