﻿function findPosLeft(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetLeft;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.x){a+=b.x}}return a}function findPosTop(b){var a=0;if(b.offsetParent){while(1){a+=b.offsetTop;if(!b.offsetParent){break}b=b.offsetParent}}else{if(b.y){a+=b.y}}return a}function posTop(){if(typeof window.screenY!="undefined"){return window.screenY}else{return window.screenTop}}function posLeft(){if(typeof window.screenX!="undefined"){return window.screenX}else{return window.screenLeft}}function windowHeight(){var a=0;if(typeof(window.innerWidth)=="number"){a=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){a=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){a=document.body.clientHeight}}}return a}function windowWidth(){var a=0;if(typeof(window.innerWidth)=="number"){a=window.innerWidth}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){a=document.documentElement.clientWidth}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){a=document.body.clientWidth}}}return a}function clickButton(d,c){var a=d?d:window.event;var b=document.getElementById(c);if(b){if(a.keyCode==13){b.click();return false}}}function cancelEnterKey(b){var a=b?b:window.event;if(a.keyCode==13){return false}}function formatNumber(f,d){d=d||"";f+="";var c=f.split(".");var b=c[0];var e=c.length>1?"."+c[1]:"";var a=/(\d+)(\d{3})/;while(a.test(b)){b=b.replace(a,"$1"+d+"$2")}return b+e};
