/* scripts-opax.js                                                            */
/*                                                                ANSI-Format */
/* created: dj 19112009                                                       */
/*                appName   appVersion  userAgent    CodeName                 */
/* Firebird061 =  Netscape  5.0         Firebird061  Mozilla                  */
/* Mozilla14   =  Netscape  5.0         ./.          Mozilla                  */ 
/* Netscape701 =  Netscape  5.0         Netscape701  Mozilla                  */
/* Netscape621 =  Netscape  5.0         Netscape621  Mozilla                  */
/* Netscape47  =  Netscape  4.7         Mozilla47    Mozilla                  */
/* Netscape451 =  Netscape  4.51        Mozilla451   Mozilla                  */
/* Opera703    =  Opera     7.03        Opera703     Mozilla                  */
/* MSIE60      =  Micro...  4.0         MSIE60       Mozilla                  */   
/* */
/* ****************************************************************************/
<!-- vor alten Browsern verstecken
/* for all */

var browC       = "" + "brow.C";
var queryC      = "" + "query.C";
var delreservC  = "" + "delreserv.C"; 
var downloadC   = "" + "download.C";
var ftbasketC   = "" + "ftbasket.C";
var ftitleC     = "" + "ftitle.C";
var loginC      = "" + "login.C";
var nacqtopC    = "" + "nacqtop.C";
var pasemyC     = "" + "pasemy.C";
var renewmediaC = "" + "renewmedia.C";
var reservC     = "" + "reserv.C";
var setreservC  = "" + "setreserv.C";
var statsC      = "" + "stats.C";
var suggestC    = "" + "suggest.C";
var userC       = "" + "user.C";
var writetxtC   = "" + "writetxt.C";
var bofgMax = 40;                             /* max. Anz. Titel in Warenkorb */
var levelC  = "";
var levelH  = "";
levelY = document.getElementsByTagName("meta")[2].content;
if (levelY=="index" || levelY=="brow" || levelY=="login" ||
    levelY=="qsim"  || levelY=="qsel" || levelY=="qext"  ||
    levelY=="suggestion") { levelC = "../"; levelH = "./"; } 

ns = (navigator.appName == "Netscape");
var uAgent = navigator.userAgent;
var aName  = navigator.appName;
var aVers  = parseFloat(navigator.appVersion);
var uAl    = uAgent.length;
var rVers  = /([0-9]..)/;
var client = "xx";
if (uAgent.indexOf("Firebird") >= 0) 
   client = "fb" + uAgent.substr(uAgent.indexOf("Firebird"),uAl);
if (uAgent.indexOf("MSIE")     >= 0) 
   client = "ms" + uAgent.substr(uAgent.indexOf("MSIE"),uAl);
if (uAgent.indexOf("Netscape") >= 0) 
   client = "ns" + uAgent.substr(uAgent.indexOf("Netscape"),uAl);
if (uAgent.indexOf("Opera")    >= 0) 
   client = "op" + uAgent.substr(uAgent.indexOf("Opera"),uAl);
vs = rVers.exec(client);
vs = (RegExp.$1);
if (client.slice(0,2) == "fb") client = "ns";
if (client.slice(0,2) == "ms") client = "ms";
if (client.slice(0,2) == "ns") client = "ns";
if (client.slice(0,2) == "op") client = "op";
if (ns && aVers == "4.7")      client = "ns4";
if (ns && aVers == "4.51")     client = "ns4";
if (client == "xx")            client = "ns";

window.onerror=null;
var newWin0=null;  /* nur opera       */  
var newWin1=null;  /* login           */  
var newWin2=null;  /* all help        */  
var newWin3=null;  /* account, ftitle */ 
var newWin5=null;  /* Warenkorb  ???? */

setWait = "scrollbars=no, resizable=no, height=150, width=300, top=300,left=400";
setWait = "scrollbars=no, resizable=yes,height=200, width=300, top=300,left=400";
set800  = "scrollbars=yes,resizable=yes,height=400, width=380, top=130,left=400";
set1024 = "scrollbars=yes,resizable=yes,height=550, width=420, top=140,left=590";
set1024 = "scrollbars=yes,resizable=yes,height=575, width=510, top=140,left=510";
set1280 = "scrollbars=yes,resizable=yes,height=805, width=560, top=165,left=705";
ful800  = "scrollbars=yes,resizable=yes,height=595, width=695, top=1,  left=100,status=no";
ful1024 = "scrollbars=yes,resizable=yes,height=715, width=990, top=1,  left=30, status=yes";
ful1280 = "scrollbars=yes,resizable=yes,height=970, width=1190,top=1,  left=80, status=no";
setWinOp = set800;
setLogOp = ful800;
if (screen.width >= 1024) setWinOp = set1024;
if (screen.width >= 1280) setWinOp = set1280;
if (screen.width >= 1024) setLogOp = ful1024;
if (screen.width >= 1280) setLogOp = ful1280;

