//Browserweichevar agent = navigator.userAgent.toLowerCase();var isIE = (agent.indexOf("msie")!=-1);//Web Datenbankpfad auslesenfunction getPathDB() {//	return strDBPathBasisdatenWeb;	return "/WINWeinig/WINBasisdaten.nsf";}//Variablen setzenvar PrivateStrWindowText = ""var PrivateStrButtonOk = ""var PrivateStrActionOk = ""var PrivateStrButtonCancel = ""var PrivateStrActionCancel = ""var confirmTitle = "";var confirmText="<p align='center'>&nbsp;</p>";var confirmHeight=150;var confirmWidth=300;var blnWaitAndSubmit = false;var blnWaitAndLink = false; //Cellspacing und Cellpadding bestimmenif(isIE) {	cs=2;	th=30;} else {	cs=0;	th=20;}//Box anzeigenfunction showConfirm(strWindowTitle, strWindowText, strButtonOk, strActionOk , strButtonCancel, strActionCancel, strPicture, intWidth, intHeight) {	// Wait Fenster nicht mehr anzeigen	if (strPicture == "Wait") {return;}	var iTop = 0;	var iLeft = 0;		var strPicturePath = "";	if (!intWidth) intWidth = confirmWidth;	if (!intHeight) intHeight = confirmHeight;		document.getElementById("confirm").style.width = intWidth + "px";	document.getElementById("confirmFrame").style.width = intWidth + "px";		document.getElementById("confirm").style.height = intHeight + "px";	document.getElementById("confirmFrame").style.height = intHeight + "px";	PrivateStrWindowText = strWindowText;	PrivateStrButtonOk = strButtonOk;	PrivateStrActionOk = strActionOk;	PrivateStrButtonCancel = strButtonCancel;	PrivateStrActionCancel = strActionCancel;		//Texte setzen	document.getElementById("ConfirmTitle").innerHTML= strWindowTitle;	document.getElementById("ConfirmText").innerHTML= strWindowText;		//Bild setzen	switch(strPicture) {	case "Question":		strPicturePath = getPathDB() +  "/MsgQuestion.gif"		document.getElementById("picture").style.display = "inline";	 		break; 	case "Exclamation": 		strPicturePath = getPathDB() + "/MsgExclamation.gif" 		document.getElementById("picture").style.display = "inline";	 		break; 	case "Wait": 		strPicturePath = getPathDB() + "/MsgWait.gif" 		document.getElementById("picture").style.display = "inline";	 		break; 	default: 		document.getElementById("picture").style.display = "none"; 		break;	}		if (strPicturePath != "") {		document.getElementById("ConfirmImage").style.width = "45px";		// Bild Container aktiv		document.getElementById("picture").src = strPicturePath;//		document.getElementById("picture").src = strPicturePath;		// Wg. IE Ladeproblem//		document.getElementById("picture").src = strPicturePath;		// Wg. IE Ladeproblem	} else {		document.getElementById("ConfirmImage").style.width = "0px";			// Bild Container inaktiv	}			//Buttons definieren	var strButtons = "";	if (strButtonOk != "") {		strButtons = strButtons + 	"<span class='Actions' id='Ok'><button type='button' id='ConfirmOk' onMouseover=\"buttonMouseover('ConfirmOk')\" onMouseout=\"buttonMouseout('ConfirmOk')\" onClick=\"javascript:ButtonConfirmOk()\"><img src='" + getPathDB()  + "/red_arrow.gif' border='0'>" + strButtonOk + "</button></span>&nbsp;&nbsp;"	}	if (strButtonCancel != "") {		strButtons = strButtons + "<span class='Actions' id='Cancel'><button type='button' id='ConfirmCancel' onMouseover=\"buttonMouseover('ConfirmCancel')\" onMouseout=\"buttonMouseout('ConfirmCancel')\" onClick=\"javascript:ButtonConfirmCancel()\"><img src='" + getPathDB()  + "/red_arrow.gif' border='0'>" + strButtonCancel + "</button></span>";	}	document.getElementById("buttons").innerHTML = strButtons;			//Position der Box berechnen		if(isIE) {		iTop = (document.body.offsetHeight - intHeight) / 4;		iLeft = (document.body.offsetWidth - intWidth) / 2;				document.getElementById("confirm").style.left = iLeft + document.body.scrollLeft + "px";		document.getElementById("confirm").style.top = iTop + document.body.scrollTop + "px";		document.getElementById("confirmFrame").style.left = iLeft + document.body.scrollLeft + "px";		document.getElementById("confirmFrame").style.top = iTop + document.body.scrollTop + "px";	} else {		iTop = (window.innerHeight - intHeight) / 4;		iLeft = (window.innerWidth - intWidth) / 2;			document.getElementById("confirm").style.left=iLeft + window.pageXOffset + "px";		document.getElementById("confirm").style.top=iTop + window.pageYOffset + "px";		document.getElementById("confirmFrame").style.left = iLeft + window.pageXOffset + "px";		document.getElementById("confirmFrame").style.top = iTop + window.pageYOffset + "px";	}			//Box und IFrame sichtbar machen		document.getElementById("confirm").style.display = "block";	document.getElementById("confirmFrame").style.display = "block";		}function ButtonConfirmOk() {	//Box und IFrame wieder verstecken und gegebenefalls weiterleiten	document.getElementById("confirm").style.display = "none";	document.getElementById("confirmFrame").style.display = "none";	blnWaitAndLink = false;	if (PrivateStrButtonOk!="" && PrivateStrActionOk!="") {document.location.href = PrivateStrActionOk ;}}function ButtonConfirmCancel() {	//Box und IFrame wieder verstecken und gegebenefalls weiterleiten	document.getElementById("confirm").style.display = "none";	document.getElementById("confirmFrame").style.display = "none";	if (PrivateStrButtonCancel != "" && PrivateStrActionCancel != "") {document.location.href = PrivateStrActionCancel;}}function showWaitAndSubmit() {	if (blnWaitAndSubmit == true){return};	blnWaitAndSubmit = true;	showConfirm(strDBTitle, 'Please wait...', '', '', '', '', 'Wait');	document.forms[0].submit();}function showWaitAndSubmitText(strText) {	if (blnWaitAndSubmit == true){return};	blnWaitAndSubmit = true;	showConfirm(strDBTitle, strText, '', '', '', '', 'Wait');	document.forms[0].submit();}function showWaitAndLink(strLink) {	if (blnWaitAndLink == true){return};	if (strLink == ""){return};	blnWaitAndLink = true;	showConfirm(strDBTitle, 'Please wait...', '', '', '', '', 'Wait');	location.href = strLink;}function showWaitAndLinkTimeout(strLink,intTimeout) {	if (blnWaitAndLink == true){return};	blnWaitAndLink = true;	showConfirm(strDBTitle, 'Please wait...', '', '', '', '', 'Wait');	location.href = strLink;     setTimeout('ButtonConfirmOk()',intTimeout);}
