function toggle_login(id1, id2) {
	oLeft = document.getElementById(id1);
	oLeft.style.display = 'block';
	oLeft = document.getElementById(id2);
	oLeft.style.display = 'none';
}

var allHTMLTags = new Array();

function toggle(whichLayer) { 
var elem, vis;

var allHTMLTags=document.getElementsByTagName('*');

for (i=0; i<allHTMLTags.length; i++) {
if (allHTMLTags[i].className=='tab') {
allHTMLTags[i].style.display='none';
}
}

var allHTMLTags=document.getElementsByTagName('*');

for (i=0; i<allHTMLTags.length; i++) {
if (allHTMLTags[i].className=='ontab') {
allHTMLTags[i].style.display='none';
}
}

 obj=(document.all) ? document.all[whichLayer] : document.getElementById(whichLayer); 
      obj.style.display=(obj.style.display=='inline') ? 'none' : 'inline'; 
} 

function verstecke() {
var allElems = document.getElementsByTagName('*');
for (var i = 0; i < allElems.length; i++) {
var thisElem = allElems[i];
if (thisElem.className && thisElem.className == 'antworten') {
thisElem.style.display = 'none';
}
}
}

function toggle2(whichLayer) { 
var elem, vis;
var allHTMLTags=document.getElementsByTagName("*");

for (i=0; i<allHTMLTags.length; i++) {
if (allHTMLTags[i].className=='Tab') {
allHTMLTags[i].style.display='none';
}
}

  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  document.elem.style.display = "inline"; 
} 


function toggle_content_lang(target) { 
   if (target != 'input_content') 
     document.getElementById('input_content').style.display = "none"; 
   if (target != 'input_content_2') 
     document.getElementById('input_content_2').style.display = "none"; 
   if (target != 'input_content_3') 
     document.getElementById('input_content_3').style.display = "none"; 
   if (target != 'input_content_4') 
     document.getElementById('input_content_4').style.display = "none"; 
   if (target != 'input_content_5') 
     document.getElementById('input_content_5').style.display = "none"; 
      obj=(document.all) ? document.all[target] : document.getElementById(target); 
      obj.style.display=(obj.style.display=='inline') ? 'none' : 'inline';  
} 

function toggle_description_lang(target) { 
   if (target != 'input_description') 
     document.getElementById('input_description').style.display = "none"; 
   if (target != 'input_description_2') 
     document.getElementById('input_description_2').style.display = "none"; 
   if (target != 'input_description_3') 
     document.getElementById('input_description_3').style.display = "none"; 
   if (target != 'input_description_4') 
     document.getElementById('input_description_4').style.display = "none"; 
   if (target != 'input_description_5') 
     document.getElementById('input_description_5').style.display = "none"; 
      obj=(document.all) ? document.all[target] : document.getElementById(target); 
      obj.style.display=(obj.style.display=='inline') ? 'none' : 'inline';  
} 

function toggle_title_lang(target) { 
   if (target != 'input_title') 
     document.getElementById('input_title').style.display = "none"; 
   if (target != 'input_title_2') 
     document.getElementById('input_title_2').style.display = "none"; 
   if (target != 'input_title_3') 
     document.getElementById('input_title_3').style.display = "none"; 
   if (target != 'input_title_4') 
     document.getElementById('input_title_4').style.display = "none"; 
   if (target != 'input_title_5') 
     document.getElementById('input_title_5').style.display = "none"; 
      obj=(document.all) ? document.all[target] : document.getElementById(target); 
      obj.style.display=(obj.style.display=='inline') ? 'none' : 'inline';  
}

function CollapseCategories() { 
    for (var i=0; i<CollapseCategories.arguments.length; i++) { 
        var element = document.getElementById(CollapseCategories.arguments[i]); 
        element.style.display = "none"; 
    } 
    var element = document.getElementById('FileSelectorReset'); 
   element.style.display = "block";
}

function ResetCagegories() { 
    for (var i=0; i<ResetCagegories.arguments.length; i++) { 
        var element = document.getElementById(ResetCagegories.arguments[i]); 
        element.style.display = "block"; 
   } 
    var element = document.getElementById('FileSelectorReset'); 
   element.style.display = "none";
}

function popup(popurl){
	winpops=window.open(popurl,"_blank","width=750,height=800, scrollbars=yes, resizable, location=no")
}

function popup_tree(popurl){
	winpops=window.open(popurl,"_blank","width=450,height=600, scrollbars=yes, resizable, location=no")
}

function popup2(popurl){
	winpops=window.open(popurl,"_blank","width=600,height=500, scrollbars=yes, resizable, location=no")
}

function ImagePopup(popurl) {
var myname = 'myname';
var scroll = 'no';
var w = 550;
var h = 550;
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(popurl, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function GeneralPopup(popurl, h, w) {
var myname = 'myname';
var scroll = 'yes';
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(popurl, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
	
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var clientVer = parseInt(navigator.appVersion); // Get browser version

var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav  = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
                && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
                && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));

var is_win   = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac    = (clientPC.indexOf("mac")!=-1);

function StartUp() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function closefresh() { 
	window.opener.location.href = window.opener.location.href;  
	window.close();
}

function stopError() {
  return false;
}

window.onerror = stopError;
window.onload=StartUp;
