/* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
	Written by Bugimus 
	Copyright © 2001-2002 Bugimus, all rights reserved.
	You may use this code for your own *personal* use provided you leave this comment block intact.  
	A link back to Bugimus' page would be much appreciated.  
	http://bugimus.com/

	This script should work for NN4, NN6, IE5+, and OP6
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- */
IE5=NN4=NN6=OPA=false
if(navigator.userAgent.toLowerCase().indexOf("opera")+1)OPA=true
else if(document.all)IE5=true
else if(document.layers)NN4=true
else if(document.getElementById)NN6=true

onload=initialize   // call initialize() when page loads
onresize=rePos      // call rePos() whenever page is resized

// Opera doesn't have an onresize event so you have to call rePos all the time.
if(OPA) setInterval("rePos()",500)
function initialize() {
	
	if(NN4){
		head=document.headD
		menu=document.menuD
		main=document.mainD
		bottom=document.bottomD
	}
	else{
		head=document.getElementById("headD").style
		menu=document.getElementById("menuD").style
		main=document.getElementById("mainD").style
		bottom=document.getElementById("bottomD").style
	}
	rePos()
}

w=980

function rePos() {

	if(NN4||NN6) {
		xc=Math.round((window.innerWidth/2)-(w/2))
	} else {
		xc=Math.round((document.body.clientWidth/2)-(w/2))
	}
	if(this.NN4) {
		head.moveTo(xc,0)
		menu.moveTo(xc,0)
		main.moveTo(xc,0)
		bottom.moveTo(xc,0)
	} else {
		head.padding = "0px 0px 0px "+ xc + "px"
		menu.padding = "0px 0px 0px "+ xc + "px"
		main.padding = "0px 0px 0px "+ xc + "px"
		bottom.padding = "0px 0px 0px "+ xc + "px"
	}
}