function land(ref, target)
{
lowtarget=target.toLowerCase();
if (lowtarget=="_self") {window.location=loc;}
else {if (lowtarget=="_top") {top.location=loc;}
 else {if (lowtarget=="_blank") {window.open(loc);}
  else {if (lowtarget=="_parent") {parent.location=loc;}
   else {parent.frames[target].location=loc;};
     }}}
}

function jump(menu)
{
ref=menu.choice.options[menu.choice.selectedIndex].value;
splitc=ref.lastIndexOf("^");
target="";
if (splitc!=-1)
{loc=ref.substring(0,splitc);
target=ref.substring(splitc+1,1000);}
else {loc=ref; target="_self";};
if (ref !="") {land(loc,target);}
}
//-->

// Netscape bug fix...

function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH)  history.go(0);
}
reloadPage(true);

function prevent_dblclick() {
	if (bflag)
		flag = false;
	else
		bflag=true;
		document.form2.submit.disabled = true;
		return true;
	}

// change cell color...
var color = "";
window.name = "_homewindow";

function changeCellColor(obj,color) {
  if (document.all) {
    obj.style.backgroundColor=color;
  }
}

// rollover code...

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

// popup code...
function launchURL(url,name,x,y) {
	window.name = "_home";
    var ItsTheWindow;
    ItsTheWindow = window.open(url, name,
    "status=no,height="+y+",width="+x+",scrollbars=no,resizable=no,toolbar=no");
}
// sample <a href="javascript:launchURL('page.html', 'windowname', 626, 339)" class="linkon">

// code for GOTO drop box...

function goTo(pagename) {

        if ((-1 < pagename.selectedIndex) && (pagename.options[pagename.selectedIndex].value != 'nil')) {
                val = pagename.options[pagename.selectedIndex].value;
                if(val!="NoValue") {
                        location.href=val;
                        return true;
                }
        }
}

//Browswer Sniffer
var BROWSER_NAME = navigator.appName;
var plat = navigator.appVersion;

if (BROWSER_NAME && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("4.7")>=0 && plat.indexOf("Win") != -1) {
document.write('<LINK rel="stylesheet" href="styles/style_N47_win.css" type="text/css">');
} else

if (BROWSER_NAME && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("4.7")>=0 && plat.indexOf("Mac") != -1)  {
document.write('<LINK rel="stylesheet" href="styles/style_N47_mac.css" type="text/css">');
} else

if (BROWSER_NAME && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("5.")>=0 && plat.indexOf("Win") != -1) {
document.write('<LINK rel="stylesheet" href="styles/style_N6_win.css" type="text/css">');
} else

if (BROWSER_NAME && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("5.")>=0 && plat.indexOf("Mac") != -1)  {
document.write('<LINK rel="stylesheet" href="styles/style_N6_mac.css" type="text/css">');
} else

if (BROWSER_NAME == "Netscape" && plat.indexOf("Win") != -1) {
document.write('<LINK rel="stylesheet" href="styles/style_N47_win.css" type="text/css">');
} else

if (BROWSER_NAME == "Microsoft Internet Explorer" && plat.indexOf("Win") != -1){
document.write('<LINK rel="stylesheet" href="styles/style_IE_win.css" type="text/css">');
} else

if (BROWSER_NAME == "Netscape" && plat.indexOf("Mac") != -1) {
document.write('<LINK rel="stylesheet" href="stylesstyles/style_N47_mac.css" type="text/css">');
} else


if (plat.indexOf("Mac") != -1 && plat.indexOf("MSIE") != -1) {
	if (plat.indexOf("MSIE 5") != -1) {
		document.write('<LINK rel="stylesheet" href="styles/style_IE5_mac.css" type="text/css">');
	}
	else {
		document.write('<LINK rel="stylesheet" href="styles/style_IE_mac.css" type="text/css">');
	}
}

// default style sheet loaded if no browsers match
else {
document.write('<LINK rel="stylesheet" href="styles/style_IE_win.css" type="text/css">');
}


