var onLoad = ""; window.onload = new Function("eval(onLoad)"); zen_bFirefox = navigator.appName == "Netscape"; zen_bIE4 = navigator.appName.indexOf("Explorer")!=-1 && navigator.appVersion.indexOf("MSIE 4")!=-1; var zen_ie = /MSIE (\d+\.\d+);/.test(navigator.userAgent); var zen_sf = /Version[\/\s](\d+\.\d+)(\.\d+)[\/\s]Safari/.test(navigator.userAgent); var zen_ff = /Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent); /*** layout */ function winSize() { var winWidth = 0; if (typeof(window.innerWidth) == 'number') winWidth = window.innerWidth; else if (document.documentElement && document.documentElement.clientWidth) winWidth = document.documentElement.clientWidth; else if (document.body && document.body.clientWidth) winWidth = document.body.clientWidth; return winWidth; } function winHeight() { var winHeight = 0; if (typeof(window.innerHeight) == 'number') winHeight = window.innerHeight; else if (document.documentElement && document.documentElement.clientHeight) winHeight = document.documentElement.clientHeight; else if (document.body && document.body.clientHeight) winHeight = document.body.clientHeight; return winHeight; } function pageX(element) { var curleft = 0; if (element && (document.getElementById || document.all)) while (element && element.offsetParent) { curleft += element.offsetLeft; element = element.offsetParent; } return curleft; } function pageY(element) { var curTop = 0; if (element && (document.getElementById || document.all)) while (element && element.offsetParent) { curTop += element.offsetTop; element = element.offsetParent; } return curTop; } function zen_documentWrite(text) { document.write(text); } /*** objects */ function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i0) { var date = new Date(); date.setTime(date.getTime() + (days*24*60*60*1000)); var expires = "; expires="+ date.toGMTString(); } else expires = ""; document.cookie = name +"="+ value + expires +"; path=/"; } function readCookie(name) { var nameEQ = name +"="; var ca = document.cookie.split(';'); for(var i=0; i2) { MM_preloadImages(path+imgD); elem.onmousedown = new Function ("MM_swapImage('"+elem.id+"','','"+path+imgD+"',1)"); } } /*** pop-up */ function popUpImg (URL){ if (imgP.width==0 || imgP.height==0) setTimeout("popUpImg ('"+URL+"')",100); else window.open(URL,"","width="+ (imgP.width+20) +",height="+ (imgP.height+30)); } function popUp (URL){ var est=URL.substr(URL.length-3); if ((est=="jpg" || est=="gif") && !bMacIE) { imgP = new Image(); imgP.src = URL; popUpImg (URL); } else window.open(URL,"","scrollbars=yes, resizable"); } Object.extend = function(destination, source) { for (property in source) { destination[property] = source[property]; } return destination; }