

var h = 0;
var w = 0;
//document.write("Screen available height="+screen.availHeight)
//document.write(" Screen available width="+screen.availWidth)
//document.write(" Your browser\'s dimensions are: ")
if (window.innerWidth) //if browser supports window.innerWidth
{
//document.write(" innerwidth "+window.innerWidth+" by "+window.innerHeight)
w=window.innerWidth
h=window.innerHeight
}
else if (document.all) //else if browser supports document.all (IE 4+)
{
//w=document.body.clientWidth
//h=document.body.clientHeight
document.compatMode=='CSS1Compat'? w=document.documentElement.clientWidth : w=body.clientWidth;
document.compatMode=='CSS1Compat'? h=document.documentElement.clientHeight : h=body.clientHeight;
//document.write("clientwidth "+w+" by "+h)
var tp=h/2-300
var stp = String(tp)
stp = stp +"px"
//var docElement = document.getElementsByTagName("body");
//document.write(" body top= "+docElement.item(0).style.top)
//docElement.item(0).style.top=stp
//document.write(" body top 1= "+document.body.style.marginTop)
document.body.style.marginTop=stp
//document.write(" body top 2= "+document.body.style.marginTop)

}
//w=screen.availWidth
//h=screen.availHeight
w = w/2;
h=h/2;
pw = document.body.clientWidth;
ph = document.body.clientHeight;
//document.write(" clientheight="+ph+" clientwidth="+pw)
mt = h-600/2+100;
ml = w-902/2;
//document.write(" before h="+h+" w="+w+" mt="+mt+" ml="+ml)

//document.getElementById('MenuPos').style.backgroundColor="red"
//var TLoc = document.getElementById('MenuPos')
//document.write("MenuPos offset top="+TLoc.offsetTop+" offset left="+TLoc.offsetLeft)
var sw = String(w)
sw = sw +"px"
var sh = String(h)
sh = sh + "px"
var smt = String(-30)
smt = smt +"px"
var sml = String(-100)
sml = sml + "px"
//the below worked but did not provide the result I wanted
//document.getElementById('MenuPos').style.top=sh
//document.getElementById('MenuPos').style.left=sw
//document.getElementById('MenuPos').style.marginTop=smt
//document.getElementById('MenuPos').style.marginLeft=sml
//document.write("MenuPos offset top="+TLoc.offsetTop+" offset left="+TLoc.offsetLeft)


//var getValue = document.all.style.top
//var attributeobj=document.getElementById("MenuPos").getAttributeNode("height")
//attributeobj.value="center"




