function popWindow (aTitel,extra) {
  //popWindow.close();

 // alert("popWin");

  try{
      if(pWin)pWin.close();
	}catch(e){
  }

  adresse = "popWindow.php?page="+aTitel;
  
  wTitel = "Kerstin Heiles - "+aTitel;
 
  if (extra != "") {
	  adresse = adresse+"&"+extra;
  }
 
 //alert(1);
 //alert(adresse);
 
 pWin = window.open(adresse,"","width=655,height=420,scrollbars=no,status=no,toolbar=no,resizeable=no,menubar=no,location=no");
 //pWin.title = wTitle;
 //alert(Adresse+"&"+extra+", "+Titel+ ", width=655,height=420,scrollbars=no,status=no,toolbar=no,resizeable=no,menubar=no,location=no");
 // pWin = window.open(adresse,"WINDOW TITLE","width=655,height=420,scrollbars=no,status=no,toolbar=no,resizeable=no,menubar=no,location=no");
//  pWin.moveBy(200, 100);
  pWin.focus();
  //return popWindow;
}

function getLink(givenURL) {
	if(givenURL != "" && givenURL != "#") {
		pWin = window.open(givenURL,"","");
		pwin.focus();
	}
}


function popPicture (aPicture,width,height) {
  //popWindow.close();
    
  aTitel = "Kerstin Heiles";
  
  try{
      if(pWin)pWin.close();
	}catch(e){
	}
  
  awidth = width+15;
  aheight = height+15;
  
  //alert("pop");
  
  pWin = window.open(aPicture, "", "width="+awidth+",height="+aheight+",scrollbars=yes,status=no,toolbar=no,resizeable=yes,menubar=no,location=no");
  pWin.focus();
}

function loadPicture(image) { //v4.01
	newsrc = image.src;
	//alert(newsrc);
	
	newsrc = newsrc.replace("thumb/t_", "original/");
//	alert(newsrc);



	left_IMG = document.getElementById("leftIMG");
	
	if(left_IMG == null) {
		alert("target not found");
//		leftIMG = document.getElementByName("leftIMG");
	}else{
		
	
//		alert(left_IMG);
//		alert(left_IMG.src);
	}
	
	left_IMG.src = newsrc;
}

function loadDirectPicture(asrc) { //v4.01
	
//	alert("loadDP");
	
	if (asrc == "") {
		//alert("Hierzu gibt es leider kein Bild");
	}else{
		
		left_IMG = document.getElementById("leftIMG");
		left_IMG.src = "IMG/"+asrc;
	}
}

function decryptEmails() {
	

}

$(document).ready(function(){
	// Display email address
	/***********************************************
	* Encrypt Email script- Please keep notice intact
	* Tool URL: http://www.dynamicdrive.com/emailriddler/
	* **********************************************/
	var emailriddlerarray=[115,105,108,118,105,101,111,116,116,101,115,64,111,107,117,108,116,117,114,46,100,101];
	var encryptedemail_id63=''; 
	for (var i=0; i<emailriddlerarray.length; i++)
		encryptedemail_id63+=String.fromCharCode(emailriddlerarray[i]);
	$("#kontakt_mail").html("<a href='mailto:" + encryptedemail_id63 + "'>" + encryptedemail_id63 + "</a>");
});

