var showInProgress,hideTM,animTM,howtoID,BodyOnclick,cancelKill; function show_hint(id) { var elem = document.getElementById("HD_" + id); if (!elem) return; steps = 60; //Задаем начальные размеры, приращение, макс. размеры bAnimW = 30; bAnimH = 35; elem.style.display = "block"; // elem.firstChild.style.width = "540px"; elem.firstChild.style.height = ""; bAnimWmax = elem.firstChild.offsetWidth; bAnimHmax = elem.firstChild.offsetHeight; elem.style.top = bAnimHmax > 300 ? -280 : (20 - bAnimHmax) + "px"; // elem.style.display = "none"; bAnimDX = parseInt((bAnimWmax - bAnimW) / steps); bAnimDY = parseInt((bAnimHmax - bAnimH) / steps); animShow_hint(id); } function animShow_hint(id) { var elem = document.getElementById("HD_" + id); var elema = document.getElementById("HDa_" + id); elem.firstChild.style.width = bAnimW + "px"; elem.firstChild.style.height = bAnimH + "px"; bAnimW += bAnimDX; bAnimH += bAnimDY; bAnimDY += 5; bAnimDX += 5; if (bAnimW > bAnimWmax) bAnimW = bAnimWmax; if (bAnimH > bAnimHmax) bAnimH = bAnimHmax; if (bAnimW >= bAnimWmax && bAnimH >= bAnimHmax) { elem.firstChild.style.width = bAnimWmax + "px"; elem.firstChild.style.height = bAnimHmax + "px"; showInProgress = false; elem.firstChild.style.overflow = "auto"; if (elema) { elema.style.top = 127 + elem.firstChild.offsetTop + elem.firstChild.offsetHeight; elema.style.display = "block"; } return; } animTM = window.setTimeout("animShow_hint(\"" + id + "\")", 30) } function show_photo(src,w,h) { deny_kill(); tbl = document.getElementById("_pg"); if (tbl) { tbc = tbl.rows[0].cells[0]; } else { tbl = document.createElement("TABLE"); tbl.id = "_pg"; tbl.style.position = "absolute"; tbl.style.cursor = "pointer"; tbl.cellSpacing = 0; tbl.cellPadding = 0; tbl.border = 0; tbl.className = "im1"; // tbl.onclick = deny_kill; tbc = tbl.insertRow(0); tbc = tbc.insertCell(0); document.body.appendChild(tbl); BodyOnclick = document.body.onclick; document.body.onclick = hide_photo; } resize_photo(w,h); if (tbc.firstChild) tbc.firstChild.src = src; else tbc.innerHTML = ""; return false; } function deny_kill() { cancelKill = true; window.setTimeout(allow_kill,100); } function allow_kill() { cancelKill = false; } function hide_photo() { if (!cancelKill) { tbl = document.getElementById("_pg"); if (tbl) tbl.parentNode.removeChild(tbl,true); document.body.onclick = BodyOnclick; } } function resize_photo(w,h) { tbl = document.getElementById("_pg"); if (!tbl) return; var xScroll, yScroll, leftScroll, topScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = document.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; leftScroll = document.body.scrollLeft; topScroll = document.body.scrollTop; } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; leftScroll = document.body.scrollLeft; topScroll = document.body.scrollTop; } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; leftScroll = document.body.scrollLeft; topScroll = document.body.scrollTop; } var windowWidth, windowHeight; if (document.body) { // other Explorers windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } else if (self.innerHeight) { // all except Explorer windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } // for small pages with total height less then height of the viewport if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } // for small pages with total width less then width of the viewport if(xScroll < windowWidth){ pageWidth = windowWidth; } else { pageWidth = xScroll; } tbl.style.left = (leftScroll + ((windowWidth - w) >> 1)) + "px"; tbl.style.top = (topScroll + ((windowHeight - h) >> 1)) + "px"; } function sw_info(id) { tmp = document.getElementById("i_" + id); if (tmp) tmp.style.display = tmp.style.display == "none" ? "" : "none"; return false; } var myWidth = 0, myHeight = 0; var myWndWidth = 0, myWndHeight = 0; var myLeft = 0, myTop = 0; function getWindowSize() { if( typeof( window.innerWidth ) == 'number' ) { //Non-IE myWidth = window.innerWidth; myHeight = window.innerHeight; myWndWidth = window.screen.width; myWndHeight = window.screen.height; myLeft = window.scrollX; myTop = window.scrollY; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; myWndWidth = document.documentElement.scrollWidth; myWndHeight = document.documentElement.scrollHeight; myLeft = document.documentElement.scrollLeft; myTop = document.documentElement.scrollTop; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myWidth = document.body.clientWidth; myHeight = document.body.clientHeight; myWndWidth = document.body.scrollWidth; myWndHeight = document.body.scrollHeight; myLeft = document.body.scrollLeft; myTop = document.body.scrollTop; } return myWidth } function _157_map_open() { window.open('/157_map.htm','_157_map','width=900,height=550,left=' + (((myWidth - 900) >> 1)) + ',top=' + ((navigator.appName.indexOf('Microsoft') == -1 ? 50 : 130) + ((myHeight - 550) >> 1)) + ',toolbar=no,bar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no').focus(); }