ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
v6 = (document.getElementById)? true:false

function showlayer(layerid)
  {
  if (ns4) document.layers[layerid].visibility = "show"
  else if (v6) document.getElementById(layerid).style.visibility = "visible";
  else if (ie4) document.all[layerid].style.visibility = "visible"
  }

function hidelayer(layerid)
  {
  if (ns4) document.layers[layerid].visibility = "hide"
  else if (v6) document.getElementById(layerid).style.visibility = "hidden";
  else if (ie4) document.all[layerid].style.visibility = "hidden"
  }

// Plausibiltätsabfrage für HardWare-Profile:
function CheckInput()
  {
  for(i=0; i<16; ++i)
  	if(document.hw_form.elements[i].value == "Please select...")  {
    	alert("Hardwareprofile: Please fill out all fields.");
        	document.hw_form.elements[i].focus();
        return false;
   }
  return true;
}

// Workaround für Submit Layer in registration.inc.php
function layer_up(layerid, px)
  {
  if (ns4) document.layers[layerid].top = px
  else if (v6) document.getElementById(layerid).style.top = px;
  else if (ie4) document.all[layerid].style.top = px
  }

 function layer_down(layerid, px)
  {
  if (ns4) document.layers[layerid].top = px
  else if (v6) document.getElementById(layerid).style.top = px;
  else if (ie4) document.all[layerid].style.top = px
  }

// ------------

function PopupPic(sPicURL) {
     window.open( "_modules/popup.html?"+sPicURL, "",
     "resizable=1");
}
     function FitPic() {
     var arrTemp=self.location.href.split("?");
     var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
     var NS = (navigator.appName=="Netscape")?true:false;
       iWidth = (NS)?window.innerWidth:document.body.clientWidth;
       iHeight = (NS)?window.innerHeight:document.body.clientHeight;
       iWidth = document.images[0].width - iWidth;
       iHeight = document.images[0].height - iHeight;
       window.resizeBy(iWidth, iHeight);
       self.focus();
};

