window.onerror = null;
var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS4 = (bName == "Netscape" && bVer >= 4);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
var menuActive = 0
var menuOn = 0
var onLayer
var timeOn = null
var loaded = 0


// LAYER SWITCHING CODE
if (NS4 || IE4) {
if (navigator.appName == "Netscape") {
layerStyleRef="layer.";
layerRef="document.layers";
styleSwitch="";
}else{
layerStyleRef="layer.style.";
layerRef="document.all";
styleSwitch=".style";
}
}

// SHOW MENU
function showLayer(layerName){
if (NS4 || IE4) {
if (timeOn != null) {
clearTimeout(timeOn)
hideLayer(onLayer)
}
if (NS4 || IE4) {
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
}
onLayer = layerName
}
}

// HIDE MENU
function hideLayer(layerName){
if (menuActive == 0) {
if (NS4 || IE4) {
eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
}
}
}

// TIMER FOR BUTTON MOUSE OUT
function btnTimer() {
menuActive=0
timeOn = setTimeout("btnOut()",500)
}

// BUTTON MOUSE OUT
function btnOut(layerName) {
menuActive=0
if (menuActive == 0) {
hideLayer(onLayer)
}
}

// MENU MOUSE OVER  
function menuOver(itemName) {
clearTimeout(timeOn)
menuActive = 1
}

// MENU MOUSE OUT 
function menuOut(itemName) {
menuActive = 0 
timeOn = setTimeout("hideLayer(onLayer)", 400)
}

function newWinEx(url,win,xv,yv,scroll) {
var iwidth;
var iheight;

if(win == "viewmember") {
iwidth = 0;
iheight = 0;
}
else {
iwidth = (screen.width-xv)/2;
iheight = (screen.height-yv)/2;
}
str1 = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars="+scroll+",resizable=0,width="+xv+",height="+yv+",top="+iheight+",left="+iwidth;

var popup = window.open(url, win, str1);

if( navigator.appName.substring(0,8) == "Netscape" ) {
popup.location = url;
}
}