var APP_ROOT = '/';

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function SelectFirst() {
    if (window.option2 != undefined) {
	    window.option2.selectedIndex = 0;
    }
}

function OpenFeedbackWindow(loc) {
	window.open('feedback.php?location=' + loc, '', 'scrollbars=yes,menubar=no,height=450,width=552,resizable=yes,toolbar=no,location=no,status=no');
}

function MM_openBrWindow(theURL,winName,features) {
    window.open(theURL,winName,features);
}

var tableToggle = false;

function toggle_table_hazard(theTable, bState) {
    var table = theTable;
    var temp = document.getElementById(table);
    tableToggle = bState;

    if (bState) {
        tableToggle = false;
        temp.style.position = 'absolute';
        temp.style.visibility = 'hidden';
    } 
    else {
        tableToggle = true;
        temp.style.position = 'relative';
        temp.style.visibility = 'visible';
    }
}

function hideid(id) {
    if (document.getElementById) { // DOM3 = IE5, NS6
        document.getElementById(id).style.display = 'none';
    }
    else {
        if (document.layers) { // Netscape 4
            document.id.display = 'none';
        }
        else { // IE 4
            document.all.id.style.display = 'none';
        }
    }
}

function toggleVisibility(id) {
    var element = document.getElementById(id);

    if (element.style.display == "none") {
        element.style.display = "block";
    }
    else {
        element.style.display = "none";
    }
}

function redirect(location) {
    window.location = location;
}
