//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
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
condition = !(( (browserName.indexOf("Explorer") >=0 ) && (browserVer < 4) ) ||  ((browserName.indexOf("Netscape") >=0 ) && (browserVer < 2) ) ) ;
if (condition == true  )
    CanAnimate = true;
else
    CanAnimate = false;

function translate()
{
	var loc = document.location.toString();
	loc = loc.substring(7,loc.length);
	var idx;
	idx = document.trans.langpair.selectedIndex;
	if (idx<=0) {
		alert("Please select a language.");
		return false;
	}
	else {
		window.open('http://translate.google.com/translate_c?langpair=' + document.trans.langpair.options[idx].value + "&u=" + document.location,"new_trans");
		return false;
	}
}

function openchild_nl(thisurl) 
{
	var windowTop;
	var windowLeft;
	windowTop=(screen.height*(20/100))*0.7;
	windowLeft=screen.width*(19/100);

	var email_val = document.theForm.email.value;
	var from_site_val = document.theForm.from_site.value;
	var is_window_val = document.theForm.is_window.value;
	var org_referer = document.location;
	var thisurl_string = thisurl + "?email=" + email_val + "&from_site=" + from_site_val + "&is_window=" + is_window_val + "&org_referer=" + org_referer;

	if ( CanAnimate ) {
			msgWindow=window.open( '' ,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=570,height=260,top='+windowTop+',left='+windowLeft);
			msgWindow.focus();
			msgWindow.location.href = thisurl_string;
	}
	else {
			msgWindow=window.open( thisurl_string,'subwindow','toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,menubar=no,resizable=yes,width=570,height=260,top='+windowTop+',left='+windowLeft);
	}
}



function validate_nl(theForm)
{
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(theForm.email.value)))
	{
		alert("Invalid Email ID. Kindly enter the correct ID.");
		theForm.email.focus();
		return (false);
	}
}


function getblank_nl(this1)  {
	this1.value = "";
    return true;	
}

function mail(){
	document.location="mailto:webmaster@rajasthan-travel-tours.com?subject="+document.location;
}



function validateit(theForm)
{
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(theForm.email.value)))
	{
		alert("Invalid Email ID. Kindly enter the correct ID.");
		theForm.email.focus();
		return (false);
	}
}


function checkData ()
{
	if (document.form1.choice[0].checked) {
		document.form1.action = "http://www.indiamart.com/cgi/AT-apparelssearch.cgi";
	}
	else {
	    document.form1.action = "http://www.indiamart.com/cgi/AT-india2search.cgi";
	}
	if (document.form1.search.value.length < 3){
	    alert("Enter at least three characters for search."); 
	    document.form1.search.focus();
	    return false;
	}
return true;

}


function checkData1 ()
{
	if (document.form2.search.value.length < 3){
	    alert("Enter at least three characters for search."); 
	    document.form2.search.focus();
	    return false;
	}
	else{
		return true;
	}

}

function getblank(this1)  {
	if (this1.value = "Your e-mail here") {
		this1.value = "";
	}
    return true;	
}
function convert()

{
var loc = document.location.toString();
loc = loc.substring(7,loc.length);
var idx;
idx = document.trans.langpair.selectedIndex;
if (idx<=0) 
{
alert("Please select a language.");
return false;
}
else{
window.open('http://translate.google.com/translate_c?langpair=' + document.trans.langpair.options[idx].value + "&u=" + document.location,"new_trans");
return false;
}
}

function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}

function ReadCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return ""; 
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

