/**********************************************************************
	Zeigt beim onmouseover-Event eines Thumbnails
	das Originalbild (400x300) an
	Parameter:	nIdPic 	--> ID des Thumbnails
			strPath	--> Pfad des Originalbildes
			e	--> window-event
**********************************************************************/	
function showLargerPicture (nIdPic, strPath, position){
	var nWidth 		= Number (400);
	if (position == 3) nWidth = 500
	
	var objBackground 	= document.getElementById ("divBackground")
	var objPicture		= document.getElementById (nIdPic)
	var posx = 0;
	var posy = 0;

	if (objBackground == null){
		objBackground = document.createElement('div');

		objBackground.setAttribute('id', "divBackground");
		objBackground.style.position 	= "absolute";
		objBackground.style.background 	= "#FFFFFF";
   		objBackground.style.border 	= "1px solid #000000";

   		document.body.appendChild (objBackground)
	}

	objBackground.innerHTML = String("<img src='") + strPath + String("'>")

	//Ermitteln der Koordinaten des Thumbnails
	if (objPicture) {
		posx = absLeft(objPicture)
		posy = absTop(objPicture)
	}

	
		if (position == 1 || position == 3) {
			objBackground.style.left	= posx - nWidth - 10 + String ("px");
			objBackground.style.top 	= posy + String ("px");
			
		}
		else {
			if (position == 4) {
				objBackground.style.top =  posy - (445 - objPicture.height) + String ("px");
				objBackground.style.left	= posx + 120 + 10 + String ("px");
			}
			
			else {
				objBackground.style.top 	= posy - (objPicture.height/2) + String ("px");
				objBackground.style.left	= posx + 90 + 10 + String ("px");
			}
					
		}
			
		
		objBackground.style.display = "block"
	
}
function hideLargerPicture (){
	var objBackground = document.getElementById ("divBackground")
	objBackground.style.display = "none"
}

/***** Ermitteln der X-Koordinate des Objektes el ******/
function absLeft(el) {
     return (el.offsetParent)?
     el.offsetLeft+absLeft(el.offsetParent) : el.offsetLeft;
}

/***** Ermitteln der Y-Koordinate des Objektes el ******/
function absTop(el) {
 	return (el.offsetParent)?
 	el.offsetTop+absTop(el.offsetParent) : el.offsetTop;
}


/***** Popup für Bilder *****/
function showPopUp (strPath,width,height){
	var objPopUp 	= parent.document.getElementById ("divPopUp")

	if (objPopUp == null){
		objPopUp = parent.document.createElement('div');

		objPopUp.setAttribute('id', "divPopUp");
		objPopUp.style.position 	= "absolute";
		objPopUp.style.background 	= "#FFFFFF";
   		objPopUp.style.border 	= "1px solid #000000";
   		objPopUp.onclick = hidePopUp;

   		parent.document.body.appendChild (objPopUp)
	}

	objPopUp.innerHTML = String("<table><tr><td align='center'><img src='") + strPath + String("'><br>Klicken Sie auf das Bild um es wieder zu schlie&szlig;en.</td></tr></table>")
	
	
	objPopUp.style.left	= ((screen.availWidth - width)/2) + String ("px");	
	objPopUp.style.top 	= ((screen.availHeight - height)/2)-80 + String ("px");

	objPopUp.style.display = "block"

}
function hidePopUp (){
	var objPopUp = parent.document.getElementById ("divPopUp")
	objPopUp.style.display = "none"
}