// ----------------------------------
// formativAdmin.js 1.1 - kundenrechner.net
//
// (C) 2000 - 2002 formativ.net e.K.
//
// last change: 15.07.2002
// ----------------------------------

// Funktion zur automatischen Weiterleitung nach Auswahl eines Wertes aus Dropdown
function submitDropDown(formularTarget,formularName) {
	window.self.location=formularTarget+"?"+formularName.name+"="+formularName.value;
}


// Funktion zum Öffnen des Hilfefensters
function openHelpWindow(fileName) {
	fileName="../../modules/help/help.php?helpFile=" + fileName;
	window.open(fileName,'helpWindow','width=270,height=320');
}


// Funktion zum Öffnen des Pfadbrowsers
function openPathWindow(field) {
	fileName="../../admin/kundenrechner.net/getdirinfo.php?baseName=/usr&field=" + field;
	window.open(fileName,'pathBrowser','width=400,height=400,scrollbars=yes');
}


// Funktion zum Öffnen der Voransicht eines Artikelbildes
function openPicWindow(picURL,picFeatures) {
	window.open(picURL,'',picFeatures);
}


// Funktion zum Öffnen des Textbaustein-Fensters
function openTBWindow(scSID) {
	window.open('nf_adminmailtemplatetpedittbview.php?scSID='+scSID,'','width=270,height=350,scrollbars=yes');
}


// Funktion zum Öffnen des Antworten-Archiv-Fensters
function openKBKeyWindow(scKbIDKey) {
	window.open('nf_adminsupporteditview.php?scKbIDKey='+scKbIDKey,'','width=270,height=280');
}


// Funktion zum Öffnen des Anfragen-Archiv-Fensters
function openKBArchiveWindow(scKbIDArchive) {
	window.open('nf_adminsupporteditviewarchive.php?scKbIDArchive='+scKbIDArchive,'','width=270,height=500');
}


// Funktion zum Öffnen des Textbaustein-Detail-Fensters
function openTBDetailWindow(scCfgMailTBID) {
	window.open('nf_adminmailtemplatetpedittbviewdetail.php?scCfgMailTBID='+scCfgMailTBID,'','width=270,height=280');
}


// Funktion zum Öffnen des AGB-Fensters
function openAGBWindowV1(scUserName) {
	window.open('http://nossl.kundenrechner.net/public/shop/cshartagbviewv1.php?scUserName='+scUserName,'','width=640,height=700,scrollbars=yes');
}

// Funktion zum Öffnen des AGB-Fensters
function openAGBWindowV2(scUserName) {
	window.open('http://nossl.kundenrechner.net/public/shop/cshartagbviewv2.php?scUserName='+scUserName,'','width=640,height=700,scrollbars=yes');
}


// Funktion zum Öffnen des HTML-Mail-Fensters
function openHTMLMailWindow(chWebMailMsgID,chWebMailAttPart) {
	// window.open('downloadatt_new.php?chWebMailMsgID='+chWebMailMsgID+'&chWebMailAttPart='+chWebMailAttPart+'&chWebMailAttType=html','','width=790,height=550,scrollbars=yes');
	window.open('nf_readprint.php?chWebMailMsgID='+chWebMailMsgID+'&chWebMailAttPart='+chWebMailAttPart,'','width=790,height=590,scrollbars=yes');
}


// Funktion zum Öffnen des Farbpaletten-Fensters
function openCpalWindow(scCfgShopStyleFieldName,scCfgShopStyleColor) {
	window.open('nf_shopdesigncpal.php?scCfgShopStyleFieldName='+scCfgShopStyleFieldName+'&scCfgShopStyleColor='+scCfgShopStyleColor,'','width=240,height=162,scrollbars=no');
}


// Funktion zum Öffnen der Druckansicht
function openPrintMailTextWindow(chWebMailMsgID) {
	window.open('nf_readprint.php?chWebMailMsgID='+chWebMailMsgID,'','width=790,height=590,scrollbars=yes');
}

// Funktion zum Öffnen der Quelltext-Ansicht
function openSrcMailWindow(chWebMailMsgID) {
	window.open('nf_readprint.php?chWebMailMsgID='+chWebMailMsgID+'&chWebMailViewSrc=true','','width=790,height=590,scrollbars=yes');
}

// Funktion zum Öffnen der IDN-Zeichenliste
function openIDNListWindow(chDomainTLD) {
	window.open('nf_hostdomainpreidncharlist.php?chDomainTLD='+chDomainTLD,'','width=500,height=500,scrollbars=yes');
}


