var Browser={onLoad:[],redirect:function(url){document.location=url;},registerOnLoad:function(callback){Browser.onLoad.push(callback);},doOnLoad:function(){if(Browser.onLoad.length>0){for(loadId in Browser.onLoad){if(typeof(Browser.onLoad[loadId])=='string'){eval(Browser.onLoad[loadId]);}else if(typeof(Browser.onLoad[loadId])=='function'||(typeof(Browser.onLoad[loadId])=='object'&&Browser.isIE())){Browser.onLoad[loadId]();}}}},isIE:function(){return(navigator.userAgent.indexOf('MSIE')!=-1);},hasCookie:function(){var tmpcookie=new Date();chkcookie=(tmpcookie.getTime()+'');document.cookie="chkcookie="+chkcookie+"; path=/";if(document.cookie.indexOf(chkcookie,0)<0){return false;}else{return true;}},scroll:function(positionY){fullScrollTime=100;amountScrolls=50;Browser.scrollTo=positionY;Browser.currentY=posTop();if(Browser.scrollTo>Browser.currentY){Browser.scrollDirection=1;}else{Browser.scrollDirection=-1;}Browser.incrementAmount=Math.ceil(Math.abs(Browser.currentY-Browser.scrollTo)/amountScrolls);Browser.scrollInterval=window.setInterval('Browser.scrollIntervalCallback()',Math.ceil(fullScrollTime/amountScrolls));},scrollIntervalCallback:function(){if(posTop()!=Browser.currentY){window.clearInterval(Browser.scrollInterval);return false;}if(Browser.scrollDirection==1){if((Browser.currentY+Browser.incrementAmount)>Browser.scrollTo){window.scroll(0,Browser.scrollTo);window.clearInterval(Browser.scrollInterval);}else{window.scroll(0,Browser.currentY+Browser.incrementAmount);}}else{if((Browser.currentY-Browser.incrementAmount)<Browser.scrollTo){window.scroll(0,Browser.scrollTo);window.clearInterval(Browser.scrollInterval);}else{window.scroll(0,Browser.currentY-Browser.incrementAmount);}}Browser.currentY=posTop();},pageWidth:function(){return window.innerWidth!=null?window.innerWidth:document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:document.body!=null?document.body.clientWidth:null;},pageHeight:function(){return window.innerHeight!=null?window.innerHeight:document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:document.body!=null?document.body.clientHeight:null;},posLeft:function(){return typeof window.pageXOffset!='undefined'?window.pageXOffset:document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft?document.body.scrollLeft:0;},posTop:function(){return typeof window.pageYOffset!='undefined'?window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop?document.body.scrollTop:0;},posRight:function(){return Browser.posLeft()+Browser.pageWidth();},posBottom:function(){return Browser.posTop()+Browser.pageHeight();},getPositionEvent:function(e){e=e||window.event;var cursor={x:0,y:0};if(e.pageX||e.pageY){cursor.x=e.pageX;cursor.y=e.pageY;}else{var de=document.documentElement;var b=document.body;cursor.x=e.clientX+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||0);cursor.y=e.clientY+(de.scrollTop||b.scrollTop)-(de.clientTop||0);}return cursor;}};window.onload=function(){Browser.doOnLoad();}