var GHOST="";
/*
if   (window.location.port != "") var GHOST="//" + window.location.hostname + ":" + window.location.port;
else var GHOST="//" + window.location.hostname;
IA = IA.replace(/\(/,"");    IA = IA.replace(/\)/,"");  */
/* fin */

/* **************************************************************** LeftFrame */
function frmLeft(LANG,WYW1,IA)                                        /* opax */
{
 xCookie = unescape(document.cookie);
 xName   = 'opaCook="';
 xStart  = xCookie.indexOf(xName);
 xEnd    = xCookie.indexOf("B13B", xStart);
 if (client == "ms" || client == "ns" || client == "ns4") {
    if (levelH != "./") levelH = "./" + LANG + "/" ;
    if (WYW1 == "index") window.location.replace(levelH + "index.html.S");
    if (WYW1 == "qsim")  window.location.replace(levelH + "qsim.html.S");
    if (WYW1 == "qsel")  window.location.replace(levelH + "qsel.html.S");
    if (WYW1 == "qext")  window.location.replace(levelH + "qext.html.S");
    if (WYW1 == "brow")  window.location.replace(levelH + "brow.html.S");
    if (WYW1 == "bofg") {
       if (xEnd <= 10) noToDo(10009); 
       else {
          if (IA == "1" || IA == "2" || IA == "3") {
             window.location.replace("ftitle.html.S");
             TASK = levelC + ftbasketC + "?LANG=" + LANG + "&FUNC=" + IA;
             window.location.href=TASK;
          }
          if (IA == "4") {
             if (newWin5 && !newWin5.closed) newWin5.close();
             newWin5=window.open("amessage.S","newWin5", setWait); 
             TASK = levelC + writetxtC + "?lang=" + LANG + "&txtnr1=10004";
             newWin5.location.href=TASK;
          }
       }
    }
    if (WYW1 == "sugg") {
       file = "/opax/" + LANG + "/suggestion.html.S";
       window.location.replace(file);
    }
    if (WYW1 == "down") {
       window.location.replace("download.html.S");
       TASK = levelC + downloadC + "?FUNC=1" + "&LANG=" + LANG;
       window.location.href=TASK;
    }
    if (WYW1 == "top20") {
       window.location.replace("nactop.html.S");
       TASK =  levelC + nacqtopC + "?LANG=" + LANG  + "&FUNC=top20";
       window.location.href=TASK;
    }
    if (WYW1 == "nacq") {
       window.location.replace("nactop.html.S");
       TASK = levelC + nacqtopC + "?LANG=" + LANG  + "&FUNC=nacq";
       window.location.href=TASK;
    }
    if (WYW1 == "login") {
       if (newWin1 && !newWin1.closed) newWin1.close();
       file = "/opax/" + LANG + "/login.html.S";
       newWin1=window.open(file, "newWin1", setLogOp);
    }
    if (WYW1 == "imain") {
       ben = document.forms[0].BENUTZER.value;
       pas = document.forms[0].PASSWORD.value;  
       TASK = loginC + "?BENUTZER=" + ben + "&PASSWORD=" + pas 
            + "&FUNC=logged"  + "&DUM1=";
       window.location.href=TASK;  
    }
    if (WYW1 == "isrx") {
       if (newWin1 && !newWin1.closed) newWin1.close();
       file   = "/isrx/de/login.html.S";
       newWin1=window.open(file, "newWin1", setLogOp);
    }
 }

 if (client == "op") {
    if (levelH != "./") levelH = "./" + LANG + "/" ;
    if (WYW1 == "index") newWin0 = window.open(levelH + "index.html.S", "newWin0");
    if (WYW1 == "qsim")  newWin0 = window.open(levelH + "qsim.html.S", "newWin0");
    if (WYW1 == "qsel")  newWin0 = window.open(levelH + "qsel.html.S", "newWin0");
    if (WYW1 == "qext")  newWin0 = window.open(levelH + "qext.html.S", "newWin0");
    if (WYW1 == "brow")  newWin0 = window.open(levelH + "brow.html.S", "newWin0");
    if (WYW1 == "bofg") {
       if (xEnd <= 10) noToDo(10009); 
       else {
          if (IA == "1" || IA == "2" || IA == "3") {
             newWin0 = window.open("ftitle.html.S", "newWin0");
             TASK = levelC + ftbasketC + "?LANG=" + LANG + "&FUNC=" + IA;
             window.location.href=TASK;
          }
          if (IA == "4") {
             if (newWin5 && !newWin5.closed) newWin5.close();
             newWin5=window.open("amessage.S","newWin5", setWait); 
             TASK = levelC + writetxtC + "?lang=" + LANG + "&txtnr1=10004";
             newWin5.location.href=TASK;
          }
       }
    }
    if (WYW1 == "sugg") {
       newWin0 = window.open("suggestion.html.S", "newWin0");
    }
    if (WYW1 == "down") {
       newWin0 = window.open("download.html.S", "newWin0");
       TASK = levelC + downloadC + "?FUNC=1" + "&LANG=" + LANG;
       window.location.href=TASK; 
    }
    if (WYW1 == "top20") {
       newWin0 = window.open("nactop.html.S", "newWin0");
       TASK = levelC + nacqtopC + "?LANG=" + LANG  + "&FUNC=top20";
       window.location.href=TASK;
    }
    if (WYW1 == "nacq") {
       newWin0 = window.open("nactop.html.S", "newWin0");
       TASK = levelC + nacqtopC + "?LANG=" + LANG + "&FUNC=nacq";
       window.location.href=TASK; 
    }
    if (WYW1 == "login") {
       if (newWin1 && !newWin1.closed) newWin1.close();
       file = "/opax/" + LANG + "/login.html.S";
       newWin1=window.open(file, "newWin1", setLogOp);
    }
    if (WYW1 == "imain") {
       ben = document.forms[0].BENUTZER.value;
       pas = document.forms[0].PASSWORD.value;  
       TASK = loginC + "?BENUTZER=" + ben + "&PASSWORD=" + pas 
            + "&FUNC=logged"  + "&DUM1=";
       window.location.href=TASK;  
    }
    if (WYW1 == "isrx") {
       if (newWin1 && !newWin1.closed) newWin1.close();
       file = "/isrx/" + LANG + "/login.html.S";
       newWin1=window.open(file, "newWin1", setLogOp);
    }
 }
}
/* ************************************************************ end LeftFrame */