// Funktion zum Öffnen des Domain-Info-Fensters
function openDomainInfoWindow(chDomainTLD) {
	window.open('nf_hostdomainpreinfo_'+chDomainTLD+'.php','','width=500,height=500,scrollbars=yes');
}


// Funktion zum Öffnen des Whois-Fensters
function openDomainWhoisWindow(chDomainName) {
	window.open('nf_adminuseraccounthosteditdomainseditwhois.php?chDomainName='+chDomainName,'','width=550,height=550,scrollbars=yes');
}


// Funktion: Öffnet HTML-Newsletter-Fenster
function openHTMLNewsWindow(scCfgNewsID) {
	window.open('http://news.kundenrechner.net/aktuell/read/'+scCfgNewsID,'','width=650,height=500,scrollbars=yes');
}


// Funktion zum Ermitteln der verfügbaren SMS-Zeichen
function checkSMSStr(formularName,maxChar) {
	strLen=formularName.smsMessage.value.length;
	if(strLen==1 && formularName.smsMessage.value.substring(0,1)== ' ') {
    		formularName.smsMessage.value='';
    		strLen=0;
    	}

    	if(strLen > maxChar) {
    		formularName.smsMessage.value=formularName.smsMessage.value.substring(0,maxChar);
        	strLeft=0;
    	} else {
    		strLeft=maxChar-strLen;
    	}

	formularName.smsLen.value=strLeft;
}


// Funktion zum Einsetzen des Anfangspassworts
function resetPassWord(scPassWordInit) {
	window.document.form1.scPassWordGet1.value=scPassWordInit;
	window.document.form1.scPassWordGet2.value=scPassWordInit;
}


// Funktion zum Markieren aller Checkboxen
function checkAllMail() {
	c=document.mailForm.checkAll.checked;
	for(i=0;i<document.mailForm.elements.length;i++) {
		e=document.mailForm.elements[i];
 		if(e.name!='checkAll' && e.name!='chWebMailAgExpungeTrashCheck') e.checked=c;
   	}
}


// Funktion zum Bookmarken
function createBookMark(scUrl,scText) {
	scBrowserVer=navigator.appName;
	scBrowserNum=parseInt(navigator.appVersion);
	if((scBrowserVer=="Microsoft Internet Explorer")&&(scBrowserNum>=4)) {
		window.external.AddFavorite(scUrl,scText);
	} else {
		window.open('nf_bookmarkinfo.php?scUrl='+scUrl+'&scText='+scText,'','width=350,height=280,scrollbars=yes,status=yes');
	}
}


// Funktion zum Öffnen des Hilfe-Centers
function openHelpCenterWindow(scFadsParentID) {
	window.open('nf_helppopup.php?scFadsParentID='+scFadsParentID,'helpcenterpopup','width=550,height=550,scrollbars=yes');
}

// Funktion zum Öffnen des Hilfe-Centers aus formativWebMail.de
function openHelpCenterWindowRemote(scFadsParentID) {
	window.open('http://www.kundenrechner.net/admin/kundenrechner.net/nf_helppopup.php?scFadsParentID='+scFadsParentID,'helpcenterpopup','width=550,height=550,scrollbars=yes');
}


// Funktiuon zum Öffnen des Domainpreislisten-Fensters
function openPLDomainWindow() {
	window.open('nf_hostdomainnewregpldomainview.php','','width=450,height=500,scrollbars=yes');
}

