//vars for the main window..
var intWT = 100;              // Popup Top Position
var intWL = 600;              // Popup Left Position
var intWW = 770;            // Popup Width
var intWH = 400;            // Popup Height
var intSW = screen.width;   // Screen Width
var intSH = screen.height;  // Screen Height

	

//vars for the left window... 
var intWLmain = intWL ;             
var intWTmain = intWT ;        
var intWWleft = 770;				//width of nav window
var intWHleft = 260;				//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 openMain(strURL) {
//if (strName && strName.open) {
//if (strName && strName.open && !strName.closed) {
var strName = 'dmain';
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 openBottomWin(url, nameW) {
var strOptions = ' scrollbars=1,resizable=1,menubar=0,toolbar=0,status=0,location=0,directories=0';
windowb = window.open(url, nameW, 'width=' + intWWleft + ',height=' + intWHleft + ',left=' + intWL + ',top=' + 530 + ',' + 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;
}