/* ***************************************************************** TopFrame */
/* */
function stFrm2() { window.stop(); }
function bwFrm2() 
{
 FORM0 = document.forms[0].name;
 LANG  = document.forms[0].LANG.value;
 if (FORM0 != "setreserv") window.history.back(); 
 else {
    window.history.go(-history.length);
    window.location.target="_top";
    window.location.replace(LANG + "/index.html.S");  
/*  window.location.replace(LANG + "/ftitle.html.S");  
    TASK = ftbasketC + "?LANG=" + LANG + "&FUNC=2";
    window.location.href=TASK;                               */
 }
} 
function fwFrm2() { window.history.forward(); }  
/* */
function prFrm2(LANG) 
{ 
 var datum = new Date();
 x1 = "<A";
 x2 = "<X";
 for (i=0; i < document.all.length; i++ ) {
     if (document.all[i].id == "Mbox")  print_area = "Mbox";
     if (document.all[i].id == "Mbox1") print_area = "Mbox1";  
 }
 txt0 = document.getElementById(print_area).innerHTML;
 while(txt0.search(/<A.+/) > -1){txt0 = txt0.replace(x1,x2)}
 if (LANG == "de") {
    txt1 = '<html><head><title>Druckvorschau</title>';
    txt2 = '  <td class="td8" align="left"><h2 class="h21">Druckvorschau</h2></td>'
         + '  <td class="td8" align="right">' + datum.toLocaleString() + '</td>';
    txt3 = '  <td align="left"><input id="PRINT" type="button" value="Drucken" ';
    txt4 = '  <td align="right"><input id="CLOSE" type="button" value="Schliessen"';
 }
 if (LANG == "da" || LANG == "fr" || LANG == "en" || LANG == "cz" || LANG == "nl") {
    txt1 = '<html><head><title>Print Preview</title>';
    txt2 = '  <td class="td8" align="left"><h2 class="h21">Print Preview</h2></td>'
         + '  <td class="td8" align="right">' + datum.toLocaleString() + '</td>';
    txt3 = '  <td align="left"><input id="PRINT" type="button" value="Print" ';
    txt4 = '  <td align="right"><input id="CLOSE" type="button" value="Close"';
 }
 var pp = window.open("about:blank", "_blank", setLogOp);
 pp.document.writeln(txt1);
 pp.document.writeln('<link rel="stylesheet" href="/opax/OPAX.css.S" type="text/css">'); 
 pp.document.writeln('<script language="JavaScript" type="text/javascript">');
 pp.document.writeln('function addMtyp(IA) {}');
 pp.document.writeln('function dspBsk(IA,IB) {}');
 pp.document.writeln('function dspBrd(IA,IB) {}');
 pp.document.writeln('</script>');
 pp.document.writeln('</head>');
 pp.document.writeln('<body>');
 pp.document.writeln('<table class="tab3" width="100%" border="0">');
 pp.document.writeln(' <tr>');
 pp.document.writeln(txt2);
 pp.document.writeln(' </tr>');
 pp.document.writeln('</table>');
 pp.document.writeln('<table width="100%" border="0">');
 pp.document.writeln(' <tr>');
 pp.document.writeln(txt3);
 pp.document.writeln('    onclick="javascript:location.reload(true);window.print();"></td>');
 pp.document.writeln(txt4);
 pp.document.writeln('    onclick="window.close();"></td>');
 pp.document.writeln(' </tr>');
 pp.document.writeln('</table>');
 pp.document.writeln('<hr>');
 pp.document.writeln(txt0);
 pp.document.writeln('</body></html>');     
}
/* */
function rsFrm2()                                 
{
 formlen = document.forms.length; 
 if   (formlen <= 0) noToDo(10013); 
 else { 
    FORM0 = document.forms[0].name;
    for(var i = 0; i < formlen; i++) { document.forms[i].reset(); } 
    if (FORM0 == "qsim") document.qsim.BI.focus();  
    if (FORM0 == "qsel") document.qsel.FLD1.focus(); 
    if (FORM0 == "brow") document.brow.FLD.focus();
 }
}
/* */
function slAll2()                                 
{
 formlen = document.forms.length; 
 if   (formlen <= 0) noToDo(10013); 
 else {
    FORM0 = document.forms[0].name;
    if (FORM0 == "shortl" || FORM0 == "medkl" || FORM0 == "vorml" || 
       FORM0  == "full"   || FORM0 == "bofgl" || FORM0 == "reserv") {
       ellen = document.forms[0].elements.length;
       for(var i = 2; i < ellen; i++) { document.forms[0].elements[i].checked = 1; }
    }
    else noToDo(10013); 
 }
}
/* */
function rsMark2()                               
{
 formlen = document.forms.length; 
 if   (formlen <= 0) noToDo(10013); 
 else {
    FORM0 = document.forms[0].name;
    if (FORM0 == "shortl" || FORM0 == "medkl" || FORM0 == "vorml" || 
       FORM0  == "full"   || FORM0 == "bofgl" || FORM0 == "reserv") { 
       document.forms[0].reset(); 
    }
    else noToDo(10013); 
 }
}
/* ************************************************************* end TopFrame */