// Funktion zum Öffnen des BS-Vorschau-Fensters während der Bestellung
function openBSPreviewWindowOrder(ccmsBsUrl,corderOrderID,corderSessionID,corderPreviewTitleID,corderPreviewTitle,corderPreviewHeadline,corderPreviewBody,corderPreviewTeaser,corderPreviewFooter,corderPreviewSpecialPage,corderSite,corderOrigin) {
	dateNow=new Date();
	dateNowSec="ccmsBsPreview_"+dateNow.getTime();

	ccmsBsPreviewWindow=window.open('',dateNowSec,'width=950,height=700,scrollbars=yes,resizable=yes');
	ccmsBsPreviewWindow.document.write("<html><body>");
	ccmsBsPreviewWindow.document.write("<form name=\"form1\" target=\""+dateNowSec+"\" method=\"post\" action=\""+ccmsBsUrl+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"u\" value=\"preview\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderPreviewStatus\" value=\"true\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderOrderID\" value=\""+corderOrderID+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderSessionID\" value=\""+corderSessionID+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderPreviewTitleID\" value=\""+corderPreviewTitleID+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderPreviewTitle\" value=\""+encodeURIComponent(corderPreviewTitle)+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderPreviewHeadline\" value=\""+encodeURIComponent(corderPreviewHeadline)+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderPreviewBody\" value=\""+encodeURIComponent(corderPreviewBody)+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderPreviewTeaser\" value=\""+encodeURIComponent(corderPreviewTeaser)+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderPreviewFooter\" value=\""+encodeURIComponent(corderPreviewFooter)+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderPreviewSpecialPage\" value=\""+corderPreviewSpecialPage+"\">");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"ccmsSite\" value=\""+corderSite+"\" />");
	ccmsBsPreviewWindow.document.write("<input type=\"hidden\" name=\"corderOrigin\" value=\""+corderOrigin+"\" />");
	ccmsBsPreviewWindow.document.write("</form>");
	ccmsBsPreviewWindow.document.write("</body></html>");
	ccmsBsPreviewWindow.document.form1.submit();
}

// Funktion zum Öffnen des BS-Bilderverwaltungs-Fensters
function openBSPcWindow() {
	window.open('nf_cmsbspc.php','ccmsBsPc','width=540,height=470,scrollbars=yes');
}

// Funktion zum Öffnen der Voransicht eines BS-Bildes
function openBSPcPreviewWindow(picURL,picFeatures) {
	window.open(picURL,'',picFeatures);
}

// Funktion zum Öffnen des BS-Motivauswahl-Fensters
function openBSMtWindow(tp,tps) {
	window.open('nf_cmsbsmt.php?tp='+tp+'&tps='+tps,'ccmsBsMt','width=850,height=650,scrollbars=yes');
}

// Funktion zum Öffnen des BS-Designauswahl-Fensters
function openBSTpWindow() {
	window.open('nf_cmsbstp.php','ccmsBsTp','width=650,height=650,scrollbars=yes');
}

// Funktion zum Öffnen des BS-Design-Vollansicht-Fensters
function openBSTpFullWindow(ccmsTpScreenshotPathFull,ccmsTpScreenshotType) {
	window.open('nf_cmsbstpfull.php?ccmsTpScreenshotPathFull='+ccmsTpScreenshotPathFull+'&ccmsTpScreenshotType='+ccmsTpScreenshotType,'','width=100,height=100,scrollbars=yes');
}


// Funktion zum Öffnen des Tarifoptionen-Infofensters
function openModInfoWindow(chModID) {
	window.open('nf_hostmodview.php?chModID='+chModID,'','width=300,height=250,scrollbars=yes');
}

// Funktion zum Öffnen des Bildupload-Fensters
function openImageUploadWindow(cImageRealm,cImageOrigImage,cImageOrigComment,cImageUploadPreviewLayer,cImageUploadName,cImageThumbUploadName,cImageMiniUploadName,cImageCommentUploadName) {
	window.open('nf_imageupload.php?cImageRealm='+cImageRealm+'&cImageOrigImage='+cImageOrigImage+'&cImageOrigComment='+cImageOrigComment+'&cImageUploadPreviewLayer='+cImageUploadPreviewLayer+'&cImageUploadName='+cImageUploadName+'&cImageThumbUploadName='+cImageThumbUploadName+'&cImageMiniUploadName='+cImageMiniUploadName+'&cImageCommentUploadName='+cImageCommentUploadName,'','width=540,height=550,scrollbars=yes');
}

// Funktion zum Öffnen des Bilder-Galerie-Dia-Show-Vorschau-Fensters
function openImageGalleryShowPreviewWindow(cImageGalleryUniqueID) {
	window.open('http://nossl.kundenrechner.net/public/scripts/gallery/gallery.php?u='+cImageGalleryUniqueID,'','width=820,height=700');
}

// Funktion zum Öffnen des Bilder-Galerie-Dia-Show-Vorschau-Fensters
function openImageGalleryPreviewWindow(cImageGalleryImagePath) {
	window.open('nf_hostscriptsgalleryeditimageview.php?chScriptsGalleryImagePath='+cImageGalleryImagePath,'','width=300,height=300');
}

