browser = (((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion) >= 4 )) || ((navigator.appName ==
"Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
 || ((navigator.appName =="Opera") && (parseInt(navigator.appVersion) >= 4
)))

function notThisForm(Text) 
{
	window.alert(Text);
}

function MMopenBrWindow(theURL,winName,features) 
{
	window.open(theURL,winName,features);
}

function MM_openBrWindow(theURL,winName,features) 
{
	window.open(theURL,winName,features);
}

function Mark_Checkboxes1() 
{
    for (i=0; i < document.Maillist.mailfrom.length; i++)
                  document.Maillist.mailfrom[i].checked=true;
}

function Mark_Checkboxes2() 
{
    for (i=0; i < document.Maillist.mailto.length; i++)
                  document.Maillist.mailto[i].checked=true;
}

function openAWindow( pageToLoad, winName, width, height, center) {
if (browser) 
{
     xposition=0; yposition=0;
    if ((parseInt(navigator.appVersion) >= 3 ) && (center)){
        xposition = 10;
        yposition = 10;    }
    args = "width=" + width + ","     + "height=" + height + "," 
    + "location=0,"     + "menubar=0,"    + "resizable=0,"    + "scrollbars=yes,"
    + "status=0,"     + "titlebar=0,"    + "toolbar=0,"    + "hotkeys=0,"
    + "screenx=" + xposition + ","  //NN Only
    + "screeny=" + yposition + ","  //NN Only
    + "left=" + xposition + ","     //IE Only
    + "top=" + yposition;           //IE Only
    window.open( pageToLoad,winName,args );}
}

function Go(x)
{
 if(x == "nothing")
 {
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
   parent.window.focus();
   return;
 }
 else
  {
   parent.window.location.href = x;
   document.forms[0].reset();
   document.forms[0].elements[0].blur();
   parent.window.focus();
  }
}

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_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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='Bitte eine gültige e-Mail-Adresse angeben.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+=nm+' muß eine Zahl sein.\n';
      	if (test=='isVorname') {
      		if (val.length<2) errors+='Bitte gebe Deinen Vornamen an.\n';
      	}
      	if (test=='isNachname') {
        	if (val.length<2) errors+='Bitte gebe Deinen Nachnamen an.\n';
      	} 
      	if (test=='isBLZ') {
        	if (val.length<8) errors+='Bitte gebe Deine 8 stellige Bankleitzahl an.\n';
        }
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=parseInt(test.substring(7,p)); max=parseInt(test.substring(p+1));
          if (val<min || max<val) errors+='Die Postleitzahl muß 5 stellig sein.\n';
    } } } else if (test.charAt(0) == 'R') errors += nm+' ist erforderlich.\n'; }
  } if (errors) alert('Folgender Fehler ist aufgetreten:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function confirmLink(theLink, theSqlQuery)
{
    var confirmMsg  = 'Bitte beachten:';
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + '\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '&is_js_confirmed=1';
    }

    return is_confirmed;
} // end of the 'confirmLink()' function

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		button_logout_li_over = newImage("../pic/button_logout-over.gif");
		button_login_li_over = newImage("../pic/button_login-over.gif");
		button_logoutblue_li_over = newImage("../pic/button_logoutblue-over.gif");
		button_premium_li_over = newImage("../pic/button_premium-over.gif");
		preloadFlag = true;
	}
} 