/* **************************************************************** MainFrame */
function addMtyp(IA)
{
 done = 0;
 ellen = document.forms[0].MT.length;
 if (IA == "0") {
    for(var i = 1; i < ellen; i++) { document.forms[0].MT[i].checked = 0; }
    document.forms[0].MT[0].checked = 1;
 }
 if (IA != "0") {
    for(var i = 1; i < ellen; i++) {
       if (document.forms[0].MT[i].value == IA) {
          if (document.forms[0].MT[i].checked == true) {
              document.forms[0].MT[i].checked = 1;
              document.forms[0].MT[0].checked = 0;
          }
       }
    }
    for(var i = 1; i < ellen; i++) { if (document.forms[0].MT[i].checked == true) done = 1; }
    if (done == 0) document.forms[0].MT[0].checked = 1;  
 }
}

  /* ************************************************************************ */
function smFrm2(LANG,FUNC)                                            
{
 formlen = document.forms.length; 
 if   (formlen <= 0) noToDo(10013); 
 else {
    FORM0 = document.forms[0].name;

    /* ********************************************************************** */
    if (FORM0 == "sugg") {
       if ((document.forms[0].NAME.value != "") &&
          (document.forms[0].EMAI.value != "")) {
          TASK = levelC + suggestC;
          document.forms[0].action=TASK;
          document.forms[0].submit();
       }
       else noToDo(10013); 
    }

    /* ********************************************************************** */
    if (FORM0 == "stat") {
       if (document.forms[0].elements[1].checked || document.forms[0].elements[2].checked) {
          TASK = statsC;
          document.forms[0].action=TASK;
          document.forms[0].submit();
       }
       else noToDo(10013); 
    }
    /* ********************************************************************** */
    if (FORM0 == "stto"  || FORM0 == "sttu") {
       i = 0; 
       done = 0;
       ellen = document.forms[0].elements.length;
       for (var i = 0; i < ellen; i++) { if (document.forms[0].elements[i].checked) done=1; }
       if   (done == 0) noToDo(10013); 
       else {
          TASK = statsC;
          document.forms[0].action=TASK;
          document.forms[0].submit();
       }
    }
    /* ********************************************************************** */
    if (FORM0 == "post") document.forms[0].submit();
    /* ********************************************************************** */
    if (FORM0 == "union") {
       ellen = document.forms[0].elements.length;
       i=0;
       for (var i = 0; i < ellen; i++) {
           if (document.forms[0].elements[i].checked &&
              document.forms[0].elements[i].name == "GHOST") {
              if (document.forms[0].elements[i].value == "10") TASK = "../query.S";
              if (document.forms[0].elements[i].value == "20") TASK = "/dz/opac/query.S";
              if (document.forms[0].elements[i].value == "30") TASK = "/gibz/opac/query.S";
              if (document.forms[0].elements[i].value == "40") TASK = "/star/opac/query.S";
              document.forms[0].action=TASK;
              document.forms[0].submit();
           }
       }
    }
    /* ********************************************************************** */
    /* ********************************************************************** */
    if (FORM0 == "brow") {
       TASK = levelC + browC;
       document.forms[0].action=TASK; 
       document.forms[0].submit();
    }
    /* ********************************************************************** */
    if (FORM0 == "qsim" || FORM0 == "qsel" || FORM0 == "qext" || FORM0 == "browl") {
       i = 1;
       done = 0;
       ellen = document.forms[0].elements.length;
       for (var i = 1; i < ellen; i++) {
           if (document.forms[0].elements[i].checked &&
              document.forms[0].elements[i].name == "COMP") done = 1;
           if (document.forms[0].elements[i].value != "") {
              if (document.forms[0].elements[i].name == "BI") done = 1;
              if (document.forms[0].elements[i].name == "AW") done = 1;
              if (document.forms[0].elements[i].name == "TW") done = 1;
              if (document.forms[0].elements[i].name == "DW") done = 1;
              if (document.forms[0].elements[i].name == "SG") done = 1;
              if (document.forms[0].elements[i].name == "IS") done = 1;
              if (document.forms[0].elements[i].name == "PU") done = 1;
              if (document.forms[0].elements[i].name == "PP") done = 1;
              if (document.forms[0].elements[i].name == "PY") done = 1;
              if (document.forms[0].elements[i].name == "LA") done = 1;
              if (document.forms[0].elements[i].name == "TA") done = 1;
              if (document.forms[0].elements[i].name == "FLD1") done = 1;
              if (document.forms[0].elements[i].name == "FLD2") done = 1;
              if (document.forms[0].elements[i].name == "FLD3") done = 1;
              if (document.forms[0].elements[i].name == "FLD4") done = 1;
              if (document.forms[0].elements[i].name == "FLD5") done = 1;
              if (document.forms[0].elements[i].name == "FLD6") done = 1;
              if (document.forms[0].elements[i].name == "FLD7") done = 1;
              if (document.forms[0].elements[i].name == "FLD8") done = 1;
              if (document.forms[0].elements[i].name == "FLD9") done = 1;
              if (document.forms[0].elements[i].name == "TAREA") done =1;
           }
       }
       if   (done == 0) noToDo(10013); 
       else {
          TASK = levelC + queryC;
          document.forms[0].action=TASK; 
          if (FUNC == "top") document.forms[0].submit(); 
       }
    }
    /* ********************************************************************** */
    if (FORM0 == "shortl") {
       i = 1;
       done = 0;
       noF300 = 0;
       ellen = document.forms[0].elements.length;
       for (var i = 1; i < ellen; i++) { 
           if (document.forms[0].elements[i].checked) done=1; 
           if (document.forms[0].elements[i].name == "F300") noF300 = 1;
       }
       if   (done == 0) noToDo(10013); 
       else {
          if (document.check.CHECK.value == "1") {
             document.check.CHECK.value = "0"; 
             if (noF300 == 0) {
                TASK = ftitleC;
                document.forms[0].action=TASK; 
                document.forms[0].submit(); 
             }
             else {
                if (document.shortl.F300.value <= 400) {
                   TASK = ftitleC;
                   document.forms[0].action=TASK; 
                   document.forms[0].submit(); 
                }
             } 
          } 
          else noToDo(10014); 
       }
    }
    /* ********************************************************************** */
    if (FORM0 == "full") {
       i = 1;
       done = 0;
       ellen = document.forms[0].elements.length;
       for (var i = 1; i < ellen; i++) {
           if (document.forms[0].elements[i].checked) {
              FUNC = document.forms[0].elements[i].value.slice(0,4);
              IA   = document.forms[0].elements[i].value;
              IB   = document.forms[0].elements[i].value.slice(5);
              if (FUNC == "cooK") {
                 done=1;
                 addToCook('opaCook',IB,0,'/opax/');
/*               document.forms[0].reset();                         */
                 if (opaAnz.length > bofgMax) { return; }
                 if (document.getElementById) document.getElementById(IB).style.display = "none";
                 if (document.getElementById) document.getElementById(IA).style.display = "inline";
              }
              if (FUNC == "resF") {
                 done=1;
                 TASK = reservC;
                 document.forms[0].action=TASK; 
                 document.forms[0].submit();
              }
              if (FUNC == "post") {
                 done=1;
                 TASK = "/opax/post.C?LANG=" + document.forms[0].LANG.value + "&" + IA + "=YES";
                 document.forms[0].submit();
              }
           }
       }
       if (done == 0) noToDo(10013);    
    }
    /* ********************************************************************** */
    if (FORM0 == "bofgl") {
       i = 1;
       done = 0;
       ellen = document.forms[0].elements.length;
       for (var i = 1; i < ellen; i++) {
           if (document.forms[0].elements[i].checked) {
              FUNC = document.forms[0].elements[i].value.slice(0,4);
              IA   = document.forms[0].elements[i].value;
              IB   = document.forms[0].elements[i].value.slice(5);
              if (FUNC == "cooK") {
                 done=1;
                 delFrCook('opaCook',IB,0,'/opax/');
                 TASK = ftbasketC + "?LANG=" + document.forms[0].LANG.value + "&FUNC=1";
                 window.location.href=TASK;  
              }
              if (FUNC == "resF") {
                 done=1;
                 TASK = reservC;
                 document.forms[0].action=TASK; 
                 document.forms[0].submit();                
              }
           }
       }
       if (done == 0) noToDo(10013);  
    }
    /* ********************************************************************** */
    if (FORM0 == "reserv") {
       i=0;
       done = 0;
       ellen = document.forms[0].elements.length;
       if ((document.forms[0].BENUTZER.value != "") &&
          (document.forms[0].PASSWORD.value != "")) done = 1;
       for (var i = 0; i < ellen; i++) {
           if (document.forms[0].elements[i].checked) done = done + 1;
       }
       if (done <= 1) noToDo(10013); 
       else {
          TASK = setreservC;
          document.forms[0].action=TASK; 
          document.forms[0].submit();
       }
    }
    /* ********************************************************************** */
    if (FORM0 == "login") {
       if ((document.forms[0].BENUTZER.value != "") &&
          (document.forms[0].PASSWORD.value != "")) {
          TASK = levelC + loginC;
          document.forms[0].action=TASK;
          document.forms[0].submit();
       }
       else noToDo(10013); 
    }
    /* ********************************************************************** */
    if (FORM0 == "user") {
       i=0;
       done = 0;
       ellen = document.forms[0].elements.length;
       if ((document.forms[0].BENUTZER.value != "") &&
          (document.forms[0].PASSWORD.value != "")) done = 1;
       for (var i = 0; i < ellen; i++) {
           if (document.forms[0].elements[i].checked) {
              done = done + 1;
              IA   = document.forms[0].elements[i].value;
              if ((IA != "stto") && (IA != "sttu") && (IA != "bofg")) TASK = userC; 
              if (IA =="stto") TASK = statsC + "?FUNC=stto&LANG=" + document.forms[0].LANG.value ;
              if (IA =="sttu") TASK = statsC + "?FUNC=sttu&LANG=" + document.forms[0].LANG.value ;
              if (IA =="bofg") TASK = ftbasketC + "?LANG=" + document.forms[0].LANG.value 
                                    + "&FUNC=5" + "&DUM2=" + document.forms[0].BENUTZER.value ; 
           }
       } 
       if (done <= 1) noToDo(10013); 
       else {
          if (IA =="bofg") {
             document.forms[0].reset(); 
             if (newWin5 && !newWin5.closed) newWin5.close();
             newWin5=window.open("amessage.S","newWin5", setWait); 
             newWin5.location.href=TASK;
          }
          else {
             document.forms[0].action=TASK;
             document.forms[0].submit();
          }
       }
    }
    /* ********************************************************************** */
    if (FORM0 == "medkl" || FORM0 == "vorml") {
       TASK = renewmediaC;
       if (FORM0 == "vorml") TASK = delreservC; 
       i = 0; 
       done = 0;
       ellen = document.forms[0].elements.length;
       for (var i = 0; i < ellen; i++) { if (document.forms[0].elements[i].checked) done=1; }
       if  (done == 0) noToDo(10013); 
       else {
          document.forms[0].method="POST";
          document.forms[0].action=TASK;     
          document.forms[0].submit(); 
       }  
    }
    /* ********************************************************************** */
    if (FORM0 == "pass") {
       done = 0;
       ellen = document.forms[0].elements.length;
       if (document.forms[0].PASSOLD.value  != "") done = done + 1;
       if (document.forms[0].PASSNEW1.value != "") done = done + 1; 
       if (document.forms[0].PASSNEW2.value != "") done = done + 1;

       for (var i = 1; i < ellen; i++) {
           if (document.forms[0].elements[i].name == "EMAILNEW") { 
              if (document.forms[0].EMAILNEW.value != "") done = done + 3;
           }
           if (document.forms[0].elements[i].name == "MOBPHNEW") { 
              if (document.forms[0].MOBPHNEW.value != "") { 
                 xy = document.forms[0].MOBPHNEW.value.search(/[0-9]/g);
                 if (xy == -1) done = done - 1;
                 else { 
                    done = done + 3;
                    mobin = document.forms[0].MOBPHNEW.value.match(/[0-9]/g);
                    document.forms[0].MOBPHNEW.value = mobin.join("");
                 }
              } 
           }
       }
       if (done == 0 || done % 3 != 0) noToDo(10013); 
       else { 
          TASK = pasemyC;
          document.forms[0].action=TASK;
          document.forms[0].submit(); 
       }
    }
    /* ********************************************************************** */
 }
}
/* ************************************************************ end MainFrame */

