function SetDivHeight () {
	var footerbottom = 0;
	
	//footerbottom = alertSize() - usedpx;
	
	//Viewport();
	
	footerbottom = alertSize() - document.getElementById('pagecont').clientHeight + 30;
	
	if (footerbottom > 0) {
		document.getElementById('footer').style.paddingBottom = footerbottom + 'px';
	}
	
	
	//if((browsername.indexOf("Internet Explorer")!= -1)) {
	//	alert(document.getElementById('pagecont').clientHeight);//find height of background table
	//	alert(document.getElementById('pagecont').clientWidth);//find width of background table
	//}
	//else {
	//	alert(document.getElementById('pagecont').offsetHeight);//find height of background table
	//	alert(document.getElementById('pagecont').offsetWidth);//find width of background table
	//}
}

function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  //window.alert( 'Height = ' + myHeight );
  
  return myHeight;
}

function Viewport(){ 
	this.windowX = (document.documentElement && document.documentElement.clientWidth) || window.innerWidth || self.innerWidth || document.body.clientWidth; 
	this.windowY = (document.documentElement && document.documentElement.clientHeight) || window.innerHeight || self.innerHeight || document.body.clientHeight; 
	this.scrollX = (document.documentElement && document.documentElement.scrollLeft) || window.pageXOffset || self.pageXOffset || document.body.scrollLeft; 
	this.scrollY = (document.documentElement && document.documentElement.scrollTop) || window.pageYOffset || self.pageYOffset || document.body.scrollTop; 
	this.pageX = (document.documentElement && document.documentElement.scrollWidth) ? document.documentElement.scrollWidth : (document.body.scrollWidth > document.body.offsetWidth) ? document.body.scrollWidth : document.body.offsetWidth; 
	this.pageY = (document.documentElement && document.documentElement.scrollHeight) ? document.documentElement.scrollHeight : (document.body.scrollHeight > document.body.offsetHeight) ? document.body.scrollHeight : document.body.offsetHeight;
	alert(this.pageY);
	alert(this.windowY);
	alert(this.scrollY);
	alert(alertSize());
}