maxpic = function(img, w, h){ var win = window.open('','_blank',"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width="+w+",height="+h); win.document.open("text/html"); with (win.document) {write("Изображение"+""+"Закрыть окно"+"");} } showText = function(id) { document.getElementById('link_' + id + '_off').style.display = 'none'; document.getElementById('link_' + id + '_on').style.display = 'block'; document.getElementById('text_' + id).style.display = 'block'; } hideText = function(id) { document.getElementById('link_' + id + '_off').style.display = 'block'; document.getElementById('link_' + id + '_on').style.display = 'none'; document.getElementById('text_' + id).style.display = 'none'; } showText1 = function(id) { document.getElementById('link_' + id + '_off').style.display = 'block'; document.getElementById('link1_' + id + '_off').style.display = 'none'; } hideText1 = function(id) { document.getElementById('link_' + id + '_off').style.display = 'none'; document.getElementById('link1_' + id + '_off').style.display = 'block'; } hideText2 = function(id) { document.getElementById('link_' + id + '_on').style.display = 'none'; document.getElementById('text_' + id).style.display = 'none'; document.getElementById('link1_' + id + '_off').style.display = 'block'; } taxiShow = function() { var box = getObj('taxi_layer'); var X = objX('yellow_car'); var Y = objY('yellow_car'); var nua = navigator.userAgent.toLowerCase(); if (nua.indexOf('msie') !=-1) { // ie var dX = (X-254); var dY = (Y-153); } else if (nua.indexOf('opera') !=-1) { // opera var dX = (X-254); var dY = (Y-145); } else { // moz and other var dX = (X-254); var dY = (Y-123); } var cX = parseFloat(dX.toFixed()); var cY = parseFloat(dY.toFixed()); box.style.position = "absolute"; box.style.top = cY + "px"; box.style.left = cX + "px"; getObj('yct').style.visibility = "hidden"; box.style.display = "block"; //fadeIn(box, 0); } var ato = 0; clearAltTimeOut = function() { if (ato != 0 && ato != null) clearTimeout(ato); ato = 0; } hideAlt = function() { var box = getObj('taxi_layer'); ato = setTimeout(function(){fadeOut(box, 100)}, 350); } fadeIn = function(box, count) { count = parseFloat(count + 25); setOpacity(box, count); timer = setTimeout(function(){fadeIn(box, count)}, 1); if (count==100) { clearTimeout(timer); box.style.display = 'block'; setOpacity(box, 100); } } fadeOut = function(box, count) { count = parseFloat(count - 25); setOpacity(box, count); timer = setTimeout(function(){fadeOut(box, count)}, 1); if (count==0) { clearTimeout(timer); box.style.display = 'none'; getObj('yct').style.visibility = 'visible'; setOpacity(box, 100); } } /* hiddePlane = function() { getObj('plane_box').style.display = "none"; getObj('pic_cont').style.display = "block"; } showPlane = function() { var box_w = getObj('page_width').clientWidth + 59; var menu = getObj('plane_box'); var tab = getObj('plane_tab'); getObj('pic_cont').style.display = "none"; menu.style.position = 'absolute'; //menu.style.width = box_w + "px"; //tab.style.width = (box_w) + "px"; menu.style.top = '209px'; menu.style.right = '25px'; //menu.style.overflow = "hidden"; menu.style.zIndex = "100"; toIn(menu, box_w, 0); } toIn = function(box, width, count) { count = parseFloat(count + 30); box.style.display = "block"; setPosit(box, count); setWidth(box, count); timer = setTimeout(function(){toIn(box, width, count)}, 1); if (count >= width/2) { clearTimeout(timer); setWidth(box, width); setPosit(box, 25); } } */ setWidth = function(box, value) { if (value >= 0) { box.style.width = value; } } setPosit = function(box, value) { if (value >= 0) { box.style.right = value + "px"; } } var count; var timer; var nn4 = (document.layers)? true : false; var dom = (document.getElementById)? true : false; var ie4 = (document.all && !dom)? true : false; setOpacity = function(box, value) { if (navigator.userAgent.indexOf("Firefox") != -1) { if (value == 100) { value = 99.999; } } box.style.filter = "alpha(opacity=" + value + ")"; // IE/Win box.style.KhtmlOpacity = (value / 100); // Safari 1.1 or lower, Konqueror box.style.MozOpacity = (value / 100); // Older Mozilla+Firefox box.style.opacity = (value / 100); // Safari 1.2, Firefox+Mozilla } /* геттер y-координаты */ objY = function(uid) { if (nn4) {return document.layers[uid].pageY;} else { var element = (dom)? document.getElementById(uid) : document.all[uid]; var coordsY = element.offsetTop; while (element.offsetParent != null) { element = element.offsetParent; coordsY += element.offsetTop; if (element.tagName == 'BODY') break; } return coordsY; } } /* геттер x-координаты */ objX = function(uid) { if (nn4) { return document.layers[uid].pageX; } else { var element = (dom)? document.getElementById(uid) : document.all[uid]; var coordsX = element.offsetLeft; while (element.offsetParent != null) { element = element.offsetParent; coordsX += element.offsetLeft; if (element.tagName == 'BODY') break; } return coordsX; } } /* геттер объекта */ getObj = function(uid) { return element = (dom) ? document.getElementById(uid) : document.all[uid]; }