// Funktion zum Öffnen des Werbemittel-Vorschau-Fensters
function openWerbemittelPreviewWindow(scCfgPPAdID) {
	window.open('nf_ppstatsimageview.php?scCfgPPAdID='+scCfgPPAdID,'','width=300,height=200');
}

// Funktion zum Öffnen des Artikelnummern-Fensters
function openArtNumWindow() {
	window.open('nf_adminppprodartlist.php','','width=300,height=350,scrollbars=yes');
}

// Funktion zum Öffnen des BS-Design-Katalogs
function openBSKatalogueWindowTemplate(ccmsKatalogueInit,ccmsKatalogueType) {
	ccmsKatalogueType="2";
	window.open('http://www.formativ.net/order/businessstarterlist.php?ccmsBsKatalogueInit='+ccmsKatalogueInit+'&ccmsKatalogueType='+ccmsKatalogueType+'&ccmsExportTemplate=true','ccmsBsKatalogue','width=720,height=580,scrollbars=no');
}

// Funktionen zum Öffnen der Gewinnspiel-Infos
function openPlayAndWinInfo01() {
	window.open('nf_playandwininfo01.php','','width=510,height=550,scrollbars=no');
}

function openPlayAndWinInfo02() {
	window.open('nf_playandwininfo02.php','','width=510,height=620,scrollbars=no');
}

function openPlayAndWinInfo03() {
	window.open('nf_playandwininfo03.php','','width=510,height=350,scrollbars=no');
}

// Funktion zum Öffnen der Gewinnspiel-Infos
function openPlayAndWinView(scSID,scWinType) {
	window.open('http://nossl.kundenrechner.net/'+scSID+'/admin/kundenrechner.net/nf_playandwinview.php?scWinType='+scWinType,'','width=640,height=360,scrollbars=no');
}

// Funktion zum Öffnen des WebMail-Kontakte-Fensters
function openContactMailWindow(ccontactType) {
	window.open('nf_selectcontact.php?ccontactType='+ccontactType,'','width=530,height=400,scrollbars=yes');
}

// Funktion zum Einfügen eines Kontakts auf formativWebMail.de
function insertContact(ccontactMail01,ccontactType) {
	if(ccontactType=="1" || ccontactType=="2") {
		if(opener.document.form3.chWebMailSendTo.value=="") opener.document.form3.chWebMailSendTo.value=ccontactMail01;
		else opener.document.form3.chWebMailSendToCc.value=opener.document.form3.chWebMailSendToCc.value+ccontactMail01+'; ';
	}

	if(ccontactType=="3") {
		opener.document.form3.chWebMailSendToBcc.value=opener.document.form3.chWebMailSendToBcc.value+ccontactMail01+'; ';
	}
}

// Variable zur Steuerung der Ausrichtung der Info-Layer definieren
cInfoLayerDir='l';

// Funktion: Ermittelt aktuelle Mausposition für Info-Box und setzt die Koordinaten entsprechend
// Rückgabe: Null
function getInfoLayerPos(e) {
	// Werte definieren
	cInfoLayerObj=document.getElementById('infoLayer');
	cInfoLayerWidth=cInfoLayerObj.offsetWidth;
	cInfoLayerHeight=cInfoLayerObj.offsetHeight;

	// Mausposition ermitteln
	if(document.all) {
		cInfoLayerMouseX=window.event.x;
		cInfoLayerMouseY=window.event.y;
	} else {
		cInfoLayerMouseX=e.pageX;
		cInfoLayerMouseY=e.pageY;
	}

	// Scroll-Position ermitteln
	if(self.pageYOffset) {
		// Alle Browser außer IE
		cInfoLayerScrollX=self.pageXOffset;
		cInfoLayerScrollY=self.pageYOffset;
	} else if(document.documentElement && document.documentElement.scrollTop) {
		// IE 6 Strict Mode
		cInfoLayerScrollX=document.documentElement.scrollLeft;
		cInfoLayerScrollY=document.documentElement.scrollTop;
	} else if(document.body) {
		// Andere IE-Versionen
		cInfoLayerScrollX=document.body.scrollLeft;
		cInfoLayerScrollY=document.body.scrollTop;
	}

	// Position ausrechnen
	// if(document.all && !document.captureEvents) {
	if(document.all) {
		// Nur IE und Opera
		cInfoLayerPosX=cInfoLayerMouseX+cInfoLayerScrollX;
		cInfoLayerPosY=cInfoLayerMouseY+cInfoLayerScrollY;
	} else {
		cInfoLayerPosX=cInfoLayerMouseX;
		cInfoLayerPosY=cInfoLayerMouseY;
	}

	// Position des Layers definieren
	if(cInfoLayerDir=="r") {
		// Layer nach rechts ausrichten
			cInfoLayerObj.style.left=cInfoLayerPosX+"px";
			cInfoLayerObj.style.top=cInfoLayerPosY+40+"px";
		} else {
		// Layer nach links ausrichten
		cInfoLayerObj.style.left=cInfoLayerPosX-cInfoLayerWidth-20+"px";
		cInfoLayerObj.style.top=cInfoLayerPosY-cInfoLayerHeight-20+"px";
	}
}

