var isNav4, isIE4;

if (parseInt(navigator.appVersion.charAt(0)) >= 4) {

isNav4 = (navigator.appName == "Netscape") ? 1 : 0;

isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;

}

function fitWindowSize() {

if (isNav4) {

window.innerWidth = document.layers[0].document.images[0].width;

window.innerHeight = document.layers[0].document.images[0].height;

}

if (isIE4) {

window.resizeTo(500, 500);

width = 500 - (document.body.clientWidth - document.images[0].width);

height = 500 - (document.body.clientHeight - document.images[0].height);
window.resizeTo(width, height);

}

}



function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

function loadImages() {

if (document.getElementById) {  // DOM3 = IE5, NS6

document.getElementById('hidepage').style.visibility = 'hidden';

}

else {

if (document.layers) {  // Netscape 4

document.hidepage.visibility = 'hidden';

}

else {  // IE 4

document.all.hidepage.style.visibility = 'hidden';

      }

   }

}

var useragent = navigator.userAgent;

var bName = (useragent.indexOf('Opera') > -1) ? 'Opera' : navigator.appName;

var pos = useragent.indexOf('MSIE');

if (pos > -1) {

bVer = useragent.substring(pos + 5);

var pos = bVer.indexOf(';');

var bVer = bVer.substring(0,pos);

}

var pos = useragent.indexOf('Opera');

if (pos > -1)	{

bVer = useragent.substring(pos + 6);

var pos = bVer.indexOf(' ');

var bVer = bVer.substring(0, pos);

}

if (bName == "Netscape") {

var bVer = useragent.substring(8);

var pos = bVer.indexOf(' ');

var bVer = bVer.substring(0, pos);

}

if (bName == "Netscape" && parseInt(navigator.appVersion) >= 5) {

var pos = useragent.lastIndexOf('/');

var bVer = useragent.substring(pos + 1);

}
