if (this.window.name == "") this.window.name = "Parent";

function sel_hotel(value){
if (value!=-1){
var city=document.searchForm.city.value;
if (city!="all" && city!=""){city_text="&city="+city;}
 else{city_text="";}
	location.href = "hotels.php?hotel="+value+city_text;

}
}

function sel_city(value){
	location.href = "hotels.php?city="+value;
}
function sel_city1(value,trans){
if (value!=-1){
	location.href = "transport.php?city="+value+"&trans="+trans;
}
}

function checkFields (fName) 
{
	if (fName == "LinguaInformRequest") {
		document.forms[fName].elements['lang'].disabled = false; 
		document.forms[fName].elements['test_results'].disabled = false; 
	}
	
	eName = document.forms[fName].elements['cont_name'].value;
	ePhones= document.forms[fName].elements['cont_phones'].value;
	eMail = document.forms[fName].elements['cont_email'].value;
	
	if (eName == "")
	{
		alert('Введите Ваше имя!');
		return false;
	} 
 	else if ((ePhones == "") && ((eMail == "") || (eMail.indexOf("@",0) == -1))) 
	{
		alert('Введите правильный e-Mail или Ваши телефоны!');
		return false;
	}
	else return true;
}

br4x = (((navigator.appName == "Microsoft Internet Explorer") || (navigator.appName == "Netscape")) && (parseInt(navigator.appVersion) >= 4 ));

function requestLI(fileName)
{
	WinFeatures = "top=100,left=100,width=400,height=300,Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no";
	Request = window.open(fileName,"Request",WinFeatures);
}

function hotels(arg){
	var win=window.open('hotels_detail.php?id='+arg,'arg','width=780,height=540,scrollbars=yes,resizable=1');
}
function zakaz(arg){
	var win_zak=window.open('rus_zakaz.php?'+arg,'','width=600,height=540,resizable=1,scrollbars=1');
}

function bg(name,arg){
	name.style.backgroundColor=arg;
}

function show(arg){
tim="";
if (document.getElementById && !document.all){
	d=eval('document.getElementById("'+arg+'").style');
	 var show="visible";
	 var hide="hidden";
 	document.getElementById("foreigntur").style.visibility=hide;
 	document.getElementById("transport").style.visibility=hide;
}else
	{if (document.all){
		d=eval("document.all."+arg+".style");
		var show="visible";
		var hide="hidden";
		document.all.foreigntur.style.visibility=hide;
		document.all.transport.style.visibility=hide;
    }else
		{if(document.layers){
			d=eval("document."+arg);
			var show="show";
			var hide="hide";
			document.foreigntur.visibility=hide;
			document.transport.visibility=hide;
	  	}
  }
 }

d.visibility=show;
}

function hid(arg){
if (document.getElementById && !document.all){
	d=eval('document.getElementById("'+arg+'").style');
	 var hid="hidden";
}else
	{if (document.all){
		d=eval("document.all."+arg+".style");
		var hid="hidden";
    }else
		{if(document.layers){
			d=eval("document."+arg);
			var hid="hide";
	  	}
  }
 }
d.visibility=hid;
}

function hid1(arg){
tim=setTimeout("hid('"+arg+"');",3000);
}


function smena(arg){
var reg=/close.gif/i;
var reg1=/open.gif/i;
var a=arg.src;
if (reg.test(a)){
	arg.src=m0.src;
}
if (reg1.test(a)){
	arg.src=n0.src;
}
}

function sloy(id){
var lay=eval('document.getElementById("id_'+id+'").style');

var a=lay.display;
	if (a=="none"){
		lay.display="block";
	}
	if (a=="block"){
		lay.display="none";
	}
}

function foc(){
self.focus();
}

function bron(arg){
	var bron=window.open('bron.php?type='+arg,'bron','width=640,height=540,scrollbars=1');
}