/* ************************************************************ actions ftitle */
function smFull(LANG,FUNC,IA)
{
 if (newWin3 && !newWin3.closed) newWin3.close();
 if (FUNC == "gifs") {
    file   = "picture/" + IA + ".gif.S";
    newWin3=window.open(file, "newWin3", setWinOp);
 }
 if (FUNC == "jpgs") {
    file   = "picture/" + IA + ".jpg.S";
    newWin3=window.open(file, "newWin3", setWinOp);
 }
 if (FUNC == "fuss") {
    newWin3=window.open("amessage.html.S","newWin3", setWinOp); 
    TASK = ftitleC + "?LANG=" + LANG + "&FUNC=fuss" + "&DUM1=0" + "&" + IA + "=YES";
    newWin3.location.href=TASK;
 }
 if (FUNC == "amazon1") {
    newWin3=window.open("amessage.html.S","newWin3", setWinOp); 
    TASK = IA;
    newWin3.location.href=TASK;
 }
}
/* ************************************************************** online cover */
function ldImg(BILD,NUM)
{
 xx = new Image();
 xx.src = "image/" + BILD + ".S";
 window.document.images[NUM].src = xx.src;
}
/* ******************************************************** end actions ftitle */

/* *********************************************************** actions account */
function smAcc(LANG,FUNC,IA)                                          
{
 if (newWin3 && !newWin3.closed) newWin3.close();
 newWin3=window.open("amessage.html.S","newWin3", setWinOp); 
 MAHN = userC + "?LANG="  + LANG + "&FUNC=mahn" + "&DUM1=0" + "&NR=" + IA;
 FULL = ftitleC + "?LANG=" + LANG + "&FUNC=full" + "&DUM1=0" + "&" + IA + "=YES";   
 if (FUNC == "mahn") newWin3.location.href=MAHN;
 if (FUNC == "full") newWin3.location.href=FULL;
}
/* **************************************************************** no history */
function noHist(FUNC)                                                  
{
 i = 0;
 done = 0;
 file1 = "/opax/" + document.forms[0].LANG.value + "/index_main.html.S";
 file2 = "/opax/index.html.S";
 if (FUNC == "s1") { if (document.forms.length > 0) document.forms[0].reset(); }
 if (FUNC == "s2") {
    if (document.forms.length > 0) {
       FORM0 = document.forms[0].name;
       ellen = document.forms[0].elements.length;
       for (var i = 1; i < ellen; i++) { if (document.forms[0].elements[i].checked) done = done +1; }
       if (done == 0) window.close();
    }
    else window.close(); 
 }
}