function opencart(param1,param2)
{
//alert("anurag"+param1+"="+param2);
url = "/cart.php?param1="+param1+"&param2="+param2+"&action=add";
window.open(url,"wishlist","height=300, width=500");
}

	/*200 cities div*/
	function close_div()
	{
		var show_city = document.getElementById('city_div');
		show_city.style.visibility = "hidden";

		var change_city = document.getElementById('city_change');
		change_city.style.visibility = "visible";
	}

	function city_function(pag){
			
			if(document.dataform.city.value=='Select City')
			{
				document.dataform.city.value= '';
			}
			var city_pop = new Array("Ahmedabad","Bangalore","Chandigarh","Chennai");
			
			str_inner_pop = "<table border='0' cellspacing='0' cellpadding='0' height='50' valign='top' width='100'><tr><td height='5' colspan='10'></td></tr><tr><TD align='right' colspan='9'><A HREF='javascript:close_div();'><IMG SRC='http://www.justDial.com/image/images_just_right/close.gif' WIDTH='11' HEIGHT='11' BORDER='0' ALT='' title='Close'></a></TD></tr><TR><TD class='headorng123' colspan='2' style='padding-left:10'><B>Popular Cities :</B><a href='javascript:fillcity(\"ss\")' class='popsearchfontblue'>dd</TD></tr><tr><td height='10' colspan='10'></td></tr><tr><td><table border='0' cellspacing='0' cellpadding='0'>";

			var city_array =  new Array();					
			var str_main = '';
			var str_inner = '';
			var str_main_end = '';
			var cntr=0;
			var stopLmt = 12;
			var pg = pag; 
			var oc = 'headorng123';
			var bc = 'popsearchfont3'; 

				
				if(pg=='0')
				{
					str_inner = str_inner_pop; 
					var noPerPage =  stopLmt * 5;
					var noPerPage_0 =  stopLmt * 3;
					var nopage = Math.round(city_array.length/noPerPage);
					
				}
				else
				{
					str_inner += "<table border='0' cellspacing='0' cellpadding='0' height='200' valign='top' width='500'><tr><td height='10' colspan='10' valign='top'></td></tr><tr><TD align='right' colspan='9' style='padding-right:10'><A HREF='javascript:close_div();'><IMG SRC='../../image/images_just_right/close.gif' WIDTH='11' HEIGHT='11' BORDER='0' ALT='' title='Close'></a></TD></tr><tr><td height='10' colspan='10' valign='top'></td></tr><tr><td height='5' colspan='10'></td></tr>"; 
					
					var noPerPage =  stopLmt * 5;
					var noPerPage_0 =  stopLmt * 5;
					
					var nopage = Math.round(city_array.length/noPerPage);
				}
				thispageno=pg*noPerPage_0;
				if(pg!=0) {
					thispageno=thispageno-24;
				}

				for(i=thispageno;i<city_array.length;i++){
					if(cntr==0)
					{
						
						str_inner += "<td valign='top'><table border='0' cellspacing='0' cellpadding='0'>";
					}
					
					str_inner += "<tr><td width='10'></td><td><a href='javascript:fillcity(\""+city_array[i]+"\");remove_sec();' class='popsearchfont3'>"+city_array[i]+"</td></tr><tr><td height='5'></td></tr>";
					cntr++;
					
					if(cntr==stopLmt || i == city_array.length-1)
					{
						
						str_inner += "</table></td><td width='10'></td>";
						cntr = 0;
					}
					if(i == (thispageno+noPerPage_0)-1) {
					break;
						
					}
				}
					str_inner += "</tr>";
				
				str_inner += "<tr><td height='5' colspan='10'></td></tr><tr><TD colspan='8' style='padding-left:10'><A HREF='javascript:close_div();' class='headorng123' >Close</A></TD><td colspan='2' align='right'><table border='0' cellspacing='0' cellpadding='0' ><tr>";

				str_inner += "</tr></table></td></tr><tr><td height='10' colspan='10'></td></tr></table>";			
				document.getElementById('city_div').innerHTML = str_inner;
				var show_city = document.getElementById('city_div');
				show_city.style.visibility = "visible";
				
			}
		function fillcity(id)
		{
			
			document.getElementById('txt2').value= id;
			
			var city_value =  document.getElementById('txt2').value;
			
			var show_city = document.getElementById('city_div');
			show_city.style.visibility = "hidden";

			var change_city = document.getElementById('city_change');
			change_city.style.visibility = "visible";

			changelable(document.dataform.city.value);
		}


// STOP HIDING FROM OTHER BROWSERS -->

//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


function interest(area)
{

dd = document.getElementById(area).checked;

if(dd == false)
{
document.getElementById(area).checked = true;
}else{
	document.getElementById(area).checked = false;
}
}


// STOP HIDING FROM OTHER BROWSERS -->