
function  getPageSize(){
       var xScroll, yScroll;

       if (window.innerHeight && window.scrollMaxY) {
               xScroll = document.body.scrollWidth;
               yScroll = window.innerHeight + window.scrollMaxY;
       } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
               xScroll = document.body.scrollWidth;
               yScroll = document.body.scrollHeight;
       } else if (document.documentElement && document.documentElement.scrollHeight > document.documentElement.offsetHeight){ // Explorer 6 strict mode
               xScroll = document.documentElement.scrollWidth;
               yScroll = document.documentElement.scrollHeight;
       } else { // Explorer Mac...would also work in Mozilla and Safari
               xScroll = document.body.offsetWidth;
               yScroll = document.body.offsetHeight;
       }

       var windowWidth, windowHeight;
       if (self.innerHeight) { // all except Explorer
               windowWidth = self.innerWidth;
               windowHeight = self.innerHeight;
       } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
               windowWidth = document.documentElement.clientWidth;
               windowHeight = document.documentElement.clientHeight;
       } else if (document.body) { // other Explorers
               windowWidth = document.body.clientWidth;
               windowHeight = document.body.clientHeight;
       }
	   
	
       // for small pages with total height less then height of the viewport
       if(yScroll < windowHeight){
               pageHeight = windowHeight;
       } else {
               pageHeight = yScroll;
       }

       // for small pages with total width less then width of the viewport
       if(xScroll < windowWidth){
               pageWidth = windowWidth;
       } else {
               pageWidth = xScroll;
       }

		
	/*		if (pageHeight>10000) pageHeight=pageHeight-10000;
		document.forma.res1.value = pageHeight;
		
	if (pageHeight>2300) {
			document.images.item("i4").style.display="block";
			document.images.item("i3").style.display="block";	
			document.images.item("i2").style.display="block";
			document.images.item("i1").style.display="block";
		     document.i4.style.display="block";	
			document.i3.style.display="block";
			document.i2.style.display="block";
			document.i1.style.display="block";
		     document.forma.res2.value = "add+add+add+add+add";
			 }
		else if (pageHeight>2000) {
			document.images.item("i3").style.display="block";	
			document.images.item("i2").style.display="block";
			document.images.item("i1").style.display="block";
			document.i3.style.display="block";
			document.i2.style.display="block";
			document.i1.style.display="block";
			document.forma.res2.value = "add+add+add+add";
		}
		
		else if (pageHeight>1700) {
			document.images.item("i2").style.display="block";
			document.images.item("i1").style.display="block";
			document.i2.style.display="block";
			document.i1.style.display="block";
			document.forma.res2.value = "add+add+add";
		}
		 if (pageHeight>1300) {
			document.images.item("i1").style.display="block";	
			document.i1.style.display="block";
			document.forma.res2.value = "add+add";
			}
		*/
	//	if (pageHeight>1100) {
	//		document.forma.res2.value = "add";
	//		document.images("i1").style.display="block";	
	//	}
		
		var q = document.getElementById('menue').clientWidth;
		var q2 = document.getElementById('menue2').clientWidth;
		//alert(q2); 
		//blockWidth = document.getElementById(menue).clientWidth;
		//alert(pageWidth);
		
		if (pageWidth > 1440) {
			 document.body.style.left = (pageWidth)/2-720+"px";
			 document.getElementById('menue').style.left = 1440*0.4-q/2+"px";
			 document.getElementById('menue2').style.left = 1440*0.5-q2/2+"px";}
		
		else{
				document.body.style.left = 0+"px";
				document.getElementById('menue').style.left = pageWidth*0.4-q/2+"px";
			 	document.getElementById('menue2').style.left = pageWidth*0.5-q2/2+"px";
			}
		
       return [pageWidth,pageHeight,windowWidth,windowHeight];
	   //document.write(pageWidth);
	   
}
