function OAS_RICH(pos) {
}

var BrowserName     = navigator.appName;
var BrowserVersion = navigator.appVersion;
var VersionShort   = BrowserVersion.substr(0, 1);
function WinOpen(seite)
   {
seite = seite+"/"+session_sid+"?forward=";

var high =690;
var wide =980;


if(VersionShort  >3){
   if(BrowserName == "Netscape")
   {

   wavewin=window.open(seite,"_blank","fullscreen=no,scrollbars=no,toolbar=no,resizable=0,resizable=no,menubar=no,location=no,status=no,hotkeys=no,height=" + high  + ",width=" + wide);
   wavewin.focus();
  //window.moveTo(0, 0);
   }
 }

if(BrowserName == "Microsoft Internet Explorer")
     {
wavewin=open(seite,"","fullscreen=no,scrollbars=no,resizable=yes,toolbar=no,menubar=no,location=no,status=no,hotkeys=no,height=" + high + " ,width=" +  wide);
      if(wavewin != null && typeof(wavewin.moveTo) =="function")
      {
      wavewin.moveTo(0,0);
      //wavewin.focus();
      }
    }
  //return false;
 //-->

 }
// This funktion is used from a link which is configured with the 'send' handler
function openlinkWindow(winLocation,high,wide,target,send_url)
{
    //send_url = encodeURIComponent(send_url);
    wavewin=window.open(winLocation+send_url,target,"fullscreen=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,status=no,hotkeys=no,height=" + high + " ,width=" +  wide);
  wavewin.focus();
  //return false;
}


function reload_opener()
{
    if(typeof(window.opener) == "undefined"
        )
      return;
   opener.location.reload();
   window.close();
}
// From check not localized do not call this function directly
// use FO_validateForm
<!--
function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm(arg1,arg2,arg3,arg4, success) { //v4.1: new optional success parameter
// NEW: only if last parameter is present, then ERROR STRING or 'success' value is obtained
// - else true or false!

  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=arg4; if ((val=val.value)!="") {
      p=0;if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' muss eine Email-Adresse beinhalten.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' muss eine Zahl zwischen '+min+' und '+max+' enthalten.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' wird benötigt.\n'; }
  }
document.MM_returnValue = (errors == '');
if (errors != '') { if (success==null)  { alert('Beheben Sie folgende(n) Fehler:\n'+errors); return false;
          } else return errors; // String!
      } else {
       if (success==null) return true;
          else return success;
      }
}

function FO_validateForm(attribs) { //v1.1
  var err='';
   var attribs_array = attribs.split("|");
  for(i=0;i<attribs_array.length;i++){
    var attribs_expression = attribs_array[i].split(",");
    attrib_value = attribs_expression[1];
    attrib_expression =  attribs_expression[2];
    attrib_name      =  attribs_expression[0];
    //alert(attrib_name+" "+attrib_expression," ",attrib_value);

  // NEW: last parameter is present, so '' or ERROR STRING is obtained:
  err = err + MM_validateForm(attrib_name,'',attrib_expression,attrib_value, '');
  } // for

  if (err == '') {
       return true;

       }
  else   { alert('Beheben Sie folgende(n) Fehler:\n'+err);
       return false;
     }
}

/*
Diese Funktion zählt den Wert inCount rückwärts bis 0 und vergleicht
diesen mit der Länge des Feldes inFormObject (Übergabe: this.form.<attrib_name>).
Soll der Aktuelle Count in einem Textfield zurückgegeben werden, so
muss das Object reachedObject (Übergabe: this.form.<inputfieldname>) auch noch übergeben werden.
Soll am Ende des Countdowns ein Warnausgabe Javascript erfolgen, so ist
der Warntext inAlert zu übergeben
*/
function counterField(reachedObject,inFormObject,inCount,inAlert)
 {
  if (typeof(reachedObject) != "undefined" && reachedObject !="")
     reachedObject.value = inCount -inFormObject.value.length;

  if (inFormObject.value.length >  inCount ) {
      inFormObject.value = inFormObject.value.substr(0, inCount);
    if (typeof(reachedObject) != "undefined" && reachedObject !="")
      reachedObject.value = 0;
    if (typeof(inAlert) != "undefined" && inAlert != "")
        alert(inAlert);
     }
 }

//-->

function owin(datei,name,width,height) {
  var sw = screen.width;
  var sh = screen.height;
  if (width>sw-50) { width = sw-50; }
  if (height>sh-100) { height = sh-100; }
  var w = window.open(datei,name,'width='+width+',height='+height+',scrollbars=yes,directories=no,'+
                      'resizable=yes,toolbar=no,location=no,status=no,menubar=no');
  if(w) { w.focus(); }
  return(w);
}
