/*
  javascript functions
*/


function toggleBox(szDivID) {
  if (document.layers) { // NN4+
    if (document.layers[szDivID].visibility == 'visible') {
      document.layers[szDivID].visibility = "hide";
      document.layers[szDivID].display = "none";
      document.layers[szDivID+"SD"].fontWeight = "normal";
    } else {
      document.layers[szDivID].visibility = "show";
      document.layers[szDivID].display = "inline";
      document.layers[szDivID+"SD"].fontWeight = "bold";
    }
  } else if (document.getElementById) { // gecko(NN6) + IE 5+
    var obj = document.getElementById(szDivID);
    var objSD = document.getElementById(szDivID+"SD");

    if (obj.style.visibility == 'visible') {
      obj.style.visibility = "hidden";
      obj.style.display = "none";
      objSD.style.fontWeight = "normal";
    } else {
      obj.style.visibility = "visible";
      obj.style.display = "inline";
      objSD.style.fontWeight = "bold";
    }
  } else if (document.all) { // IE 4
    if (document.all[szDivID].style.visibility == 'visible') {
      document.all[szDivID].style.visibility = "hidden";
      document.all[szDivID].style.display = "none";
      document.all[szDivID+"SD"].style.fontWeight = "normal";
    } else {
      document.all[szDivID].style.visibility = "visible";
      document.all[szDivID].style.display = "inline";
      document.all[szDivID+"SD"].style.fontWeight = "bold";
    }
  }
}

function changeStyle(what, how) {
  if (document.getElementById) {
    document.getElementById(what).style.fontWeight = how;
  } else if (document.all) {
    document.all[what].style.fontWeight = how;
  }
}

function changeText(where, what) {
  if (document.getElementById) {
    document.getElementById(where).innerHTML = what;
  } else if (document.all) {
    document.all[where].innerHTML = what;
  }
}

function switchDiv(strDivName,bolVisible){
  var   isNS4 = (document.layers) ? true : false;
  var   isIE4 = (document.all && !document.getElementById) ? true : false;
  var   isIE5 = (document.all && document.getElementById) ? true : false;
  var   isNS6 = (!document.all && document.getElementById) ? true : false;
 if (isNS4) {
   objElement = document.layers[strDivName];
 } else if (isIE4) {
   objElement = document.all[strDivName].style;
 } else if (isIE5 || isNS6) {
   objElement = document.getElementById(strDivName).style;
 }
 if(isNS4){
     if(!bolVisible) {
       document.layers[strDivName].visibility ="hidden"
     } else {
       document.layers[strDivName].visibility ="visible"
     }     
 }else if(isIE4){
     if(!bolVisible) {
       document.all[strDivName].style.visibility = "hidden";
     } else {
       document.all[strDivName].style.visibility = "visible";
     }
}
 else if (isIE5 || isNS6) {
      if(bolVisible){
         document.getElementById(strDivName).style.display= "";
      } else {
        document.getElementById(strDivName).style.display = "none";
        }
      }
}

function ViewDetail(selObj) {
   page=selObj.options[selObj.selectedIndex].value;
   self.location.href = page;
}

function change(html){
  DESCRIPTION2.innerHTML=html
}

function openpopupForgotPassword(){
var popurl="forgotPassword.php"
winpops=window.open(popurl,"","width=473,height=237,scrollbars=no,resizable=no,location=no,directories=no,status=no,toolbar=no")
}

function validateURL(link)
{
	window.open(link.value)
}

function openpopup(url){
winpops=window.open(url,"","width=600,height=500,scrollbars=yes,resizable=yes,location=yes,directories=yes,status=yes,toolbar=yes")
}


function openlargepopup(url){
winpops=window.open(url,"","width=800,height=320,scrollbars=yes,resizable=yes,location=no,directories=no,status=no,toolbar=no")
}
