function xClientWidth()
{
    var v=0,d=document,w=window;
    if(d.compatMode == 'CSS1Compat' && !w.opera && d.documentElement && d.documentElement.clientWidth)
    {v=d.documentElement.clientWidth;}
    else if(d.body && d.body.clientWidth)
    {v=d.body.clientWidth;}
    else if(xDef(w.innerWidth,w.innerHeight,d.height)) {
    v=w.innerWidth;
    if(d.height>w.innerHeight) v-=16;
    }	
    return v;
}

function xClientHeight()
{
  var v=0,d=document,w=window;
    if(d.compatMode == 'CSS1Compat' && !w.opera && d.documentElement && d.documentElement.clientHeight)
    {v=d.documentElement.clientHeight;}
    else if(d.body && d.body.clientHeight)
    {v=d.body.clientHeight;}
    else if(xDef(w.innerWidth,w.innerHeight,d.width)) {
    v=w.innerHeight;
    if(d.width>w.innerWidth) v-=16;
     }
    return v;
}


function getObj(theId) {
        if (document.getElementById) {
                theObj = document.getElementById(theId);
        } else if (document.all) {
                theObj = document.all[theId];
        }
        return theObj;
}

Prepare = function() {
	var ie = document.all ? true : false;
	if (!ie) {
		ctable = getObj('ctable');
		ctable.style.height = xClientHeight()-150;
		getObj('topnav').style.marginTop = 10;
	}
	//getObj("wrap").style.height;
	//ctable.innerHTML = getObj("wrap").style.height;
}


