// JavaScript Document
// livinglemon.com | http://www.livinglemon.com

// History-Back-Funktion
function tmt_winHistory(id,s){
	var d=eval(id)==null||eval(id+".closed");
	if(!d){eval(id+".history.go("+s+")");}
}


// Bilder vorausladen
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


// Neues Browserfenster öffnen
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


// PopUp-Meldung
function MM_popupMsg(msg) { //v1.0
  alert(msg);
}


//reloads the window if Nav4 resized
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function open_image_popup(bild_url,width,height)    {
      var left = Math.round((screen.width - width)/2);
	  var top = Math.round((screen.height - height)/2);      
	  var popup = window.open("about:blank","","width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);      
	  var content = '<html><head></head><body style="padding:0px;margin:0px;">';
	      content += '<a href="javascript:window.close();"><img src="' + bild_url + '" ';
		  content += 'style="border-width:0px; width:' + width + ',height=' + height + ';">';
		  content += '</a></body></html>'      
		  popup.document.open();      
		  popup.document.write(content);      
		  popup.document.close();    
}