<!-- ================================================================================================ -->
<!-- Macht ein Objekt unsichtbar, wenn in der Listbox das Element mit Index 'index' selektiert wurde. -->
<!-- ================================================================================================ -->
function setObjectInvisibleByListboxSelection (listboxId, index, targetId) {

	if(document.getElementById(listboxId).selectedIndex==index){
		setButtonStatus ('H', targetId);		
		//document.getElementById(targetId).style.visibility='hidden';								
	} else {
	 	setButtonStatus ('V', targetId)
		//document.getElementById(targetId).style.visibility='visible';			
	}
	
	return;
}

<!-- ================================================================================================ -->
<!-- Buttonstatus setzten 																			  -->
<!-- ================================================================================================ -->
function setButtonStatus (status, buttonId) {
	
	// Button unsichtbar machen
	if (status=="H")
		document.getElementById(buttonId).style.visibility='hidden';
	// Button sichtbar machen
	else if (status=="V")
		document.getElementById(buttonId).style.visibility='visible';
}

<!-- ================================================================================================ -->
<!-- Lädt zwei Frames gleichzeitig. Der Type definiert den Frametyp.																	  -->
<!-- ================================================================================================ -->
function loadFramesTwo (type, ulr_1,framename_1,url_2,framename_2) {

	// konventionelle Frames
	if (type=="F") {
		parent.frames[framename_1].location.href=ulr_1;
		parent.frames[framename_2].location.href=url_2;
	
	// iFrames	
	} else if (type=="I") {
	  	Frame1=eval(framename_1);
  		Frame2=eval(framename_2);
  		Frame1.location.href = ulr_1;
  		Frame2.location.href = url_2;
	}
}

<!-- ================================================================================================ -->
<!-- Lädt drei Frames gleichzeitig. Der Type definiert den Frametyp.																	  -->
<!-- ================================================================================================ -->
function loadFramesThree (ulr_1,framename_1,url_2,framename_2,url_3,framename_3) {

	// konventionelle Frames
	if (type="F") {
		parent.frames[framename_1].location.href=ulr_1;
		parent.frames[framename_2].location.href=url_2;
		parent.frames[framename_3].location.href=url_3;
	
	// iFrames	
	} else if (type="I") {
	  	Frame1=eval(framename_1);
  		Frame2=eval(framename_2);
		Frame3=eval(framename_3);
  		Frame1.location.href = ulr_1;
  		Frame2.location.href = url_2;
		Frame3.location.href = url_3;
	}
}

<!-- ================================================================================================ -->
<!-- Öffnet ein Popupfenster mit den gewünschten Window Features									  -->
<!-- ================================================================================================ -->
function openPopup (url, name, width, height, windowFeatures) {
   var popup;
   if ((width == 0) || (height == 0)) {
	   popup = window.open(url, name, windowFeatures);
   } else {
	   if (document.all) {
	      if (window.screenLeft) {
	        var x = window.screenLeft;
	        var y = window.screenTop;
	      } else {
	        var x = window.document.body.offsetLeft;
	        var y = window.document.body.offsetTop;
	      }
	      var w = window.document.body.offsetWidth;
	      var h = window.document.body.offsetHeight;
	    } else {
	      var x = window.screenX;
	      var y = window.screenY;
	      var w = window.outerWidth;
	      var h = window.outerHeight;
	    }
	    var cx = x + Math.round((w - width) / 2);
	    var cy = y + Math.round((h - height) / 2);
	    popup = window.open(url, name, 'left=' + cx + ',top=' + cy + ',width=' + width + ',height=' + height + ',' + windowFeatures);
	}
    popup.focus();
    return popup;
}

<!-- ================================================================================================ -->
<!-- Öffnet einen Druckdialog um das aktuelle Fenster auszudrucken									  -->
<!-- ================================================================================================ -->
function printWindow(){

  	if (window.print)
  		window.print();
  	else
  		window.alert("Das Drucken ist leider nicht möglich!");
}

<!-- ================================================================================================ -->
<!-- Schliesst das aktuelle Fenster									  								  -->
<!-- ================================================================================================ -->
function closeWindow(){
	window.close();
}

function switchLayer(layerName){

  var GECKO = document.getElementById? 1:0 ;
  var NS = document.layers? 1:0 ;
  var IE = document.all? 1:0 ;

  if (GECKO)
       {document.getElementById(layerName).style.display=
	   (document.getElementById(layerName).style.display=='block') ? 'none' : 'block';}
  else if (NS)
       {document.layers[layerName].display=(document.layers[layerName].display==
	   'block') ? 'none' : 'block';}
  else if (IE)
       {document.all[layerName].style.display=(document.all[layerName].style.display==
	   'block') ? 'none' : 'block';}
}

