var imBrw_op=window.opera; var imBrw_ie=document.all && !imBrw_op; var imBrw_ns=document.getElementById && !imBrw_ie; var imEffectEnabled = /MSIE [678]/.test(navigator.userAgent) && navigator.platform == "Win32"; var imLoadList = ""; var imPopupEffect = true; function imGetLayer(sName) {return document.all?document.all[sName]:document.getElementById?document.getElementById(sName) : "";} function imIEBody(){return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body} function imOpenLocation(sNewLocation){ document.location = sNewLocation; } function imGetParameter(sParamName) { var sQueryString = ""; var iStart = 0; var iEnd = 0; if (window.top.location.search != 0) sQueryString = unescape(window.top.location.search); sParamName = sParamName + "="; if (sQueryString.length > 0) { iStart = sQueryString.indexOf(sParamName); if ( iStart != -1 ) { iStart += sParamName.length; iEnd = sQueryString.indexOf("&",iStart); if (iEnd == -1) iEnd = sQueryString.length; return sQueryString.substring(iStart,iEnd); } return null; } return null; } function imMenuMainHover() { if (document.getElementById("imMnMn") != null) { if (document.getElementsByTagName) { var oList = document.getElementById("imMnMn").getElementsByTagName("LI"); for (var i=0; i stop-smp.clientHeight && start > stop)) smp.style.height = (smp.clientHeight+diff) + 'px'; else { smp.style.height = stop + 'px'; if(start < stop) { clearInterval(imSMOpenTimer); imSMOpenTimer = null; } else { clearInterval(imSMCloseTimer); imSMCloseTimer = null; }} } function imSMShow(menu) { if(navigator.appVersion.indexOf('MSIE 6') == -1 && navigator.appVersion.indexOf('MSIE 5') == -1) { var imOpenedSMP; var imOpenedSMOldP; if(imSMCloseTimer == null && imSMOpenTimer == null) { if(menu.parentNode) var sm = menu.parentNode.getElementsByTagName('ul')[0]; else var sm = menu.parent.getElementsByTagName('ul')[0]; if(imOpenedSM != null) { imOpenedSMOld = imOpenedSM; imOpenedSMOldP = imOpenedSMOld.parentNode || imOpenedSMOld.parent; imSMCloseTimer = setInterval('imSMSlide(' + imOpenedSMOldP.offsetHeight + ',' + imOpenedSMOldHeight + ')',10); imOpenedSMOldP.getElementsByTagName('a')[0].blur(); imOpenedSMOldP.getElementsByTagName('a')[0].className = ''; } if(imOpenedSM != sm) { imOpenedSM = sm; imOpenedSMP = imOpenedSM.parentNode || imOpenedSM.parent; imOpenedSMOldHeight = imOpenedSMP.offsetHeight; imOpenedSMP.style.height = imOpenedSMOldHeight + 'px'; imOpenedSMP.style.overflow = 'hidden'; menu.focus(); menu.className = 'selected'; imOpenedSM.style.display = ''; while(imSMOpenTimer != null); imSMOpenTimer = setInterval('imSMSlide(' + imOpenedSMOldHeight + ',' + (imOpenedSM.offsetHeight+imOpenedSMOldHeight) + ')',10); } else imOpenedSM = null; }} else { if(imOpenedSM != null) { imOpenedSM.style.display = 'none'; imOpenedSM.parentNode.getElementsByTagName('a')[0].focus(); imOpenedSM.parentNode.getElementsByTagName('a')[0].className = ''; } if(imOpenedSM != menu.parentNode.getElementsByTagName('ul')[0]) { imOpenedSM = menu.parentNode.getElementsByTagName('ul')[0]; menu.focus(); menu.className = 'selected'; imOpenedSM.style.display = ''; } else imOpenedSM = null; }} function imX5ShowImg(sMode, cW, cH, xC, sFile, sFileZ, iMove) { document.write(''+ ''); } function imX5ShowAdv(iFullSize, iScale, sFileExt, sSoundExt, sUrl, iPreview) { document.write('
'+ ''+ '
'); } var imTimeAdv; function imObjOut(sName) { imTimeAdv=setTimeout("imSetSize('"+sName+"',0, true);",1500); } function imObjIn(sName) { clearTimeout(imTimeAdv); imSetSize(sName,1, true); } function imSetSize(sName, bVal, bRefresh) { if (bVal == 0) { if (bRefresh) imGetLayer(sName).innerHTML = imGetLayer(sName).innerHTML; imGetLayer(sName).style.width = parseInt(imGetLayer(sName+"Obj").width/4)+"px"; imGetLayer(sName).style.height = parseInt(imGetLayer(sName+"Obj").height/4)+"px"; imGetLayer(sName+"Obj").style.left = parseInt(imGetLayer(sName+"Obj").width/4-imGetLayer(sName+"Obj").width)+"px"; } else{ imGetLayer(sName).style.width = imGetLayer(sName+"Obj").width+"px"; imGetLayer(sName).style.height = imGetLayer(sName+"Obj").height+"px"; imGetLayer(sName+"Obj").style.left = "0px"; }} function imCodeProt(sAuthor) { document.oncontextmenu = function(){ alert('Copyrights '+sAuthor+'. All rights reserved.'); return false; }} function imGetUrl(sUrl) { var xmlHttp; var sResult; try { xmlHttp=new XMLHttpRequest(); } catch (e) { try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; }} } xmlHttp.open('GET', sUrl, false); xmlHttp.send(null); while (xmlHttp.readyState != 4); if (xmlHttp.status == 200) { sResult = xmlHttp.responseText; } else { sResult = "-1"; } return sResult; } function imBlogCheckComment(sAlert,sName,sEmail,sBody) { var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if(imGetLayer("form_name").value != "") { if(imGetLayer("form_email").value != "" && filter.test(imGetLayer("form_email").value)) { if(imGetLayer("form_body").value != "") return true; else alert(sAlert + ' ' + sBody); } else alert(sAlert + ' ' + sEmail); } else alert(sAlert + ' ' + sName); return false; } function imCheckForm(iType, sID, sAlert, iCount, sUrl) { var sError = ""; switch (iType) { case 0: if (imGetLayer(sID).value == "") sError = sID; break; case 1: var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (imGetLayer(sID).value == "" || !filter.test(imGetLayer(sID).value)) sError = sID; break; case 2: if (imGetLayer(sID + "_d").selectedIndex == 0 || imGetLayer(sID + "_m").selectedIndex == 0 || imGetLayer(sID + "_y").value == "") sError = sID + "_y"; break; case 3: if (imGetLayer(sID).selectedIndex == 0) sError = sID; break; case 4: var bValid = false; while(iCount-- && !bValid) if (imGetLayer(sID + (iCount+1)).checked == true) bValid = true; if(!bValid) sError = sID + "1"; break; case 5: if (imGetUrl(sUrl+'?chk='+sID+'&ans='+ escape(imGetLayer(sID).value)) != '0') sError = sID; break; case 6: if (imGetUrl('captcha/imcaptcha.php?action=check&code='+imGetLayer(sID+'_cpf').value+'&ans='+imGetLayer(sID+'_cpv').value) != '0') sError = sID+'_cpv'; break; } if(sError != "") { alert(sAlert); imGetLayer(sError).focus(); return (false); } return (true); } function imShowCaptcha(sName) { var sCode = ""; var i; var sChar; for (i=0; i<5; i++) { do sChar = parseInt(Math.random()*9); while (sCode.indexOf(sChar) > -1) sCode = sCode+sChar; } imGetLayer(sName+"_cpf").value=sCode; imGetLayer(sName+"_cpn").src="captcha/imcaptcha.php?action=show&code="+sCode; } function imFocus(oCtl, sColor) { oCtl.style.backgroundColor = sColor; } function imFilterCheck(oEvent,expr){ if (imEffectEnabled) iKey = oEvent.keyCode; else iKey = oEvent.which; sKey = String.fromCharCode(iKey); if (expr.test(sKey)) return true; else return false; } function imKeyFilter(iType, oEvent){ if (iType == 0) expr = /[\d\n\b]/; else if (iType == 1) expr = /[\d\n\b\- ]/; else if (iType == 2) expr = /[\d\n\b\/\.]/; return imFilterCheck(oEvent,expr); } function IMTip() { var el = imGetLayer('imToolTip'); var oldmove; var attached = false; var effect_step = 0; var effect_timer = null; this.imShown = false; this.show = function(obj,content,position,x,y,content_style,must_move,effect,pos_x,pos_y) { this.imLeft = 0; this.imRight = 0; this.imTop = 0; this.imBottom = 0; el.style.top = '-10000px'; el.style.bottom = ''; el.style.left = '-10000px'; el.style.right = ''; switch(position) { case 'tl': this.imLeft = 1; this.imTop = 1; break; case 'tr': this.imRight = 1; this.imTop = 1; break; case 'bl': this.imLeft = 1; this.imBottom = 1; break; case 'br': this.imRight = 1; this.imBottom = 1; break; } this.imX = (x ? x : 0); this.imY = (y ? y : 0); el.style.display = 'none'; el.innerHTML = '
' + content + '
'; el.imMustMove = must_move; this.imShown = true; switch(effect) { case 0: el.style.display = ''; break; case 1: clearTimeout(this.effect_timer); this.effect_step = 0; el.style.height = ''; this.fade(); break; case 2: clearTimeout(this.effect_timer); this.effect_step = 0; el.style.height = ''; el.style.opacity = 0.9; el.style.filter = 'alpha(opacity=90)'; el.style.visible='hidden'; el.style.display = ''; elch = el.clientHeight; el.style.display = 'none'; el.style.visible='visible'; this.slide(elch); break; } if(el.imMustMove == true) { this.detach(); document.onmousemove = function(e) { this.imTip.move(e); }; el.onmouseover = function(e) { imt.move(e); }; } else { if(this.imLeft == 1) { el.style.left = (pos_x != undefined ? pos_x : (this.mouseX-this.imX+10)) + 'px'; } else { el.style.right = (pos_x != undefined ? document.documentElement.clientWidth-pos_x : (document.documentElement.clientWidth-this.mouseX-this.imX+10)) + 'px'; } if(this.imTop == 1) { el.style.top = (pos_y != undefined ? pos_y : (this.mouseY-this.imY+10)) + 'px'; } else { el.style.bottom = (pos_y != undefined ? document.documentElement.clientHeight-pos_y : (document.documentElement.clientHeight-this.mouseY+this.imY+10)) + 'px'; }} return false; }; this.mousepos = function(evt) { var e = (evt) ? evt : window.event; this.mouseX = ((e.pageX) ? e.pageX : (e.clientX + document.documentElement.scrollLeft)); this.mouseY = ((e.pageY) ? e.pageY : (e.clientY + document.documentElement.scrollTop)); }; this.attach = function() { this.attached = true; document.imOldOnMouseMove = document.onmousemove; document.imTip = this; document.onmousemove = function(e) { this.imTip.mousepos(e); }; }; this.detach = function() { if(this.attached) { this.attached = false; document.onmousemove = document.imOldOnMouseMove; }}; this.fade = function() { if(this.effect_step <= 100) { el.style.opacity = this.effect_step/100; el.style.filter = "alpha(opacity=" + this.effect_step + ")"; if(this.effect_step == 0) { el.style.display = ''; } this.effect_step += 15; this.effect_timer = setTimeout('imt.fade()',50); }}; this.slide = function(height) { if(this.effect_step <= 100) { el.style.height = height/100*this.effect_step + 'px'; if(this.effect_step == 0) { el.style.display = ''; } this.effect_step += 5; this.effect_timer = setTimeout('imt.slide(' + height + ')',25); }}; this.move = function(evt) { var e = (evt) ? evt : window.event; if(this.imLeft != 0) { el.style.left = (((e.pageX) ? e.pageX : (e.clientX + document.documentElement.scrollLeft))-this.imX+10) + 'px'; el.style.right = ''; } else { el.style.right = (((e.pageX) ? document.documentElement.clientWidth-e.pageX : (document.documentElement.clientWidth-e.clientX-document.documentElement.scrollLeft))-this.imX+10) + 'px'; el.style.left = ''; } if(this.imTop != 0) { el.style.top = (((e.pageY) ? e.pageY : (e.clientY + document.documentElement.scrollTop))-this.imY+10) + 'px'; el.style.bottom = ''; } else { el.style.bottom = ((e.pageY ? document.documentElement.clientHeight-e.pageY : (document.documentElement.clientHeight-e.clientY-document.documentElement.scrollTop))-this.imY+10) + 'px'; el.style.top = ''; }}; this.hide = function() { this.imShown = false; el.style.display = 'none'; el.innerHTML = ''; el.style.top = '-10000px'; el.style.bottom = ''; el.style.left = '-10000px'; el.style.right = ''; document.onmousemove = document.imOldOnMouseMove; el.onmouseover = function(){}; this.attach(); }; } function imGetPositionX(obj,head) { var ie7u = navigator.appVersion.indexOf('MSIE') != -1 && navigator.appVersion.indexOf('MSIE 8') == -1; head = head && !ie7u; iX = obj.offsetLeft; if(!head) do { obj = obj.parent || obj.parentNode; iX += obj.offsetLeft; } while(obj.id != 'imPage' && obj.id != 'imSite'); return iX; } function imGetPositionY(obj,head) { var ie7u = navigator.appVersion.indexOf('MSIE') != -1 && navigator.appVersion.indexOf('MSIE 8') == -1; head = head && !ie7u; iY = obj.offsetTop; if(!head) do { obj = obj.parent || obj.parentNode; iY += obj.offsetTop; } while(obj.id != 'imPage' && obj.id != 'imSite'); return iY; } function imTipShow(oLink,iVal,iWidth,sBgColor,sBdColor,sFColor,sFont,iSize,bBold,bItalic,sHtml,iMode,bHead) { oLink.title = ''; var sStyle = 'position: relative; width: '+iWidth+'px; padding: '+iVal[3]+'px 0 '+iVal[3]+'px 0; margin: '+iVal[5]+'px;'; var sBuf = ''+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ sHtml+ '
'; if (iVal[1] != 0) sBuf += (iVal[1]==1?'