var receipt_popup=null;var trans_popup=null;function PopReceipt(a){if((receipt_popup==null)||(receipt_popup.closed)){var b="width=640,height=540,scrollbars=yes";receipt_popup=window.open(a,"",b)}else{receipt_popup.document.location.href=a}}function PopImage(a){if((trans_popup==null)||(trans_popup.closed)){var b="width=800,height=600,scrollbars=yes,resizable=yes";trans_popup=window.open(a,"",b)}else{trans_popup.document.location.href=a}}function PopTranslationWindow(a){if((trans_popup==null)||(trans_popup.closed)){var b="width=640,height=640,scrollbars=yes";trans_popup=window.open(a,"",b)}else{trans_popup.document.location.href=a}}function numeric_onkeypress(a){var b;if(document.all){b=a.keyCode}else{b=a.charCode}keyvalid=(((b>34)&&(b<41))||((b>47)&&(b<58))||(((b==99)||(b==67)||(b==86)||(b==118))&&(a.ctrlKey))||(b==0));if(!keyvalid){a.returnValue=false;if(document.all){return false}a.preventDefault();return false}return true}var _tpNS=(document.all)?false:true;function getOfsLeft(b){var d=b;var e=b.offsetLeft;var c=0;while((b=b.offsetParent)!=null){e+=b.offsetLeft;if(b.offsetParent&&b.offsetParent.offsetParent){var a=b.offsetParent.scrollLeft;if(!isNaN(a)){c-=a}}}b=d;if(_tpNS){while((b=b.parentNode)!=null){if(b.parentNode&&b.parentNode.parentNode&&!(b.parentNode.tagName&&b.parentNode.tagName.toUpperCase()=="BODY")){var a=b.parentNode.scrollLeft;if(!isNaN(a)&&a>0){c-=a}}}}return e+c}function getOfsTop(b){var a=b.offsetTop;var e=b;var c=0;while((b=b.offsetParent)!=null){a+=b.offsetTop;if(b.offsetParent&&b.offsetParent.offsetParent){var d=b.offsetParent.scrollTop;if(!isNaN(d)){c-=d}}}b=e;if(_tpNS){while((b=b.parentNode)!=null){if(b.parentNode&&b.parentNode.parentNode&&!(b.parentNode.tagName&&b.parentNode.tagName.toUpperCase()=="BODY")){var d=b.parentNode.scrollTop;if(!isNaN(d)&&d>0){c-=d}}}}return a+c}function popUser(g,c,b,f){var a=getOfsLeft(g)-220;var e=getOfsTop(g);if(a<0){a=getOfsLeft(g)+22}var d=document.getElementById(b);if(d!=null){document.body.removeChild(d)}d=document.createElement("iframe");d.src=c;d.style.position="absolute";d.style.left=a+"px";d.style.top=e+"px";d.style.border="0";d.id=b;d.width="220px";d.height="147px";d.allowTransparency="true";d.setAttribute("scrolling","no");d.setAttribute("frameBorder","0");document.body.appendChild(d)}function getWindowHeight(){var a=0;if(typeof(window.innerHeight)=="number"){a=window.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){a=document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){a=document.body.clientHeight}}}return a}function setFooter(d){if(document.getElementById){var b=getWindowHeight();if(b>0){var c=d;var a=c.offsetHeight;if(b-a>=0){c.style.position="relative";c.style.top=(b-a)+"px"}else{c.style.position="static"}}}}function openHelp(i,c,k,d){var n=c;var o=k;var g=0;var b=0;var a="yes";var l="no";if(screen.width){g=(screen.width-n)/2;b=(screen.height-o)/2;if(screen.width<=800){a="yes";l="yes"}}if(g<0){g=0}if(b<0){b=0}var j="channelmode=0, directories=no, fullscreen=no, height="+o+", left="+g+", location=no, menubar=no, resizable="+l+", scrollbars="+a+", status=no, titlebar=no, toolbar=no, top="+b+", width="+n;var m=new String(Math.random());m=m.substring(2,11);var e=window.open(i+"&random="+m,d,j);e.focus()}function openGame(i,c,k,d){var n=c;var o=k;var g=0;var b=0;var a="no";var l="yes";if(screen.width){g=((screen.width-n)/2);b=((screen.height-o)/2);if(screen.width<=800){a="yes"}}if(g<0){g=0}if(b<0){b=0}var j="channelmode=0, directories=no, fullscreen=no, height="+o+", left="+g+", location=no, menubar=no, resizable="+l+", scrollbars="+a+", status=no, titlebar=no, toolbar=no, top="+b+", width="+n;var m=new String(Math.random());m=m.substring(2,11);var e=window.open(i+"&random="+m,d,j);e.focus()}function openGameDev(c,b,a,d){openGame(c,b,a,new Date().getMilliseconds()+"")}function getScrollXY(){var b=0,a=0;if(typeof(window.pageYOffset)=="number"){a=window.pageYOffset;b=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){a=document.body.scrollTop;b=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){a=document.documentElement.scrollTop;b=document.documentElement.scrollLeft}}}return[b,a]}function getWindowHeight(){var a=0,b=0;if(typeof(window.innerWidth)=="number"){a=window.innerWidth;b=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){a=document.body.clientWidth;b=document.body.clientHeight}}}return[a,b]}function assignToEventHandlers(a){a();if(typeof(window.innerWidth)=="number"){window.onscroll=chainEvents(a,window.onscroll);window.onresize=chainEvents(a,window.onresize)}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){document.body.onscroll=chainEvents(a,document.body.onscroll);document.body.onresize=chainEvents(a,document.body.onresize)}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){document.body.onscroll=chainEvents(a,document.body.onscroll);document.body.onresize=chainEvents(a,document.body.onresize)}}}}function chainEvents(b,a){return function(){b();if(a!=null){a()}}};