﻿function CreateBookmarkLink() {
title = "Hubert Europe";
url = "http://www.hubert-europa.de";
if (window.sidebar) {
window.sidebar.addPanel(title, url,"");
} else if( window.external ) {
window.external.AddFavorite( url, title);
}
else 
{
   alert("Bitte Presse CTRL+D, zum dieses Aufstellungsortes zu bookmarken.");
}
}
function $(id)
{
return document.getElementById(id);
}
function TxtValueSet(ob,txtP)
{
   if( ob.value == "" )
   {
     ob.value=txtP;
     ob.style.color="silver";
     ob.style.textAlign="center";
  
   }
}
function TxtValueReset(ob,txtP)
{
 if( ob.value == txtP)
   {
  ob.value="";
  ob.style.color="black";
  ob.style.textAlign="left";
  }
}

function catPReset()
{

  
 if ( Ntt.value == NttDV )
 {
  Ntt.value = "";
  Ntt.style.color="black";
  Ntt.style.textAlign="left";
 }
  
 if ( catPage.value == catPageDV)
 {
   catPage.value = "";
   catPage.style.color="black";
   catPage.style.textAlign="left";
  }
}
function catPSet()
{
  
      if ( Ntt.value == "" && catPage.value=="" )
      {
         catPage.value = catPageDV;
         catPage.style.color="silver";
         catPage.style.textAlign="center";

         Ntt.value = NttDV;        
         Ntt.style.color="silver";
         Ntt.style.textAlign="center";
      }
} 
function $(idobj)
{
 return document.getElementById(idobj);
}
function PutCenter(idobj,uppx,dwpx)
{
      var scrollX, scrollY;
      if (document.all)
      {
         if (!document.documentElement.scrollLeft)
            scrollX = document.body.scrollLeft;
         else
            scrollX = document.documentElement.scrollLeft;
               
         if (!document.documentElement.scrollTop)
            scrollY = document.body.scrollTop;
         else
            scrollY = document.documentElement.scrollTop;
      }   
      else
      {
         scrollX = window.pageXOffset;
         scrollY = window.pageYOffset;
      }
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' )
  {
    //Non-IE
    myWidth = window.innerWidth+scrollX;
    myHeight = window.innerHeight+scrollY;
  }else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
  {//IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth+scrollX ;
    myHeight = document.documentElement.clientHeight+scrollY;
  }
   else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
   {
    //IE 4 compatible
    myWidth = document.body.clientWidth+scrollX;
    myHeight = document.body.clientHeight+scrollY;
   }
    
    if (document.getElementById)
    {
        $(idobj).style.top=(myHeight/2 - uppx)+ 'px';
        $(idobj).style.left=(myWidth/2 - dwpx)+ 'px';
    } 
}
function ShowHide(idObj)
{
     divShowHide = $(idObj);
    if(divShowHide != null)
    {
        if(divShowHide.style.display == 'block')  
            divShowHide.style.display = 'none';
        else 
            divShowHide.style.display = 'block';
    }
}