<!-- ================================================================================================ -->
<!-- Verhindert das Markieren von Seiteninhalten durch markieren der gewünschten Stelle				  -->
<!-- ================================================================================================ -->
function disableselect(e){
	return false;
}

function reEnable(){
	return true;
}

document.onselectstart=new Function("return false")

if (window.sidebar){
	document.onmousedown = disableselect;
	document.onclick = reEnable;
}

<!-- ================================================================================================ -->
<!-- Verhindert das Markieren von Seiteninhalten durch markieren der gewünschten Stelle				  -->
<!-- ================================================================================================ -->
function InsertMail(mailnam,mailsvr,maildom,text){

  if(text=="")
    document.write('<a class="link" href="mailto:'+mailnam+'@'+mailsvr+'.'+maildom+'">'+mailnam+'@'+mailsvr+'.'+maildom+'</a>');
  else
    document.write('<a class="link" href="mailto:'+mailnam+'@'+mailsvr+'.'+maildom+'">'+text+'</a>');
}

<!-- ================================================================================================ -->
<!-- Zeit- u. Datumsfunktionalitäten																  -->
<!-- ================================================================================================ -->


<!-- ================================================================================================ -->
<!-- Clue Funktionalität																			  -->
<!-- ================================================================================================ -->
var spanclass = "";	
	
