
// Find out which method we need to use to move the DIVs:

var NN4 = document.layers? true : false; //Netscape Navigator 4.x.
var IE4 = document.all? true : false; // IE version 4 and above.

// Assume anything else is Mozilla or compatible

var iWidth = 0;
var iHeight = 0;
var iH = 0;

// Set the minimum page dimensions:
// minWidth depends on min permissible width of content section
// minHeight depends on min permissible height of content section

//	var minHeight = 730;
	var minWidth = 780;

function arrangeDIVs() {
// positionDIV(divID,xpos,ypos,width, height)
// Do the footer elements first as they affect IE's, er, judgement of width!
	var iMHeight = iH;
	getHeight(iMHeight);
// Check dimensions again or IE can't figure out if it has a scroll bar!
	getWidth();
	eWidth = iWidth - minWidth;
	positionDIV('ctN',94 + ((eWidth) / 2),65,-1,-1)
	positionDIV('leftL',29,25,-1,-1)
	positionDIV('fL',194,5,-1,-1)
	positionDIV('rightL',(iWidth - 157),25,-1,-1)
	positionDIV('gN',82 + ((eWidth) / 2),95,-1,-1)
	positionDIV('gNEmpties',82 + ((eWidth) / 2),113,-1,-1)
	positionDIV('links',30,145,-1,-1)
	positionDIV('cont',215,147,(360 + (eWidth)),-1)
	positionDIV('banners',(iWidth - 155),138,-1,-1)
	for (i=1;i<lngNC1;i++) {
		positionDIV('dd' + i,(80 + ((eWidth) / 2)),113,-1,-1)
	}
}

function getHeight(iH) {
	var iMGHeight = iH;
	if (IE4) { iHeight = document.body.clientHeight; }
	else if(NN4) { iHeight = window.innerHeight - 1; }
	else { iHeight = document.body.clientHeight - 1; } // N6 or similar
	if (iHeight < iMGHeight) { iHeight = iMGHeight; }
}

function getWidth() {
	if (IE4) { iWidth = document.body.clientWidth; }
	else if(NN4) { iWidth = window.innerWidth; }
	else { iWidth = document.body.clientWidth; } // N6 or similar
	if (iWidth < minWidth) { iWidth = minWidth; }
}

function positionDIV(divID,divLeft,divTop,divWidth,divHeight) {
	if (IE4) {
		if (divLeft != -1) { document.all[divID].style.left = divLeft; }
		if (divTop != -1) { document.all[divID].style.top = divTop; }
		if (divWidth != -1) { document.all[divID].style.width = divWidth; }
		if (divHeight != -1) { document.all[divID].style.height = divHeight; }
	}
	else if(NN4) {
		if (divLeft != -1) { document.layers[divID].left = divLeft; }
		if (divTop != -1) { document.layers[divID].top = divTop; }
		if (divWidth != -1) { document.layers[divID].width = divWidth; }
		if (divHeight != -1) { document.layers[divID].height = divHeight; }
	}
	else { // N6 or similar
		if (divLeft != -1) { document.getElementById(divID).style.left = divLeft; }
		if (divTop != -1) { document.getElementById(divID).style.top = divTop; }
		if (divWidth != -1) { document.getElementById(divID).style.width = divWidth; }
		if (divHeight != -1) { document.getElementById(divID).style.height = divHeight; }
	}

}

