function getBrowserType() {
   var browserVer=parseInt(navigator.appVersion);
   var browserType=navigator.appName;
   var browser = "NN";

   if (browserType == "Netscape") browser = "NN";
   if ((browserType.indexOf("Microsoft") != -1) ) browser = "IE";

   return browser;
}


// popup functions
var popupnum = 0;

function popup(location) {
ref = window.open(location, 'popup'+popupnum, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width=330,height=250");
ref.focus();
popupnum++;
return false;
}

function popupSized(location, width, height) {
ref = window.open(location, 'popup'+popupnum, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,width="+width+",height="+height);
ref.focus();
popupnum++;
return false;
}

function popupLoadResize(location, width, height) {
  window.lcoation = location;
  window.resizeTo(width, height);
  return false;
}


// init visibility
var vista = new Array();

function setInvisible(id) {
   
   document.getElementById(id).style.visibility = 'hidden';
   
}

function setVisible(id) {
   
   document.getElementById(id).style.visibility = 'visible';
   
}



function toggleDisplay(id) {

   vista[id] = (document.getElementById(id).style.display == 'none') ? 'block' : 'none';
   document.getElementById(id).style.display = vista[id];

}

function toggleDisplayInherit(id) {

   vista[id] = (document.getElementById(id).style.display == 'inherit') ? 'block' : 'inherit';
   document.getElementById(id).style.display = vista[id];

}


function toggleInversDisplay(id) {
   vista[id] = (document.getElementById(id).style.display == 'block') ? 'none' : 'block';
   document.getElementById(id).style.display = vista[id];

}


function toggleVisibility(id) {
   
   alert(id);
   
   vista[id] = (document.getElementById(id).style.visibility == 'hidden') ? 'visible' : 'hidden';
   document.getElementById(id).style.visibility = vista[id];



}

function toggleInversVisibility(id) {
   if(document.getElementById(id)) {
      vista[id] = (document.getElementById(id).style.visibility == 'visible' || document.getElementById(id).style.visibility == 'inherit' ) ?  'hidden' : 'visible';
      document.getElementById(id).style.visibility = vista[id];
   }

}