function what(key)
{
 if(client == "ms" && window.event.keyCode == 17) window.close();
 if(client != "ms" && key.which == 17) window.close();
}
/* ******************************************************* end actions account */

/* ************************************************************** select parts */
function slPart(IA,IB)                                                
{
 formlen = document.forms.length; 
 if (formlen <= 0) noToDo(10013); 
 else
 if (IA == 1) IA = 0; 
 IA = IA + 1;
 IB = IB + 1;
 {
  for(var i = IA + 1; i < IB + 1; i++) { document.forms[0].elements[i].checked = 1; }
 }
}
/* ********************************************************** end select parts */

/* ********************************************************************** help */
function opWin2(IA)                               
{
 if (newWin2 && !newWin2.closed) newWin2.close();
 file = ""; 
 if (IA == "1") file = "/opax/de/help.html.S";
 if (IA == "2") file = "/opax/en/help.html.S";
 if (IA == "3") file = "/opax/fr/help.html.S";
 if (IA == "4") file = "/opax/da/help.html.S";
 if (IA == "5") file = "/opax/cz/help.html.S";
 if (IA == "6") file = "/opax/nl/help.html.S";
 if (IA == "REG")  for (var i=0; i < document.brow.REG.length; ++i)
                   if  (document.brow.REG.options[i].selected == true)
                        IA = document.brow.REG.options[i].value;
 if (IA == "REG1") for (var i=0; i < document.qsel.REG1.length; ++i)
                   if  (document.qsel.REG1.options[i].selected == true)
                        IA = document.qsel.REG1.options[i].value;
 if (IA == "REG2") for (var i=0; i < document.qsel.REG2.length; ++i)
                   if  (document.qsel.REG2.options[i].selected == true)
                        IA = document.qsel.REG2.options[i].value;
 if (IA == "REG3") for (var i=0; i < document.qsel.REG3.length; ++i)
                   if  (document.qsel.REG3.options[i].selected == true)
                        IA = document.qsel.REG3.options[i].value;
 if (IA == "REG4") for (var i=0; i < document.qsel.REG4.length; ++i)
                   if  (document.qsel.REG4.options[i].selected == true)
                        IA = document.qsel.REG4.options[i].value;
 if (IA == "REG5") for (var i=0; i < document.qsel.REG5.length; ++i)
                   if  (document.qsel.REG5.options[i].selected == true)
                        IA = document.qsel.REG5.options[i].value;
 if (IA == "REG6") for (var i=0; i < document.qsel.REG6.length; ++i)
                   if  (document.qsel.REG6.options[i].selected == true)
                        IA = document.qsel.REG6.options[i].value;
 if (IA == "REG7") for (var i=0; i < document.qsel.REG7.length; ++i)
                   if  (document.qsel.REG7.options[i].selected == true)
                        IA = document.qsel.REG7.options[i].value;
 if (IA == "REG8") for (var i=0; i < document.qsel.REG8.length; ++i)
                   if  (document.qsel.REG8.options[i].selected == true)
                        IA = document.qsel.REG8.options[i].value;
 if (IA == "REG9") for (var i=0; i < document.qsel.REG9.length; ++i)
                   if  (document.qsel.REG9.options[i].selected == true)
                        IA = document.qsel.REG9.options[i].value;
 if (file == "") {
    TASK = "#" + IA;
    if (document.forms[0].LANG.value == "cz") file="/opax/cz/help2.html.S" + TASK;
    if (document.forms[0].LANG.value == "da") file="/opax/da/help2.html.S" + TASK;
    if (document.forms[0].LANG.value == "de") file="/opax/de/help2.html.S" + TASK;
    if (document.forms[0].LANG.value == "en") file="/opax/en/help2.html.S" + TASK;
    if (document.forms[0].LANG.value == "fr") file="/opax/fr/help2.html.S" + TASK;
    if (document.forms[0].LANG.value == "nl") file="/opax/nl/help2.html.S" + TASK;
 }
 newWin2=window.open(file, "newWin2", setWinOp);
}
/* ****************************************************************** end help */

