// 2007 Rudolf Wohland http://www.wohland.info/ 
//-------------------------------------------------------------------------


function popup(url, width, height, name){
  pop = window.open(url,name,'width=' + width + ',height=' + height + ',status=yes,resizable=yes,menubar=no,locationbar=no,scrollbars=yes,dependent=yes' );
}

function popup_centered(url, width, height, name)
{
    var sWidth   = screen.width;
    var sHeight  = screen.height;
        
    // Center Popup
    var posX    =  (sWidth/2) - (width/2);
    var posY    =  (sHeight/2) - (height/2);

	pop = window.open(url,name,'width=' + width + ',height=' + height + ',left=' + posX + ',top=' + posY + ',status=no,resizable=yes,menubar=no,locationbar=no,scrollbars=no,dependent=yes' );
}

function popup_resize(width, height) {
    window.resizeTo(width, height);
    // Center Popup
    var sWidth   = screen.width;
    var sHeight  = screen.height;
    var posX    =  (sWidth/2) - (width/2);
    var posY    =  (sHeight/2) - (height/2);
    moveTo(posX,posY);
}
// Pop-up Fenster
function PopWin(theURL,winName,features) {
  nWindow = window.open(theURL,winName,features);
  nWindow.focus();
}


// Rollover-Steuerung
 
  function rollover(element, selectedImage) {
    lastForeColor = element.style.color;
    lastBGImage = element.parentNode.parentNode.style.backgroundImage; 
    //lastBGImagePosition = element.parentNode.style.backgroundPosition;  
    
      if (!selectedImage) {
        newBgImage = "url(pics/shared/bg-highlight1.jpg)";
      } else {
        newBgImage = selectedImage;
      }
      element.style.color="#000";
      element.parentNode.parentNode.style.backgroundImage=newBgImage;
      element.parentNode.parentNode.style.backgroundRepeat="no-repeat";  
      //element.parentNode.style.backgroundPosition="left top";
  }
  
  function rollout(element) {
     element.style.color=lastForeColor;
     element.parentNode.parentNode.style.backgroundImage=lastBGImage; 
     //element.parentNode.style.backgroundPosition=lastBGImagePosition;     
  }

