function Add2favourite()
{
 var bookmarkurl=location.href;
 var bookmarktitle="Holidays in Rajasthan :: Rajasthan Tour Packages";
  
 window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

function checkTellFriendForm()
{
  var valid=false;
  if(frm1.yemail.value=="")
  {
    alert("Your Email Field Can't left blank");
    frm1.yemail.focus();
  }
 else if(frm1.yemail.value.indexOf('@')<1)
 {
   alert("Invalid Email Address, Try AGain");
   frm1.yemail.focus();
 }
 else if(frm1.yemail.value.indexOf('.')<2)
 {
   alert("Invalid Email Address, Try AGain");
   frm1.yemail.focus();
 }
 else if(frm1.femail.value=="")
 {
  alert("Friend's Email Field Can't be left blank");
  frm1.femail.focus();
 }
 else if(frm1.femail.value.indexOf('@')<1)
 {
   alert("Invalid Email Address, Try AGain");
   frm1.femail.focus();
 }
 else if(frm1.femail.value.indexOf('.')<2)
 {
   alert("Invalid Email Address, Try AGain");
   frm1.femail.focus();
 }
 else if(frm1.comment.value=="")
 {
   alert("Comment Field Can't be left blank");
   frm1.comment.focus();
 }
 else
 {
  valid=true;
  var Yemail=frm1.yemail.value;
  var Femail=frm1.femail.value;
  var comment=frm1.comment.value;
  window.open("tell-friend.asp?yemail="+Yemail+"&femail="+Femail+"&comment="+comment+",width=500,height=400");
 }
 return valid;
}

function checkQuickQuery()
{
  var valid=false;
  if(form1.name.value=="")
  {
   alert("Name Field Can't be left blank");
   form1.name.focus();
  } 
  else if(form1.email.value=="")
  {
   alert("Email Field Can't be left blank");
   form1.email.focus();
  }
  else if(form1.email.value.indexOf('@')<1)
  {
   alert("Invalid Email Address");
   form1.email.focus();
  }
  else if(form1.email.value.indexOf('.')<2)
  {
   alert("Invalid Email Address");
   form1.email.focus();
  }
  else if(form1.query.value=="")
  {
    alert("Query Field Can't be left blank");
    form1.query.focus(); 
  }
  else
  {
   var name=form1.name.value;
   var email=form1.email.value;
   var query=form1.query.value;

   window.open("sendQuickQuery.asp?name="+name+"&email="+email+"&query="+query+" ","QuickQuery","width=400,height=400");
   valid=true;
  }

   return valid;
}

function currency_convertor()
{
  window.open("http://www.xe.com/pca/input.cgi","CurrencyWindow","width=580,height=150");
}

//script for distance calculater
	function handleHttpResponse() 
		{    
        	if (http.readyState == 4) 
		{ 
            	  if(http.status==200) 
		{ 
	                  var results=http.responseText; 
              		document.getElementById('display_city').innerHTML = results; 
              } 
              } 
        } 
		function getHTTPObject() 
	{ 
  		var xmlhttp; 

  		if(window.XMLHttpRequest)
		{ 
  		 xmlhttp = new XMLHttpRequest(); 
 		 } 
	  else 
	  if (window.ActiveXObject)
	  { 
	    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); 
    	if (!xmlhttp){ 
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP"); 
    	} 
    } 
  	return xmlhttp; 
} 
var http = getHTTPObject(); // We create the HTTP Object 
function distance_calc()
	{
	
							
				url = "distance_calc.asp";
				url=url+"?start="+document.getElementById("start").value;
				url=url+"&destination="+document.getElementById("destination").value;
				http.open("GET",url, true); 
        		http.onreadystatechange = handleHttpResponse; 
        		http.send(null); 
	}
	function distance(start1)
	{
	
							
				url = "distance_calc.asp";
				url=url+"?start="+start1;
				url=url+"&destination="+document.getElementById("start").value;
				http.open("GET",url, true); 
        		http.onreadystatechange = handleHttpResponse; 
        		http.send(null); 
	}
	
	//weather
	function weather()
{
 window.open("http://www.xe.com/pca/input.cgi","currencyWindo","width=700,height=200");
}
	