// Funktion: Blendet Info-Box ein
// Rückgabe: Null
function showInfoLayer(cInfoLayerText) {
	if(cInfoLayerText!="") {
		// Werte definieren
		cInfoLayerObj=document.getElementById('infoLayer');
		cInfoLayerTextObj=document.getElementById('infoLayerText');

		// Layereigenschaften festlegen
		cInfoLayerObj.style.zIndex="99";
		cInfoLayerTextObj.innerHTML=cInfoLayerText;

		// Position ermitteln
		document.onmousemove=getInfoLayerPos;

		// Layer einblenden
		cInfoLayerObj.style.visibility="visible";
	}
}

// Funktion: Blendet Info-Box aus
// Rückgabe: Null
function hideInfoLayer() {
	// Position löschen
	document.onmousemove=doNothing;

	// Werte definieren
	cInfoLayerObj=document.getElementById('infoLayer');

	// Layer ausblenden
	cInfoLayerObj.style.visibility="hidden";

	// Layer in unsichtbaren Bereich verschieben,
	// damit beim Wiedereinblenden der IE kein Flackern produziert
	cInfoLayerObj.style.top="-500px";
	cInfoLayerObj.style.left="-500px";
}


function doNothing() {
	// Nichts machen ;)
}





// Funktion: Erzeugt AJAX-Objekt
// Rückgabe: AJAX-Objekt
function getRequestObject() {
	var rObject;
	
	// Mozilla-Kompitabilität prüfen
	if(window.XMLHttpRequest) {
		try {
			rObject=new XMLHttpRequest();
		}
		
		catch(e) {
			rObject=null;
		}
	} else {
		// IE-Kompatibilität prüfen
		try {
			// Neuere Methode austesten
			rObject=new ActiveXObject("Msxml2.Xmlhttp");
		}
		
		catch(e) {
			try {
				// Ältere Methode austesten
				rObject=new ActiveXObject("Microsoft.XMLHTTP");
			}
			
			catch(e) {
				// ActiveX bzw. JS deaktiviert
				rObject=null;
			}
		}
	}
	
	if(rObject==null) {
		// alert("Ihr Browser unterstützt kein AJAX.");
	}
	
	return rObject;
}


// Funktion: Parst AJAX-Ergebnis
// Rückgabe: Null
function doFwsAjaxRequestGetUserQuotaWebMail() {
	if(requestObject.readyState==4) {
		// Übertragung der Daten ist beendet, Daten können ausgelesen werden
		var rDatenXML=requestObject.responseXML;
		
		// XML-Daten verarbeiten
		if(rDatenXML) {
			var rFwsGetUserQuotaValue=rDatenXML.getElementsByTagName("fwsGetUserQuotaValue");
			var rFwsUserMailSpace=rDatenXML.getElementsByTagName("fwsUserMailSpace");
			
			var rFwsGetUserQuotaValueThis=rFwsGetUserQuotaValue[0].firstChild.nodeValue;
			var rFwsUserMailSpaceThis=rFwsUserMailSpace[0].firstChild.nodeValue;		
			
			if(document.getElementById('fwsGetUserQuotaSpan')) document.getElementById('fwsGetUserQuotaSpan').innerHTML=rFwsGetUserQuotaValueThis+" MB von "+rFwsUserMailSpaceThis+" MB";
			if(document.getElementById('fwsGetUserQuotaSpanQuotaValue')) document.getElementById('fwsGetUserQuotaSpanQuotaValue').innerHTML=rFwsGetUserQuotaValueThis+" MB";
			if(document.getElementById('fwsGetUserQuotaSpanMailSpace')) document.getElementById('fwsGetUserQuotaSpanMailSpace').innerHTML=rFwsUserMailSpaceThis+" MB";		
		}
	} else {
		/* 
		if(document.getElementById('fwsGetUserQuotaSpan')) document.getElementById('fwsGetUserQuotaSpan').innerHTML="...";
		if(document.getElementById('fwsGetUserQuotaSpanQuotaValue')) document.getElementById('fwsGetUserQuotaSpanQuotaValue').innerHTML="...";
		if(document.getElementById('fwsGetUserQuotaSpanMailSpace')) document.getElementById('fwsGetUserQuotaSpanMailSpace').innerHTML="...";		
		*/
	}
}