/** Funktion welche einen BW clue mit Javascript aufbaut 

	@param type				none, info, warning, critical, error
	@param boxBreite		normal 400
	@param titleText		Erste Zeile der FehlerMeldung (zB. Bitte Korrigieren Sie )
	@param bodyTextArray	Array mit den Meldungen in html - li Tags
	
	Beispielaufruf:
	<div class="messageInfo" id="clue">
	<script type="text/javascript">
	<!--			
		var textmeldungen = new Array();
		textmeldungen [0]= 'hallo1';
		textmeldungen [1]= 'hallo2';	
		createClue("none", '500', 'titel', textmeldungen );
	//-->
	</script>
	</div>
*/
function createClue( type, boxBreite, titleText, bodyTextArray){
	
	var imagePath 	= './resources/images/';
	var boxIcon;
	
	if (type=="none") {
		boxIcon = "cleardot.gif";
	} else if (type=="info") {
		boxIcon = "info.gif";
	} else if (type=="warning") {
		boxIcon = "warning.gif";
	} else if (type=="critical") {
		boxIcon = "critical.gif";
	} else if (type=="error") {
		boxIcon = "error.gif";
	} 
	
	var gif0 		= imagePath + "cleardot.gif";
	var gifwarning 	= imagePath + boxIcon;
	
	
	// für die css -class zuweisung pro browser
	if(navigator.appName.indexOf("Microsoft") != -1  || navigator.appName.indexOf("Opera") != -1){					
		spanclass = "className";
	}else if(navigator.appName.indexOf("Netscape") != -1){
		spanclass = "class";					
	} else {
		spanclass = "className";	
	}

	var table = document.createElement("table");
	table.setAttribute(spanclass, "messageBorder");
	table.setAttribute("width", boxBreite); 
	table.setAttribute("cellSpacing", "1");
	table.setAttribute("cellPadding", "0");
	table.setAttribute("border", "0");
	
	var tr0 = table.insertRow(0);
	var td0 = document.createElement("td");
	
	var tableClou = document.createElement("table");
	tableClou.setAttribute(spanclass, "messageText");
	tableClou.setAttribute("width", "100%"); 
	tableClou.setAttribute("cellSpacing", "0");
	tableClou.setAttribute("cellPadding", "0");
	tableClou.setAttribute("border", "0");
	
	
	var tr1 = tableClou.insertRow(0);
	
	var td1_1 = document.createElement("td");
	td1_1.setAttribute("rowSpan", "3");
	td1_1.setAttribute(spanclass, "messageIcon");
	var img1_1 = document.createElement("img");
	img1_1.setAttribute("src", gif0);
	img1_1.setAttribute("width", "10");
	img1_1.setAttribute("height", "1");
	td1_1.appendChild(img1_1);
	tr1.appendChild(td1_1);
	
	var td1_2 = document.createElement("td");
	td1_2.setAttribute(spanclass, "messageIcon");
	var img1_2 = document.createElement("img");
	img1_2.setAttribute("src", gif0);
	img1_2.setAttribute("width", "32");
	img1_2.setAttribute("height", "10");
	td1_2.appendChild(img1_2);
	tr1.appendChild(td1_2);
	
	var td1_3 = document.createElement("td");
	td1_3.setAttribute("rowSpan", "3");
	td1_3.setAttribute(spanclass, "messageIcon");
	var img1_3 = document.createElement("img");
	img1_3.setAttribute("src", gif0);
	img1_3.setAttribute("width", "10");
	img1_3.setAttribute("height", "32");
	td1_3.appendChild(img1_3);
	tr1.appendChild(td1_3);
	
	var td1_4 = document.createElement("td");
	td1_4.setAttribute("rowSpan", "3");
	td1_4.setAttribute(spanclass, "messageText");
	var img1_4 = document.createElement("img");
	img1_4.setAttribute("src", gif0);
	img1_4.setAttribute("width", "10");
	img1_4.setAttribute("height", "1");
	td1_4.appendChild(img1_4);
	tr1.appendChild(td1_4);
	
	var td1_5 = document.createElement("td");
	td1_5.setAttribute(spanclass, "messageText");
	var img1_5 = document.createElement("img");
	img1_5.setAttribute("src", gif0);
	img1_5.setAttribute("width", "10");
	img1_5.setAttribute("height", "1");
	td1_5.appendChild(img1_5);
	tr1.appendChild(td1_5);
	
	var td1_6 = document.createElement("td");
	td1_6.setAttribute("rowSpan", "3");
	td1_6.setAttribute(spanclass, "messageText");
	var img1_6 = document.createElement("img");
	img1_6.setAttribute("src", gif0);
	img1_6.setAttribute("width", "10");
	img1_6.setAttribute("height", "1");
	td1_6.appendChild(img1_6);
	tr1.appendChild(td1_6);
	
	var tr2 = tableClou.insertRow(1);
	var td2_1 = document.createElement("td");
	td2_1.setAttribute("valign", "top");
	td2_1.setAttribute(spanclass, "messageIcon");
	var img2_1 = document.createElement("img");
	img2_1.setAttribute("src", gifwarning);
	img2_1.setAttribute("width", "32");
	img2_1.setAttribute("height", "32");
	td2_1.appendChild(img2_1);
	tr2.appendChild(td2_1);
	
	var td2_2 = document.createElement("td");
	td2_2.setAttribute("width", "100%");
	var t2_2 = document.createTextNode(titleText);
	td2_2.appendChild(t2_2);
	//*** list
	var ul2_2 = document.createElement("ul");		
	for(var i = 0; i<bodyTextArray.length; i++){	
		ul2_2.setAttribute(spanclass, "list_style");
		var li2_2 = document.createElement("li");
		var lite2_2 = document.createTextNode(bodyTextArray[i]);
		li2_2.appendChild(lite2_2);
		ul2_2.appendChild(li2_2);
	}		
	td2_2.appendChild(ul2_2);
	//*** end list			
	tr2.appendChild(td2_2);
	
	
	var tr3 = tableClou.insertRow(2);
	
	var td3_1 = document.createElement("td");
	td3_1.setAttribute(spanclass, "messageIcon");
	var img3_1 = document.createElement("img");
	img3_1.setAttribute("src", gif0);
	img3_1.setAttribute("width", "1");
	img3_1.setAttribute("height", "10");
	td3_1.appendChild(img3_1);
	tr3.appendChild(td3_1);
	
	var td3_2 = document.createElement("td");
	td3_2.setAttribute(spanclass, "messageText");
	var img3_2 = document.createElement("img");
	img3_2.setAttribute("src", gif0);
	img3_2.setAttribute("width", "1");
	img3_2.setAttribute("height", "1");
	td3_2.appendChild(img3_2);
	tr3.appendChild(td3_2);
	
	td0.appendChild(tableClou);
	tr0.appendChild(td0);
	
	var img0 = document.createElement("img");
	img0.setAttribute("src", gif0);
	img0.setAttribute("width", "10");
	img0.setAttribute("height", "10");
	
	document.getElementById("clue").appendChild(table);
	document.getElementById("clue").appendChild(img0); 
	
	// XP-Hack notwendig um beim kreieren des clues diesen aktiv zu setzen sonst verzieht es das design im XP
	document.getElementById("clue").style.position = "static";
 	document.getElementById("clue").style.visibility = "visible";

}


<!-- ================================================================================================ -->
<!-- Clue Funktionalität																			  -->
<!-- ================================================================================================ -->


