
var Utility=new Object();
Utility.getScrollX=function(){
var xScroll;
if(window.innerHeight&&window.scrollMaxY){
xScroll=window.innerWidth+window.scrollMaxX;}else if(document.body.scrollHeight>document.body.offsetHeight){
xScroll=document.body.scrollWidth;}else{
xScroll=document.body.offsetWidth;}
return xScroll;}
Utility.getScrollY=function(){
var yScroll;
if(window.innerHeight&&window.scrollMaxY){
yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){
yScroll=document.body.scrollHeight;}else{
yScroll=document.body.offsetHeight;}
return yScroll;}
Utility.getWindowWidth=function(){
var windowWidth,windowHeight;
if(self.innerHeight){
if(document.documentElement.clientWidth){
windowWidth=document.documentElement.clientWidth;}else{
windowWidth=self.innerWidth;}}else if(document.documentElement&&document.documentElement.clientHeight){
windowWidth=document.documentElement.clientWidth;}else if(document.body){
windowWidth=document.body.clientWidth;}
return windowWidth;}
Utility.getWindowHeight=function(){
var windowHeight;
if(self.innerHeight){
windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){
windowHeight=document.documentElement.clientHeight;}else if(document.body){
windowHeight=document.body.clientHeight;}
return windowHeight;}
Utility.getPageWidth=function(){
var xScroll=Utility.getScrollX();
var windowWidth=Utility.getWindowWidth();
return(xScroll>windowWidth)?xScroll:windowWidth;}
Utility.getPageHeight=function(){
var yScroll=Utility.getScrollY();
var windowHeight=Utility.getWindowHeight();
return(yScroll>windowHeight)?yScroll:windowHeight;}
var Validator=new Object();
Validator.isEmpty=function(strText){
if(null==strText){
return false;}
return(strText.length==0);}
Validator.isInteger=function(strText){
if(this.isEmpty(strText)){
return false;}
var reg=/(\+)?[1-9]+(\d)*/gi;
return reg.test(strText);}
Validator.isEmail=function(strText){
if(this.isEmpty(strText)){
return false;}
var reg=/^(?:\w+\.?)*\w+@(?:\w+\.)+\w+$/;
return reg.test(strText);}
