//vars for the main window..
var intWT = 0;              // Popup Top Position
var intWL = 0;              // Popup Left Position
var intWW = 520;            // Popup Width
var intWH = 490;            // Popup Height
var intSW = screen.width;   // Screen Width
var intSH = screen.height;  // Screen Height

	if (screen) {
		// 1.33_ is a typical screen ratio (width divided by the height)
		// But we'll use 1.4 just to be safe
		if (intSW / intSH > 1.4) {
			intWL = (intSW - intWW) / 4;
			intWT = (intSH - intWH) / 2;
		}
		else {
			intWL = (intSW - intWW) / 2;
			intWT = (intSH - intWH) / 2;
		}
	}

//vars for the left window... 
var intWLmain = intWL ;             //just storing these caus cant be arsed to put them back
var intWTmain = intWT ;        
var intWWleft = 185;				//width of nav window
var intWHleft = 490;				//height of nav window
intWL = intWL - (intWWleft/1.8);    //reset left position taking into account nav window
// intWL = (intSW - (intWW + intWWleft) / 2);    //reset left position taking into account nav window
var intWLleft = intWL + intWW +10; //the left hand window left position 

var windowa = null;
var windowb = null;

function openWindow(strURL, strName) {
//if (strName && strName.open) {
//if (strName && strName.open && !strName.closed) {
var strOptions = ' scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0';
windowa = window.open(strURL, strName, 'width=' + intWW + ',height=' + intWH + ',left=' + intWL + ',top=' + intWT + ',' + strOptions);
 if (windowa.focus) {
 windowa.focus();
 }
}

function spawnLeftWin(url, nameW) {
var strOptions = ' scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0';
windowb = window.open(url, nameW, 'width=' + intWWleft + ',height=' + intWHleft + ',left=' + intWLleft + ',top=' + intWT + ',' + strOptions);
if (windowb.focus) {
 windowb.focus();
 }
}

//used in nav bar
function loadhtml(url){
//this first bit will never work ;(
if (windowb && windowb.open && !windowb.closed) windowb.close();
//now reposition main window. as cant close side win
//window.moveTo(intWL+10, intWTmain);
url = '/httpd/noscrollframe.php?page=' + url;
window.parent.document.location = url;
}