
//=======================================================
     //detect browser settings for showing and hiding DIVs
     isNS4 = (document.layers) ? true : false;
     isIE4 = (document.all && !document.getElementById) ? true : false;
     isIE5 = (document.all && document.getElementById) ? true : false;
     isNS6 = (!document.all && document.getElementById) ? true : false;
//=======================================================

	function switchDiv(strDivName,bolVisible){
	 //identify the element based on browser type
	 if (isNS4) {
	   objElement = document.layers[strDivName];
	 } else if (isIE4) {
	   objElement = document.all[strDivName].style;
	 } else if (isIE5 || isNS6) {
	   objElement = document.getElementById(strDivName).style;
	 }
	 
	 if(isNS4){
		 
		 if(objElement.visibility == "visible") {
		   objElement.visibility ="hidden"
		 } else {
		   objElement.visibility ="visible"
		 }     
	 }else if(isIE4){
		 if(objElement.visibility == "visible") {
		   objElement.visibility = "hidden";
		 } else {
		   objElement.visibility = "visible";
		 }
	 } else if (isIE5 || isNS6) {
		  if(objElement.display == ""){
			 objElement.display = "none";
		  } else {
			objElement.display = "";
			}
	 }
	}

	function launch(newURL, newName, newFeatures, orgName){
		var remote = open(newURL, newName, newFeatures);
		if (remote.opener == null)
		remote.opener = window;
		remote.opener.name = orgName;
		return remote;
	}		
	function reloadclose(){
		opener.location.reload();
		self.close();
	}		
	function schliessen(nn){ 
		window.setTimeout("window.reloadclose()",(nn*1000) );
	}		
	function popup(url, name, width, height){
		mywinpos = findscreencenter(width,height);
		settings=
		"toolbar=no,location=no,directories=no,"+
		"status=no,menubar=no,scrollbars=yes,"+
		"resizable=yes,width="+width+",height="+height+",top="+mywinpos[0]+",left="+mywinpos[1];
		orgname="mymain";
		
		MyNewWindow=launch(url,name,settings,orgname);
	}		
	function findscreencenter( pwinwidth, pwinheight ){
		winpos = new Array(2);
		scrheight = screen.height;
		scrwidth = screen.width;
		wintop = (scrheight - pwinheight-100) / 2;
		winleft = (scrwidth - pwinwidth) / 2;
		winpos[0] = wintop;
		winpos[1] = winleft;
		return winpos;
	}
