function getViewportSize() { 
 var x, y; 
 if (self.innerHeight) { // MOS 
  y = self.outerHeight; 
  x = self.outerWidth; 
 }
 else if (document.documentElement && document.documentElement.clientWidth) { // IE6 Strict 
  x = document.documentElement.clientWidth; 
  y = document.documentElement.clientHeight; 
 }
 else if (document.body.clientHeight) { // IE quirks 
  y = document.body.clientHeight; 
  x = document.body.clientWidth; 
 } 
 return x; 
} 

function getViewportSizeY() { 
 var x, y; 
 if (self.innerHeight) { // MOS 
  y = self.outerHeight; 
  x = self.outerWidth; 
 }
 else if (document.documentElement && document.documentElement.clientWidth) { // IE6 Strict 
  x = document.documentElement.clientWidth; 
  y = document.documentElement.clientHeight; 
 }
 else if (document.body.clientHeight) { // IE quirks 
  y = document.body.clientHeight; 
  x = document.body.clientWidth; 
 } 
 return y; 
} 

function getTop(o){
		var nTop = null;
			if(o){
				do{
					nTop += o.offsetTop;
					o = o.offsetParent;
				} while(o)
			}
			return nTop;
	}
	
	function getLeft(o){
		var nLeft = null;
		if(o){
			do{
				nLeft += o.offsetLeft;
				o = o.offsetParent;
			} while(o)
		}
		return nLeft;
	}

