// JavaScript Document

function header(path)
{
	if(path == null){
		path="./";
	}
document.write('<table cellpadding="0" cellspacing="0" border="0"><tr><td valign="top"><img src="/images/himtravels_01.gif" width="144" height="115" alt="" border="0" vspace="0" hspace=0 align=top /></td><td valign="top"><img src="/images/himtravels_02.gif" width="146" height="115" alt="" border="0" vspace="0" hspace=0  align=top /></td><td valign="top"><img src="/images/himtravels_03.gif" width="128" height="115" alt="" border="0" vspace="0" hspace=0 align=top /><td valign="top"><img src="/images/himtravels_09.gif" width="200" height="115" alt="" border="0" vspace="0" hspace=0 align=top /></td><td valign="top"><a href="index.html"><img src="/images/himtravels_04.gif"  width="332" height="115" alt="" border="0" vspace="0" hspace=0 align=top /></a></td></tr></table>');


}

function rightpanel(path)
{
	if(path == null){
		path="./";
	}
document.write('<table cellpadding="0" cellspacing="0" vspace="0"  valign="top"><tr><td background="images/himtravels_06-AB.gif" valign="top" width="332" height="162"></td></tr><tr><td background="images/himtravels_06-D.gif" valign="top"><table><tr><td width="120"></td><td align=left>	<div class=menu><A href="index.html" class="a"> Home</A></div>	<div class=menu><A href="about-us.htm" class="a"> About Us</A></div>	<div class=menu><A href="tour-packages.htm" class="a">Himachal Tour Packages</A></div>		<div class=menu><A href="hotel-booking.htm" class="a">Himachal Hotel Booking</A></div>		<div class=menu><A href="car-rental.htm" class="a">Himachal Car Rental</A></div>		<div class=menu><A href="contact-us.htm" class="a">Contact Us</A></div>	<div class=menu><A href="http://himachal.itzall.com" class="a" target="_blank">Explore Himachal</A></div>	<div class=menu><A href="sitemap.htm" class="a">Site Map</A></div></td></tr></table></td></tr></table>');

}

function footer(path)
{
	if(path == null){
		path="./";
	}
document.write('<div class=footer11> </div><table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td height=20 align="center" class="footer" bgcolor="#999999">&copy;All rights reserved. | Powered by <a href=http://itzall.com><img src="images/favicon.gif" vspace="0" border=0></a></td></tr></table>');

}

ads2 = new Array('<img src="images/himtravels-shimla.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/himtravels-chamba.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/himtravels-hidimba.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/himtravels-spiti.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/himtravels-mandi.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/himtravels-dharmshala.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/snow.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/hills.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/khajiar.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/mall.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/clouds.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/fort.gif" width="300" height="200" vspace="5" hspace="5" align="right">','<img src="images/lake.gif" width="300" height="200" vspace="5" hspace="5" align="right">')

		
function himImage() {
 adIX = Math.round(Math.random()*(ads2.length-1))
 document.write(ads2[adIX])
 //document.write('<br>')
 }
 
 
 
 
 


