window.onerror = null; function Browser() { var b=navigator.appName; if (b.indexOf('Netscape')!=-1) this.b="ns"; else if ((b=="Opera") || (navigator.userAgent.indexOf("Opera")>0)) this.b = "opera"; else if (b=="Microsoft Internet Explorer") this.b="ie"; if (!b) {this.b="invalid"; this.invalid=true;} this.version=navigator.appVersion; this.v=parseInt(this.version); this.ns=(this.b=="ns" && this.v>=4); this.ns4=(this.b=="ns" && this.v==4); this.ns6=(this.b=="ns" && this.v==5); this.ie=(this.b=="ie" && this.v>=4); this.ie4=(this.version.indexOf('MSIE 4')>0); this.ie5=(this.version.indexOf('MSIE 5')>0); this.ie55=(this.version.indexOf('MSIE 5.5')>0); this.ie6=(this.version.indexOf('MSIE 6.0')>0); this.opera=(this.b=="opera"); this.dom=(document.createElement && document.appendChild && document.getElementsByTagName)?true:false; this.def=(this.ie||this.dom); var ua=navigator.userAgent.toLowerCase(); if (ua.indexOf("win")>-1) this.platform="win32"; else if (ua.indexOf("mac")>-1) this.platform="mac"; else this.platform="other"; } is=new Browser(); var d = document; function redirect(url, win) { if (win) { win = eval("parent."+win); win.location.href=url; } else { window.location=url; } return; } function is_confirm(msg, url, mode) { var is = confirm(msg); switch(mode) { default: if (is) { location.href=url; } } return '#'; } function empty(value, msg) { if (''==value) { if (msg) { alert(msg); } return true; } else { return false; } } function getLayer(name) { if (is.ns4) return findLayer(name, document); if (is.ie && !is.dom) return eval('document.all.' + name); if (is.dom) return document.getElementById(name); return; } function findLayer(name, doc) { var i, layer; for (i=-1; ++i 0) { if ((layer = findLayer(name, layer.document)) != null) { return layer; } } } return; } function hideLayer(layer) { if (is.ns4) { layer.visibility = "hide"; } else { layer.style.visibility = "hidden"; } return; } function showLayer(layer) { if (is.ns4) { layer.visibility = "show"; } else { layer.style.visibility = "visible"; } return; } function getVisibility(layer) { if (is.ns4) { if (layer.visibility == "show") return "visible"; if (layer.visibility == "hide") return "hidden"; return layer.visibility; } else { return layer.style.visibility } return ""; } function moveLayerTo(layer, x, y) { if (is.ns4) { layer.moveTo(x, y); } else { layer.style.left = x; layer.style.top = y; } return; } function getImage(name) { if (is.ns4) { return findImage(name, document); } if (is.ie && !is.dom) { return eval('document.all.' + name); } if (is.dom) { return document.getElementById(name); } return null; } function findImage(name, doc) { var i, img; for (i=-1;++i 0) { dmTimer -= 100; } else { if (currentDMenu != null) { hideLayer(currenttabRE); hideLayer(currentDMenu); } currentDMenu = null; currenttabRE = null; } return;*/ } function dmTimerOver() { if (is.ns4 || (dmReady != true)) return; /*dmTimer = 10000000;*/ clearTimeout(myTT); return; } function dmTimerOut() { if (is.ns4 || (dmReady != true)) return; dmTimer = dmTimeOut; myTT = setTimeout("hideLayer(currenttabRE);hideLayer(currentDMenu);currentDMenu = null;currenttabRE = null;", dmTimeOut); return; } function f_bg(e, n) { /*if (is.ie)*/ f_bg1(eval(e), n); return; } function f_bg1(e, n) { switch(n) { case 0: e.style.backgroundColor = ''; e.backgroundColor = ''; break; case 1: e.style.backgroundColor = '#4EA8FC'; e.backgroundColor = '#4EA8FC'; break; } } /*originally written by paul sowden */ tooltip = { attr_name: "tooltip", blank_text: "(откроется в новом окне)", newline_entity: " ", max_width: 0, delay: 500, t: document.createElement("DIV"), c: null, g: false, m: function(e){ if (tooltip.g){ oCanvas = document.getElementsByTagName((document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY")[0]; x = window.event ? event.clientX + oCanvas.scrollLeft : e.pageX; y = window.event ? event.clientY + oCanvas.scrollTop : e.pageY; tooltip.a(x, y); } }, d: function(){ tooltip.t.setAttribute("id", "tooltip"); //tooltip.t.style.filter = "alpha(opacity=85)"; // buggy in ie5.0 document.body.appendChild(tooltip.t); a = document.all ? document.all : document.getElementsByTagName("*"); aLength = a.length; for (var i = 0; i < aLength; i++){ //if (a[i].tagName == "A" || a[i].tagName == "BUTTON" || (a[i].tagName == "INPUT" && (a[i].type == "submit" || a[i].type == "button" || a[i].type == "reset"))) a[i].onclick = self.focus; if (!a[i]) continue; tooltip_title = a[i].getAttribute("title"); tooltip_alt = a[i].getAttribute("alt"); tooltip_blank = a[i].getAttribute("target") && a[i].getAttribute("target") == "_blank" && tooltip.blank_text; if (tooltip_title || tooltip_blank){ a[i].setAttribute(tooltip.attr_name, tooltip_blank ? (tooltip_title ? tooltip_title + " " + tooltip.blank_text : tooltip.blank_text) : tooltip_title); if (a[i].getAttribute(tooltip.attr_name)){ a[i].removeAttribute("title"); if (tooltip_alt && a[i].complete) a[i].removeAttribute("alt"); tooltip.l(a[i], "mouseover", tooltip.s); tooltip.l(a[i], "mouseout", tooltip.h); } }else if (tooltip_alt && a[i].complete){ a[i].setAttribute(tooltip.attr_name, tooltip_alt); if (a[i].getAttribute(tooltip.attr_name)){ a[i].removeAttribute("alt"); tooltip.l(a[i], "mouseover", tooltip.s); tooltip.l(a[i], "mouseout", tooltip.h); } } if (!a[i].getAttribute(tooltip.attr_name) && tooltip_blank){ // } } document.onmousemove = tooltip.m; window.onscroll = tooltip.h; tooltip.a(-99, -99); }, s: function(e){ d = window.event ? window.event.srcElement : e.target; if (!d.getAttribute(tooltip.attr_name)) return; s = d.getAttribute(tooltip.attr_name); if (tooltip.newline_entity){ s = s.replace(/\&/g,"&"); s = s.replace(/\/g,">"); s = s.replace(eval("/" + tooltip.newline_entity + "/g"), "
"); tooltip.t.innerHTML = s; }else{ if (tooltip.t.firstChild) tooltip.t.removeChild(tooltip.t.firstChild); tooltip.t.appendChild(document.createTextNode(s)); //tooltip.t.innerText = s; } tooltip.c = setTimeout("tooltip.t.style.visibility = 'visible';", tooltip.delay); tooltip.g = true; }, h: function(e){ tooltip.t.style.visibility = "hidden"; if (!tooltip.newline_entity && tooltip.t.firstChild) tooltip.t.removeChild(tooltip.t.firstChild); clearTimeout(tooltip.c); tooltip.g = false; tooltip.a(-99, -99); }, l: function(o, e, a){ if (o.addEventListener) o.addEventListener(e, a, false); // was true--Opera 7b workaround! else if (o.attachEvent) o.attachEvent("on" + e, a); else return null; }, a: function(x, y){ oCanvas = document.getElementsByTagName( (document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY" )[0]; w_width = oCanvas.clientWidth ? oCanvas.clientWidth + oCanvas.scrollLeft : window.innerWidth + window.pageXOffset; w_height = window.innerHeight ? window.innerHeight + window.pageYOffset : oCanvas.clientHeight + oCanvas.scrollTop; // should be vice verca since Opera 7 is crazy! tooltip.t.style.width = ((tooltip.max_width) && (tooltip.t.offsetWidth > tooltip.max_width)) ? tooltip.max_width + "px" : "auto"; t_width = tooltip.t.offsetWidth; t_height = tooltip.t.offsetHeight; tooltip.t.style.left = x + 8 + "px"; tooltip.t.style.top = y + 8 + "px"; if (x + t_width > w_width) tooltip.t.style.left = w_width - t_width + "px"; if (y + t_height > w_height) tooltip.t.style.top = w_height - t_height + "px"; } } var root = window.addEventListener || window.attachEvent ? window : document.addEventListener ? document : null; if (root){ if (root.addEventListener) root.addEventListener("load", tooltip.d, false); else if (root.attachEvent) root.attachEvent("onload", tooltip.d); } function postView(w, h, img, txt) { var scrnx = screen.width/2 - w/2; var scrny = screen.height/2 - h/2; window.open('../../../../?openImage&img='+escape(img)+'&text='+escape(txt),'popUp','width='+w+',height='+h+',scrollbars=no,menubar=no,toolbar=no,status=no,left='+scrnx+',top='+scrny); return false; } function re(url) { parent.location.replace = url; top.location.href = url; } var SechFlag = false; function showSech() { if (is.ns4 || (dmReady != true)) return; hideLayer(getLayer('faste')); if (SechFlag) { hideLayer(getLayer('FasteSech')); } else { showLayer(getLayer('FasteSech')); } SechFlag = !SechFlag; return; }