/* ************************************************************** close window */
function clWin()
{
 if (newWin0 && !newWin0.closed) newWin0.close();
 if (newWin1 && !newWin1.closed) newWin1.close();
 if (newWin2 && !newWin2.closed) newWin2.close();
 if (newWin3 && !newWin3.closed) newWin3.close();
 if (newWin5 && !newWin5.closed) newWin5.close();
}
/* ********************************************************** end close window */

/* *************************************************************** NOthingTODO */
function noToDo(IA)
{
 if (newWin5 && !newWin5.closed) newWin5.close();
 newWin5=window.open("amessage.S","newWin5", setWait); 
 TASK = levelC + writetxtC + "?lang=de&txtnr1=" + IA;
 newWin5.location.href=TASK;
}
/* *********************************************************** end NOthingTODO */

/* *************************************************************** cookie test */
function addToCook(name, value, maxtime, path) 
{
 if (navigator.cookieEnabled == false) { noToDo(10010); return; }
 var opaCookie; 
 var opaValue;
 var opaInd;
 var allCookie = unescape(document.cookie);
 var opaName  = name + "=";
 var now1     = new Date();
 var nowx     = new Date(now1.getTime() + (maxtime*1000));
 var opaStart = allCookie.indexOf(opaName);

 if (opaStart == -1) {
    opaCookie = name + "=_" + escape(value) + "B13B" +
              + ((maxtime) ? "; expires=" + nowx.toGMTString() : "") 
              + ((path) ? "; path=" + path : "");
    opaAnz    = opaCookie.match(/_/gi);
    document.cookie = opaCookie;
 }
 else {
    opaEnd   = allCookie.indexOf("B13B", opaStart);
    opaInd   = allCookie.indexOf(escape(value), opaStart);
    if (opaInd == -1) {
       opaValue  = allCookie.substring(opaStart + 8, opaEnd) + "_" + escape(value);
       opaAnz    = opaValue.match(/_/gi);
       if (opaAnz.length > bofgMax) { noToDo(10011); return; }
       opaCookie = name + "=" + escape(opaValue) + "B13B" +
                 + ((maxtime) ? "; expires=" + nowx.toGMTString() : "") 
                 + ((path) ? "; path=" + path : "");
       document.cookie = opaCookie;
    }
    else {
       opaValue  = allCookie.substring(opaStart + 8, opaEnd);
       opaAnz    = opaValue.match(/_/gi);
    }
 }
}

