function openWindow(FileURL, winName, w, h) {
    winStats = "width=" + w + ",height=" + h + ",toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,";
    if (navigator.appName.indexOf("Microsoft") >= 0) {// or if (document.all)
        var xMax = screen.width, yMax = screen.height;
    }else {
        if (navigator.appName.indexOf("Netscape") >= 0) {// or if (document.layers)
            var xMax = window.outerWidth, yMax = window.outerHeight;
        }else {
            var xMax = 640, yMax=480; //default guess
        }
    }
    //calculate center
    var xOffset = (xMax - w)/2, yOffset = (yMax - h)/2;
    winStats += 'left=' + xOffset + ',top=' + yOffset;
    if(winName == "") {
		winName = "win" + Math.random();
		winName = winName.replace(/\./, "");
    }
    window.open(FileURL, winName, winStats);
}

function checkMainFrame(thisSection) {
	if (navigator.appName.indexOf("Microsoft") >= 0) {
		setTimeout('cMF()', 1000, thisSection);
	}else {
		cMF(thisSection);
	}
}
function cMF(thisSection) {
	if(top.window.mainFrame.document.aForm.aSection.value != thisSection) {
		top.window.mainFrame.history.back();
	}
}

function checkTopFrame(topFrameLocation) {
	if(top.window.topFrame.document.location.href != topFrameLocation) {
		top.window.topFrame.document.location.href = topFrameLocation;
	}
}


