function ShowWin(url,x,y,name,isscrollbars) {
var cx, cy;
x=(x > screen.width * 0.7 ? screen.width * 0.7 : x);
y=(y > screen.height * 0.7 ? screen.height * 0.7 : y);
cx=screen.width/2-(x / 2);
cy=screen.height/2-(y/2);
isscrollbars=(isscrollbars=="no")?"no":"yes";
window.open(url,name,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+x+",height="+y+",scrollbars="+isscrollbars+",top="+cy+",left="+cx);
}
function ShowWinS(url, x, y, scrl) {
x=(x > screen.width * 0.7 ? screen.width * 0.7 : x);
y=(y > screen.height * 0.7 ? screen.height * 0.7 : y);
if(x == 0 || y == 0) return;
var cx, cy, name;
cx=screen.width/2 - (x/2);
cy=screen.height/2-(y/2);
name = getNameByDate();
window.open(url,name,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+x+",height="+y+",scrollbars="+scrl+",top="+cy+",left="+cx);
}
function getNameByDate() {
var s = "";
var d = new Date();
s += d.getFullYear();
s += (d.getMonth() + 1);
s += d.getDate();
s += "_" + d.getHours();
s += d.getMinutes();
s += d.getSeconds();
return s;
}
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var is_opera = ((clientPC.indexOf("mozilla") != -1) && (clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") != -1));
var is_ffox = ((clientPC.indexOf("mozilla") != -1) && (clientPC.indexOf("firefox") != -1));
var is_ie = ((clientPC.indexOf("mozilla") != -1) && (clientPC.indexOf("msie") != -1) && !is_opera && !is_ffox);
var is_moz = ((clientPC.indexOf("mozilla") != -1) && !is_ie && !is_opera && !is_ffox);
var timer;
if(is_moz || is_ffox) {
document.write('');
}
function MyResize() {
var max_with = 900;
var tbm = document.getElementById("rlimit");
if(tbm != '' && tbm != null) {
tbm.width = document.body.clientWidth < max_with ? 1 : document.body.clientWidth - max_with;
tbm.style.width = document.body.clientWidth < max_with ? 1 : document.body.clientWidth - max_with;
}}
function MyOnLoad() {
document.body.clientWidth;
var obj = document.getElementById("sp_search_form");
var objr = document.getElementById("spr_search_form");
if(false && obj && objr) {
// alert(objr.innerHTML);
obj.innerHTML = objr.innerHTML;
objr.innerHTML = "";
}
MyResize();
}
function SetCookie(sName, sValue)
{
var expiredays = 1;
var todayDate = new Date();
todayDate.setTime(todayDate.getTime() + expiredays * 24 * 60 *60 *1000);
document.cookie = sName + "=" + escape(sValue) + "; expires=" + todayDate.toGMTString()+"; path=/";
}
function SetFilter(pro_2, pro_3, url) {
if(url) {
ShowWaitWindow();
if(pro_2) SetCookie("hpro_2", pro_2);
else SetCookie("hpro_2", "");
if(pro_3) SetCookie("hpro_3", pro_3);
else SetCookie("hpro_3", "");
if(!httpRequest("http://"+location.hostname+"/main/_hotels/?p_hotels=")) location.href = url;
timer = setTimeout("CloseWaitWindow();", 1700);
}
}
function ShowWaitWindow()
{
CloseWaitWindow();
var div = document.body.appendChild(document.createElement("DIV"));
div.id = "wait_window_div";
div.innerHTML = "Çàãðóçêà...";
div.className = "waitwindow";
div.style.left = document.body.scrollLeft + (document.body.clientWidth - div.offsetWidth) - 10 + "px";
div.style.top = document.body.scrollTop + 10 + "px";
if(is_ie)
{
var frame = document.createElement("IFRAME");
frame.src = "javascript:void(0)";
frame.id = "wait_window_frame";
frame.className = "waitwindow";
frame.style.width = div.offsetWidth + "px";
frame.style.height = div.offsetHeight + "px";
frame.style.left = div.style.left;
frame.style.top = div.style.top;
document.body.appendChild(frame);
}
}
function CloseWaitWindow()
{
var frame = document.getElementById("wait_window_frame");
if(frame)
frame.parentNode.removeChild(frame);
var div = document.getElementById("wait_window_div");
if(div)
div.parentNode.removeChild(div);
}