//Popup für Adminfunktionen
function pop(para)
{

window.open("admin.php?"+para,"","scrollbars=1,reziseable=1,width=600,height=500");
}

//alg vars für Thumbnails
var ie=document.all
var ns6=document.getElementById&&!document.all


function ieobjekt(){
return (document.compatMode && document.compatMode!="BackCompat" && !window.opera)? document.documentElement : document.body
}


function vergroessern(bild,e){

	if (ie||ns6){
		aufbau=document.getElementById? document.getElementById("zeigedasbild") : document.all.zeigedasbild
		
		var vertiposi=ns6? pageYOffset+e.clientY : ieobjekt().scrollTop+event.clientY
		
		aufbau.style.left="10px"
		aufbau.style.top=vertiposi+"px"
		aufbau.innerHTML='<div align="right" id="leiste"><span id="schliessen_text" onClick="vorschau_zu()">Schlie&szlig;en</span> </div><img src="'+bild+'">'
		aufbau.style.visibility="visible"
		return false
	}
	else //falls kein IE 4+ oder NS 6+, zeige das Bild einfach in einem neuen Browser-Fenster
		return true
}


function vorschau_zu(){
aufbau.style.visibility="hidden"
}


function drag_and_drop(e){
if (ie&&dragapproved){
aufbau.style.left=tempx+event.clientX-offsetx+"px"
aufbau.style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
aufbau.style.left=tempx+e.clientX-offsetx+"px"
aufbau.style.top=tempy+e.clientY-offsety+"px"
}
return false
}


function initiiere_drag(e){
if (ie&&event.srcElement.id=="leiste"||ns6&&e.target.id=="leiste"){
offsetx=ie? event.clientX : e.clientX
offsety=ie? event.clientY : e.clientY

tempx=parseInt(aufbau.style.left)
tempy=parseInt(aufbau.style.top)

dragapproved=true
document.onmousemove=drag_and_drop
}
}

document.onmousedown=initiiere_drag
document.onmouseup=new Function("dragapproved=false")

