﻿/* VERSION 1.0.5 */

function disableRightClick(){if(document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=function(){if(document.layers||document.getElementById&&!document.all){if(e.which==2||e.which==3){return false;}}};}else if(document.all&&!document.getElementById){document.onmousedown=function(){if(event.button==2){return false;}};}
document.oncontextmenu=new Function("return false");};function domain(){var url=window.location.protocol+"//"+window.location.host+"/";return url;};function baseDir(level){var level=(typeof(level)!="number"||level<0?0:level);if(level==0){return domain();}
var url=window.location.pathname.split("/");url=url.slice(1,level+1);return domain()+url.join("/")+"/";};function go(url){window.location.href=url;};function dw(str){document.write(str);};function refresh(){window.location.href=window.location.href;};function isEnterPress(evt){var evt=(evt)?evt:event;var charCode=(evt.charCode)?evt.charCode:((evt.which)?evt.which:evt.keyCode);if(charCode==13||charCode==3){return true;}else{return false;}};function getQS(varName){var qs=window.location.search;var rexp=new RegExp("("+varName+"=)","i");if(varName==0){return qs;}
else if(qs.search(rexp)==-1){return'';}
else{rexp.compile("([\?|&]"+varName+"=)([^&]*)","gi");var arVal=qs.match(rexp);var thisStr="";for(i in arVal){if(typeof(arVal[i])!="string"){continue;}
arVal[i]=arVal[i]+"";thisStr=arVal[i].split("=");thisStr[1]=thisStr[1].replace(/\+/gi,' ');arVal[i]=unescape(thisStr[1]);}
return arVal;}};function isNothing(v){return new String(v)==(''||'undefined'||'null');};function setCookie(cookieName,cookieValue,expireDays,cookiePath){var exdate=new Date();if(!isNothing(expireDays)&&!isNaN(expireDays)){var d=expireDays*24;d*=60;d*=60;d*=1000;exdate=new Date(exdate.valueOf()+d);}
document.cookie=cookieName+"="+escape(cookieValue)+";expires="+exdate.toGMTString()+";path="+(isNothing(cookiePath)?"/":cookiePath);};function getCookie(cookieName){if(document.cookie.length>0){c_start=document.cookie.indexOf(cookieName+"=");if(c_start!=-1){c_start=c_start+cookieName.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length;}
return unescape(document.cookie.substring(c_start,c_end));}}
return null;};function EventHandler(){this.arEvents=new Array();this.attach=function(executable){this.arEvents.push(executable);};this.execute=function(){var i;var n=this.arEvents.length;for(i=0;i<n;i++){eval(this.arEvents[i]);};this.clearEvents();};this.clearEvents=function(){this.arEvents.length=0;};};function getDocumentHeight(){var docHeight;if(typeof document.height!='undefined'){docHeight=document.height;}else if(document.compatMode&&document.compatMode!='BackCompat'){docHeight=document.documentElement.scrollHeight;}else if(document.body&&typeof document.body.scrollHeight!='undefined'){docHeight=document.body.scrollHeight;}
return docHeight;};function popup(url,attr){if(typeof(attr)!='object'){attr={};}
if(!Math.isNumeric(attr['width'])){attr['width']=640;}
if(!Math.isNumeric(attr['height'])){attr['height']=480;}
if(!Math.isNumeric(attr['left'])){attr['left']=Math.floor((getScreenWidth()*.5)-(attr.width*.5));}
if(!Math.isNumeric(attr['top'])){attr['top']=Math.floor((getScreenHeight()*.5)-(attr.height*.5))-40;}
switch(attr['status']){case'no':case'yes':break;default:attr['status']='no';}
switch(attr['toolbar']){case'no':case'yes':break;default:attr['toolbar']='no';}
attr.scrollbars='yes';var a=[];for(var k in attr){switch(typeof(attr[k])){case'string':case'number':a.push(k+'='+attr[k]);break;}}
thisWin=window.open(url,"popup",a.join(','));thisWin.focus();return thisWin;};function getScreenWidth(){if(screen.width){return screen.width}
else if(screen.availWidth){return screen.availWidth}
else{return 640}};function getScreenHeight(){if(screen.height){return screen.height}
else if(screen.availHeight){return screen.availHeight}
else{return 480}};function zebraStripe(elemsArray){elemsArray.each(function(s,i){if(i%2==0){elemsArray[i].addClassName('alt');}});};