// Funktion: Führt AJAX-Abfrage aus (UserQuota)
// Rückgabe: Null
function fwsAjaxRequestGetUserQuotaWebMail(fwsSSLStatus,fwsSessionID,fwsMailBox,fwsMailBoxGroup) {
	if(fwsSessionID!="" && (document.getElementById('fwsGetUserQuotaSpan') || document.getElementById('fwsGetUserQuotaSpanQuotaValue') || document.getElementById('fwsGetUserQuotaSpanMailSpace'))) {
		// Abfrage initialisieren
		if(fwsSSLStatus=="1") requestUrl="https://ssl.kundenrechner.net/ajax/ajaxfwsrequestgetuserquotawebmail.php";
		else requestUrl="http://nossl.kundenrechner.net/ajax/ajaxfwsrequestgetuserquotawebmail.php";
	
		// Verbindung öffnen
		requestObject.open("post",requestUrl);
	
		// POST-Header senden
		requestObject.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	
		// Event-Handler vorbereiten
		requestObject.onreadystatechange=doFwsAjaxRequestGetUserQuotaWebMail;
		
		// Anfrage senden
		requestObject.send("fwsSessionID="+fwsSessionID+"&fwsMailBox="+fwsMailBox+"&fwsMailBoxGroup="+fwsMailBoxGroup);
	}
}


// Funktion: Blendet benutzerdefinierten Layer mit IFrame-Inhalt ein
// Rückgabe: Null
function showIframeBox(cIframeBoxID,cIframeUrl,cIframeWidth,cIframeHeight) {
	cIframeBoxObj=document.getElementById(cIframeBoxID);

	// Maße der PopUp-Box definieren
	cIframeBoxObj.childNodes[0].style.width=cIframeWidth+"px";
	cIframeBoxObj.childNodes[0].style.height=cIframeHeight+"px";		

	// Maße des IFrames definieren
	cIframeBoxObj.childNodes[0].childNodes[0].style.width=cIframeWidth+"px";
	cIframeBoxObj.childNodes[0].childNodes[0].style.height=cIframeHeight+"px";		
	
	// IFrame-Content laden
	cIframeBoxObj.childNodes[0].childNodes[0].src=cIframeUrl;		

	// Layer einblenden
	//$("#"+cIframeBoxID).show("blind","slow");
	$("#"+cIframeBoxID).show();	
} 


// Funktion: Blendet benutzerdefinierten Layer mit IFrame-Inhalt aus
// Rückgabe: Null
function hideIframeBox(cIframeBoxID,cIframeParentStatus) {
	// Layer ausblenden
	if(cIframeParentStatus) window.parent.$("#"+cIframeBoxID).hide("blind","slow");
	else $("#"+cIframeBoxID).hide("blind","slow");
}


// Funktion: Wandelt beliebigen Dateinamen in URL-konforme Schreibweise um
// Rückgabe: Umgewandelter Dateiname
function fileNameUrlEncode(cString) {
	if(cString!="") {
		cString=cString.toLowerCase();
		cString=cString.replace(/\u00fc/g,"ue");
		cString=cString.replace(/\u00f6/g,"oe");
		cString=cString.replace(/\u00e4/g,"ae");
		cString=cString.replace(/\u00dc/g, "ue");
		cString=cString.replace(/\u00d6/g, "oe");
		cString=cString.replace(/\u00c4/g, "ae");
		cString=cString.replace(/\u00df/g,"ss");
		cString=cString.replace(/ü/g,"ue");
		cString=cString.replace(/ö/g,"oe");
		cString=cString.replace(/ä/g,"ae");
		cString=cString.replace(/Ü/g,"ue");
		cString=cString.replace(/Ö/g,"oe");
		cString=cString.replace(/Ä/g,"ae");
		cString=cString.replace(/ß/g,"ss");
		cString=cString.replace(/[^a-z0-9]+/gi,"_");
	
		return cString;
	}
}

