function winOpen(theURL,winName,features) 
{ 
winName = window.open(theURL,winName,features); 
if(winName == null || winName.closed){window.open(theURL,winName,features);} 
else{winName.location.href = theURL;} 
if (!winName.closed) 
winName.focus(); 
}

function Top()
{
 document.location.href="#pagetop";
}

var selectedreg;
var altselectedreg;

function selecttab(node,pos) {

   var rdiv = document.getElementById("tab_" + node + "_" + pos);
   var rpdiv = document.getElementById("tabcontent_" + node + "_" + pos);
   var rspdiv = document.getElementById("tabcontent_" + node);
   if(!altselectedreg) altselectedreg = "tab_"+ node +"_0";
   var rsdiv = document.getElementById(altselectedreg);
   
   if(rdiv && rpdiv && rspdiv && rsdiv) {
   	   rspdiv.innerHTML = rpdiv.innerHTML;
	   rdiv.className += "tabselected"; 
	   rsdiv.className = rsdiv.className.replace(/tabselected/,""); 
	   selectedreg = "tab_" + node + "_" + pos;
	   altselectedreg = "tab_" + node + "_" + pos;
   }
}

function zoomimg(obj) {
  var zoomdiv  = document.getElementById('zoomdiv');
var Sufix = obj.src.split(".");
/*alert(Sufix[3]);*/
if (Sufix[3] == "jpg"){
  var bigimg  = obj.src.replace('_s.jpg','_l.jpg')
  }
if (Sufix[3] == "gif"){
  var bigimg  = obj.src.replace('_s.gif','_l.gif')
  }


  zoomdiv.innerHTML="<img src='"+bigimg+"' style=''><p style='white-space:nowrap'>&copy; Heidi-Klum GmbH 2008 | photo by OLIVER S.</p>";

  var body =document.body;
  //if(body.scrollTop > 50) {
  //  zoomdiv.style.top = body.scrollTop + 180;
  //} else {
  //  zoomdiv.style.top = 280;
  //}
  zoomdiv.style.visibility = 'visible';
}
