ie5=(document.getElementById&&document.all&&document.styleSheets)?1:0;
nn6=(document.getElementById&&!document.all)?1:0;

var PrivateStrWindowText = ""
var confirmTitle = "";
var confirmText="<p align='center'>&nbsp;</p>";

document.write(	"<div style='position:absolute;top:200px;left:400px;z-index:100;visibility:hidden' id='confirm'>"+
				"<div id='ContentConfirmationBody'>" +
				"<table id=\"ConfirmTable\" border=\"0\" style='width:320px;height:200px' cellpadding='4' cellspacing='0'>" +
				//"<tr><th style='text-align:center' id='ConfirmTitle'>" + confirmTitle + "</th></tr>" +
				"<tr><td style='text-align:center;vertical-align:top' height='195px' id='ConfirmText'>" + confirmText + "</td></tr>" +
				"<tr><td height='12' colspan='2' id='ConfirmLink' align='right'>&nbsp;</td></tr>" +
				"<tr><td colspan='2' id='buttons' align='center'>&nbsp;</td></tr>" +
				"</table>" +
				"</div>" +
				"</div>"
				);

function openLink(strURL) {
window.open(strURL,"","width=1024,height=768,resizable=no,scrollbars=yes,location=no,menubar=no,status=no,toolbar=no");
}

//Box verstecken
function unshowConfirm() {
	document.getElementById("confirm").style.visibility="hidden";
}

//Box anzeigen
function showConfirm(strWindowTitle, strWindowText, strFurtherLink) {
	PrivateStrWindowText = strWindowText;

	//document.getElementById("ConfirmTitle").innerHTML = strWindowTitle;
	document.getElementById("ConfirmText").innerHTML = strWindowText;
	//document.getElementById("ConfirmLink").innerHTML = strFurtherLink;

	button = "<button style=\"width:180px\" id='ConfirmCancel' type='button' value='Cancel' onClick=\"openLink('" + strFurtherLink + "')\">Zur Mythologie</button>&nbsp;&nbsp;<button style=\"width:80px\" id='ConfirmOk' type='button' value='Ok' onClick='ButtonConfirmOk()'>Schließen</button>"
	;

	document.getElementById("buttons").innerHTML=button;
	document.getElementById("confirm").style.visibility="visible";

	if(ie5) {
		document.getElementById("confirm").style.left=60 + document.body.scrollLeft;
		document.getElementById("confirm").style.top=200 + document.body.scrollTop;
	}
	else if(nn6) {
		document.getElementById("confirm").style.left=60 + window.pageXOffset;
		document.getElementById("confirm").style.top=200 + window.pageYOffset;
	}
	// Wenn Browser zu alt herkömliche Abfrage
	else {
		if (confirmBrowser()) {
					if (PrivateStrButtonOk!="" && PrivateStrActionOk!="") {document.location.href = PrivateStrActionOk;}
			} else {
					if (PrivateStrButtonCancel!="" && PrivateStrActionCancel!="") {document.location.href = PrivateStrActionCancel;}
			}
	}
}

function confirmBrowser() {
 	var chk = window.confirm(PrivateStrWindowText);
 	return(chk);
}

function ButtonConfirmOk() {
	document.getElementById("confirm").style.visibility="hidden";
	deselectEvaluation();
	if (PrivateStrButtonOk!="" && PrivateStrActionOk!="") {document.location.href = PrivateStrActionOk ;}
}

function ButtonConfirmCancel() {
	document.getElementById("confirm").style.visibility="hidden";
	if (PrivateStrButtonCancel!="" && PrivateStrActionCancel!="") {document.location.href = PrivateStrActionCancel;}
}


//Relative Mausposition auf der Box ermitteln
function getxyRelativ() {
	moveStatus=1;
	if(ie5) {
		xRelativ=event.clientX-xConfirm;
		yRelativ=event.clientY-yConfirm;
	}
}