<!-- HIDING FROM OTHER BROWSERS
expires = new Date();
expires.setTime (expires.getTime() + 24 * 60 * 60 * 150 * 1000);
function set(){

if (document.frm.name.value == "")
{
    alert ("Please Enter Your Name");
	document.frm.name.focus();
	return (false);
}

if (document.frm.email.value == "")
{
    alert ("Please Enter Your Email");
	document.frm.email.focus();
	return (false);
}

if(document.frm.email.value.indexOf(" ") >= 0)
{
	alert("Please enter your email-id without any white space character.");
	document.frm.email.focus();
	return (false);
}

if ( (document.frm.email.value.indexOf("@") == -1) || (document.frm.email.value.indexOf(".") == -1) )
{
	alert("Please enter a valid email-id"); 
	document.frm.email.focus();
	return (false);
}
BeforeAtRate = document.frm.email.value.substring(0,document.frm.email.value.indexOf("@"));
AfterAtRate = document.frm.email.value.substring(document.frm.email.value.indexOf("@")+1,document.frm.email.value.length);

if (AfterAtRate.indexOf(".") == -1)
{
	alert("Please enter a valid email-id"); 
	document.frm.email.focus();
	return (false);
}

middle = AfterAtRate.substring(0, AfterAtRate.indexOf("."))
last = AfterAtRate.substring(AfterAtRate.indexOf(".") + 1,AfterAtRate.length)

if (BeforeAtRate.length == 0 || middle.length == 0 || last.length == 0)
{
	alert("Please enter a valid email-id"); 
	document.frm.email.focus();
	return (false);
}

if (document.frm.phone.value == "")
{
    alert ("Please Enter Your Phone NUmber");
	document.frm.phone.focus();
	return (false);
}


if (document.frm.tt.value == "")
{
    alert ("Please Select Your Location");
	document.frm.tt.focus();
	return (false);
}


if (document.frm.tf.value == "")
{
    alert ("Please Enter the Place(s) you want to Visit");
	document.frm.tf.focus();
	return (false);
}
if (document.frm.ppl.value == "")
{
    alert ("Please Enter the No. Of People Travelling");
	document.frm.ppl.focus();
	return (false);
}

if (document.frm.query.value == "")
{
    alert ("Please Enter Your Detailed Query.");
	document.frm.query.focus();
	return (false);
}
if (document.frm.captcha_text.value.length == 0)  
{
		alert ("Kindly enter security code as shown.");
		document.frm.captcha_text.focus();
		return false;
}
if (document.frm.captcha_text.value != ran_num)  
{
		alert ("Kindly enter the correct security code.");
		document.frm.captcha_text.focus();
		return false;
}
// Referrer and selfurl


if (document.referrer&&document.referrer!="")
        {
                document.frm.referer.value = document.referrer;
        }
        document.frm.self_url.value = document.location.href;
//


newCookie = document.frm.name.value;
newCookie +="|"+document.email.value;
newCookie +="|"+document.frm.phone.value;
newCookie +="|";
setCookie("newImeshID",newCookie);
return true;
}

var d = new Date();
	var epoch_time =(d.getTime()-d.getMilliseconds())/1000;
	var randomnumber=Math.floor(Math.random()*9999);
	var randomnumber1=Math.floor(Math.random()*9999);
	//var ran_num=randomnumber+"."+epoch_time+"."+randomnumber1;
	var ran_num=randomnumber+randomnumber1;
	ran_num = Math.round(ran_num);
function get(){
if( (cookie = getCookie("newImeshID")) > ""){
	Values = cookie.split("|");
	if (Values.length >= 2){
		if (document.frm.name.value.length == 0) document.frm.name.value = Values[0];
		if (document.frm.email.value.length == 0)    document.frm.email.value = Values[1];
		if (document.frm.country.value.length == 0) document.frm.phone.value=Values[2];
	}
}
return true;
}
function setCookie(name, value){
if (value.length > 0)
 document.cookie = name + "=" + escape(value)+ ";"+"expires=" + expires.toGMTString()+";"
}
function getCookie(Name) {
          var search = Name + "="
          if (document.cookie.length > 0) { // if there are any cookies
                    offset = document.cookie.indexOf(search) 
                    if (offset != -1) { // if cookie exists 
                              offset += search.length 
                              // set index of beginning of value
                              end = document.cookie.indexOf(";", offset) 
                              // set index of end of cookie value
                              if (end == -1) end = document.cookie.length
                              return unescape(document.cookie.substring(offset, end))
                    } 
          }
return "";
}

//Getting parameter name from url starts
var is_input = document.URL.indexOf('?');
var tour_value = '';
if (is_input != -1)
{
	addr_str = document.URL.substring(is_input+1, document.URL.length);
	strarr = addr_str.split("&");
	var param_name = unescape((strarr[0].split("="))[0]);
	if(param_name == "tour")
	{
		tour_value = unescape((strarr[0].split("="))[1]);
		tour_value = tour_value.replace(/\+/g," ");
	}
}
//Getting parameter name from url ends
// STOP HIDING FROM OTHER BROWSERS -->

