<!-- 
var farbe = '#0F5101';
var farbe2 = '#880000';

function farbenwechsler(stelle) { //v2.0
  for(j=1;j<=10;++j)
	{
		if(j<=document.getElementById("dd"+stelle).value)
		{
	    document.getElementById("kasten"+stelle+j).bgColor=farbe;
	  }
		else
		{
		  document.getElementById("kasten"+stelle+j).bgColor=farbe2;
		}
  }
	return true;
}

function farbeninit(anzahl)
{
  for(i=1;i<=anzahl;++i)
	{
	  for(j=1;j<=10;++j)
	  {
		  if(j<=document.getElementById("dd"+i).value)
		  {
	      document.getElementById("kasten"+i+j).bgColor=farbe;
	    }
		  else
		  {
		    document.getElementById("kasten"+i+j).bgColor=farbe2;
		  }
		}
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0 
  window.open(theURL,winName,features); 
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function gewaehlt() {
  for(i=0;i<document.formular.elements.length;i++) {
    if(document.formular.elements[i].checked) 
      return true;
  }
  return false;
}
function senden(art,zielordner){
  if(gewaehlt()) {
    document.formular.aktion.value = art;
    document.formular.zielordner.value = zielordner;
    document.formular.submit();
  } 
  else
    window.alert('Es wurde keine Nachricht ausgewählt.');
}
function senden2(art,zielordner){
    document.formular.aktion.value = art;
    document.formular.zielordner.value = zielordner;
    document.formular.submit();
}
  function CheckLen(Target,maxlength){
    StrLen=Target.value.length;

    if (StrLen==1&&Target.value.substring(0,1)==" "){
      Target.value=""; 
      StrLen=0;
    }
    if (StrLen>maxlength ){
      Target.value=Target.value.substring(0,maxlength);
      CharsLeft=0;
    }
    else{
      CharsLeft=maxlength-StrLen;
    }
    document.formular.anzahltext.value=CharsLeft;
  }
  function checkbrowser(){
	}
  function checkbrowser23(){
    if(navigator.appName.indexOf("Netscape")==-1){
      if((navigator.appVersion.substring(0,3)).indexOf("4.0")==-1 && (navigator.appVersion.substring(0,3)).indexOf("5.0")==-1 && (navigator.appVersion.substring(0,3)).indexOf("6.0")==-1)
	    window.location.href="/aie.html";
    }
    else{
      if((navigator.appVersion.substring(0,3)).indexOf("5.0")==-1)
	    window.location.href="/ans.html"
    }  
  }
  function setcookie(){
    var gespeichert = "nichts gespeichert";
    if(!document.cookie){
      document.cookie = "cookietest=test";
      if(!document.cookie)
        window.location.href="/nocookie.html";
	  else
	    document.cookie = "cookietest=";
    }
  }
  
var postLocation="pgbar.php";
var postLocation2="pgbar2.php";

/* 
 * add any extension that you do no want to upload to the list 
 * below they should be placed with in the /^ and / characters
 * separate each extension by a pipe symbol |
 */
 
var re = /^(\.php)|(\.sh)/;  // disallow shell scripts and php


/**
 * dofilter = false; if you don't want this filtering
 */
var dofilter=true;

/**
 * this method will match each of the filenames with a
 * given list of banned extension. If any one of the
 * extensions match, an alert will be popped up and the
 * upload will not continue;
 */
 
function check_types() {
	with(document.forms[0])
	{
		/*
		 * with who uses with?
		 * i do, i am an ancient. ok?
		 */
		
		for(i=0 ; i < elements.length ; i++)
		{
			if(elements[i].value.match(re))
			{
				alert('Sorry ' + elements[i].value + ' is not allowed');
				return false;
			}
		}
	}
	return true;
}

function popUP(mypage, myname, w, h, scroll, titlebar)
{

	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(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

function postIt()
{

	if(check_types() == false)
	{
		return false;
	}
	baseUrl = postLocation;
	sid = document.forms[0].sessionid.value;
	iTotal = escape("-1");
	baseUrl += "?iTotal=" + iTotal;
	baseUrl += "&iRead=0";
	baseUrl += "&iStatus=1";
	baseUrl += "&sessionid=" + sid;
	popUP(baseUrl,"Uploader",460,150,false,false);
	document.forms[0].submit();
}
function postIt2()
{

	if(check_types() == false)
	{
		return false;
	}
	baseUrl = postLocation2;
	sid = document.forms[0].sessionid.value;
	iTotal = escape("-1");
	baseUrl += "?iTotal=" + iTotal;
	baseUrl += "&iRead=0";
	baseUrl += "&iStatus=1";
	baseUrl += "&sessionid=" + sid;
	popUP(baseUrl,"Uploader",460,150,false,false);
	document.forms[0].submit();
}
function setjs() {
 if(navigator.product == 'Gecko') {
   document.loginform["interface"].value = 'mozilla';
 }else if(window.opera && document.childNodes) {
   document.loginform["interface"].value = 'opera7';
 }else if(navigator.appName == 'Microsoft Internet Explorer' &&
    navigator.userAgent.indexOf("Mac_PowerPC") > 0) {
    document.loginform["interface"].value = 'konqueror';
 }else if(navigator.appName == 'Microsoft Internet Explorer' &&
 document.getElementById && document.getElementById('ietest').innerHTML) {
   document.loginform["interface"].value = 'ie';
 }else if(navigator.appName == 'Konqueror') {
    document.loginform["interface"].value = 'konqueror';
 }else if(window.opera) {
   document.loginform["interface"].value = 'opera';
 }
}
function nickvalid() {
   var nick = document.loginform.Nickname.value;
   if(nick.match(/^[A-Za-z0-9\[\]\{\}^\\\|\_\-`]{1,32}$/))
      return true;
   alert('Please enter a valid nickname');
   document.loginform.Nickname.value = nick.replace(/[^A-Za-z0-9\[\]\{\}^\\\|\_\-`]/g, '');
   return false;
}  
  function CheckLen(Target){
    var maxlength = "160";  //die maximale Zeichenlänge
    StrLen=Target.value.length;

    if (StrLen==1&&Target.value.substring(0,1)==" "){
      Target.value=""; 
      StrLen=0;
    }
    if (StrLen>maxlength ){
      Target.value=Target.value.substring(0,maxlength);
      CharsLeft=0;
    }
    else{
      CharsLeft=maxlength-StrLen;
    }
    document.formular.anzahltext.value=CharsLeft;
  }
//-->
