// JavaScript Document

function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}








		function reportSize() {

//if(window.innerWidth)
   // alert(window.innerWidth + " x " + window.innerHeight);
//else if(document.documentElement && document.documentElement.offsetWidth && document.documentElement.offsetWidth > 0)
   // alert(document.documentElement.offsetWidth + " x " + document.documentElement.offsetHeight);
//else if(document.body && document.body.offsetWidth && document.body.offsetWidth > 0)
  //  alert(document.body.offsetWidth + " x " + document.body.offsetHeight);
//else {
 //   alert("Unknown browser configuration.");
}//}


		function reportSize2() {
alert("Hello derr");
		  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;
		      }
		    }
		  }
		}
		function setInnerWidth(w,h){
			window.resizeTo(800,800);
			reportSize();
			var oX = 800-myWidth;
			var oY = 800-myHeight;
			window.resizeTo( (w+oX) , (h+oY) );
		}
		function doTest(){
			//alert("hello");
			reportSize();
			//document.getElementById("currentvalues").innerHTML = "Current inner: "+myWidth+"*"+myHeight;
		}
		function init2(){
			window.onresize = doTest;
			doTest();
		}