function sikkimhimalaya()
{ 
	Window=open("","","width=400,height=250,top=100,left=200");
	Window.document.open();
	Window.document.write("<html><head><title>Sikkim Himalaya </title></head>")
	Window.document.write("<p><b><center><font color='#808080' face='Arial' size='4'> Travel in the Cloud Kingdom <br> SIKKIM HIMALAYA by David Lang  </center></b></p>")
	Window.document.write("<form name='myform' method='POST' action='sh.php'>")
	Window.document.write("<table><tr><td colspan=4></td></tr>")
	Window.document.write("<tr><td width='30'></td><td><font size='2' face='Tahoma'><b>Name :</b></td><td><input type=text name='name'> </td><td></td></tr>")
	Window.document.write("<tr><td width='30'></td><td><font size='2' face='Tahoma'><b>Address :</b></td><td><textarea name='address'></textarea> </td><td></td></tr>")
	Window.document.write("<tr><td width='30'></td><td><font size='2' face='Tahoma'><b>Email :</b></td><td><input type=text name='email'> </td><td></td></tr>")
	Window.document.write("<tr><td width='30'></td><td><font size='2' face='Tahoma'><b>Phone no :</b></td><td><input type=text name='phone' cols='30' rows='10'></textarea> </td><td></td></tr>")

	Window.document.write("<tr><td width='30'><td colspan=2 align=center><input type='button' name='send' value='Order Now'></td><td></td></tr>")
	Window.document.write("</table>")
	Window.document.myform.send.onclick=check;
	Window.document.write("</form>")
	Window.focus();
}

function check()
{		
	var formcheck= Window.document.myform.name.value;
	var formcheck1=Window.document.myform.email.value;
	var formcheck2=Window.document.myform.address.value;
	
	var flag =0;

	if(formcheck=="" || formcheck1=="" ||formcheck2=="")
	{
		alert('Please fill up the fields marked with a *');
		flag=1;
		
		if(formcheck=="")
		{
			Window.document.myform.name.focus();
			return(false);
		}
		if(formcheck1=="")
		{
			Window.document.myform.email.focus();
			return(false);
		}
		if(formcheck2=="")
		{
			Window.document.myform.arrival.focus();
			return(false);
		}
		
	}
		
	
if(flag==0)
{
	if(formcheck1.indexOf(" ") >= 0 )
		{
			alert("Please enter the E-Mail address without any white space character.");
			Window.document.myform.email.focus();
			return (false);
		}

		
		AtRateCheckfrom = formcheck1.indexOf("@");
		AtDotCheckfrom  = formcheck1.indexOf(".");

		
		AtRateCheckLastfrom = formcheck1.lastIndexOf("@");
		AtDotCheckLastfrom = formcheck1.lastIndexOf(".");
 

		
		if ( (AtRateCheckfrom == -1) || (AtDotCheckfrom == -1) && flag==0)
		{
			alert("Please enter your valid email-id"); 
			Window.document.myform.email.focus();
			
			
			return (false);
		}
		
			
		if( (AtRateCheckLastfrom != AtRateCheckfrom)  && flag==0)
		{
			alert("Please enter your valid email-id"); 
			Window.document.myform.email.focus();
			return (false);
		}

		BeforeAtRatefrom = formcheck1.substring(0,formcheck1.indexOf("@"));
		AfterAtRatefrom = formcheck1.substring(formcheck1.indexOf("@")+1,formcheck1.length);

				
		if (AfterAtRatefrom.indexOf(".") == -1 && flag==0)
		{
			alert("Please enter your valid email-id"); 
			Window.document.myform.email.focus();
			return (false);
		}

		
		middlefrom = AfterAtRatefrom.substring(0, AfterAtRatefrom.indexOf("."))
		lastfrom = AfterAtRatefrom.substring(AfterAtRatefrom.indexOf(".") + 1,AfterAtRatefrom.length)

		
		if (BeforeAtRatefrom.length == 0 || middlefrom.length == 0 || lastfrom.length == 0 && flag==0)
		{
			alert("Please enter your valid E-Mail"); 
			Window.document.myform.email.focus();
			return (false);
		}

else
{

	 	Window.document.myform.submit();
		return(true);
}
		
}	

}
