	n = (document.layers) ? 1:0
	ie = (document.all) ? 1:0
	isNS6 = (!document.all && document.getElementById) ? true : false;

	ns=window.navigator.appName == "Netscape"
	ie=window.navigator.appName == "Microsoft Internet Explorer"
	
	last_container=0;
	IsActive=1;

	/*
	==============================================================
	Script:     Amazing Frameless Popup Window - Version I

	Functions:  In IE4 and later, this script launches a popup
            window without the Windows frame or titlebar
            (that is, a "containerless" window).  In other
            browsers, it launches a standard popup window.
            Position, width, and height are settable.
            Automatic closing of the window on leaving the
            page may also be optionally set.

	Browsers:   IE4 and later
            Degrades fully functionally in other browsers

	Author:     etLux
	==============================================================*/
	function openFrameless(sUrl,sTitle,iX,iY,iWidth,iHeight){
		var s = "width="+iWidth+",height="+iHeight;
		var autoclose=true;
		if (ie){
			NFW = window.open("","popFrameless","fullscreen,"+s);
			NFW.blur();
			window.focus();
			NFW.resizeTo(iWidth,iHeight);
			NFW.moveTo(iX,iY);
			var frameString="<html><head><title>"+sTitle+"</title>";
			frameString+="</head><frameset rows='*,0' framespacing=0 border=0 frameborder=0>";
			frameString+="<frame name='top' src='"+sUrl+"' scrolling=no><frame name='bottom' src='about:blank' scrolling='no'>";
			frameString+="</frameset></html>";
			NFW.document.open();
			NFW.document.write(frameString);
			NFW.document.close();
		} else {
			NFW=window.open(sUrl,"popFrameless","scrollbars,"+s)
			NFW.blur()
			window.focus() 
			NFW.resizeTo(iWidth,iHeight)
			NFW.moveTo(iX,iY)
		}   
		NFW.focus()   
		if (autoclose){
			window.onunload = function(){NFW.close()}
		}
	}
	
	var refer=true;
	function combo() {
		if (refer) {
			if (isNS6) {
			var elm = 	document.getElementById("contents")
				elm.style.visibility = "visible";
			}
			else			
		
			if (n){
				document.layers["contents"].visibility = "show"
			}
			
			else
			
			if (ie){
				document.all.contents.style.visibility="visible";
			}
			refer=false;
		}
		else {
			if (isNS6) {
			var elm = 	document.getElementById("contents")
				elm.style.visibility = "hidden";
			}
			else			
		
			if (n){
				document.layers["contents"].visibility = "hide"
			}
			
			else
			
			if (ie){
				document.all.contents.style.visibility="hidden";
				}
			refer=true;
		}
	}

	function showcontainer(containerid)
	{
		if(IsActive==0) return;
		if(	last_container>0) 
		{
			sObj="container"+last_container;
			hidenon(sObj)
		}
		last_container=containerid;
		sObj="container"+last_container;
		shownon(sObj);
	}
	

	// Show/Hide Funktion
	function shownon(showobj) 
	
	{
			if (isNS6) {
			var elm = 	document.getElementById("lang")
			elm.style.visibility = "visible";
			}
			
			else			
		
			if (n){
				document.layers[showobj].visibility = "show"
			}
			
			else
			
			if (ie){
				document.all[showobj].style.visibility = "visible"	
			}				
	}
	
	function hidenon(hideobj)
	{
			if (isNS6) {
				var elm = 	document.getElementById("lang")
				elm.style.visibility = "hidden";
			}
			
			else
			
			if (n) {
				document.layers[hideobj].visibility = "hide"
			}
			
			else 
			
			if (ie) {
				document.all[hideobj].style.visibility = "hidden"
			}	
				
	}
	function submit_html(type)
	{
		if(type==1)
			document.forms[0].HTMLText.value = document.editor.getHTMLData("http://");
		else
			document.forms[0].HTMLText.value = document.editor2.getHTMLData("http://");
	}
	function OnEditorLoaded(applet)
	{
		applet.setHTMLData("http://",document.forms[0]._ctl1__ctl2__ctl1_tb_html.value);
	}
	function set_clipboard(sText){
		window.clipboardData.setData('Text', sText);
	}	
	
	function confirm_send_form(message,form_name)
	{
		Check = confirm(message);
		if(Check){
			//Confirm auf formular
			document.getElementsByName(form_name)[0].submit();
		}
	}	
	
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function DisplayWait() {
	theDiv=MM_findObj('PleaseWaitDiv');
	if(theDiv!=null)
		theDiv.style.visibility="visible";
}

function HideWait() {
	theDiv = MM_findObj('PleaseWaitDiv');
	if(theDiv!=null)
		theDiv.style.visibility="hidden";
}