function delFrCook(name, value, maxtime, path) 
{
 if (navigator.cookieEnabled == false) { noToDo(10010); return; }
 var opaCookie; 
 var opaValue;
 var opaInd;
 var allCookie = "" + unescape(document.cookie);
 var opaName  = "" + name + "=";
 var now1     = new Date();
 var nowx     = new Date(now1.getTime() + (maxtime*1000));
 var opaStart = allCookie.indexOf(opaName);

 if (opaStart == -1) noToDo(10009);
 else {
    opaEnd   = allCookie.indexOf("B13B", opaStart);
    opaInd   = allCookie.indexOf(escape(value), opaStart);
    if (opaInd != -1) {
       opaValue  = allCookie.substring(opaStart + 8, opaInd - 1) 
                 + allCookie.substring(opaInd + value.length, opaEnd)
       opaAnz    = opaValue.match(/_/gi);
       opaCookie = name + "=" + escape(opaValue) + "B13B" +
                 + ((maxtime) ? "; expires=" + nowx.toGMTString() : "") 
                 + ((path) ? "; path=" + path : "");
       document.cookie = opaCookie;
    }
 }
}

function getNrCook() 
{
 if (navigator.cookieEnabled == true) {
    djCook  = "" + unescape(document.cookie);
    djStart = djCook.indexOf('opaCook=');
    djLen   = 0;
    if (djStart != -1) {
       djEnd    = djCook.indexOf("B13B", djStart);
       djValue  = djCook.substring(djStart + 8, djEnd);
       djAnz    = djValue.match(/_/gi);
       if (djEnd > 9) djLen = djAnz.length;
    }
 }
}

/* *********************************************************** end cookie test */

// -->

