// Ronald Markworth: Bitte nur mit Vorsicht ändern.
// 

/***************************************************************************************
Funktionen, um aus einem Fenster heraus Informationen aus der URL auszulesen
***************************************************************************************/

function GetUrlItem(Item) {
  urlText= location.search;
  fc= urlText.slice(0,1);
  if (fc=="?") {
    l= urlText.length;
    urlText= urlText.slice(1,l);
    ArgSet= urlText.split("&");
    return (ArgSet[Item]);
  }
}


function GetUrlValue(Entry) {
  urlText= location.search;
  fc= urlText.slice(0,1);
  if (fc=="?") {
    l= urlText.length;
    urlText= urlText.slice(1,l);
    ArgSet= urlText.split("&");
    for (i=0;i<ArgSet.length;i++) {
      as= ArgSet[i].split("=");
      if (as[0] == Entry) {
        return (as[1]);
      }
    }
    return ("");
  }
}


function GetUrlCount() {
  urlText= location.search;
  fc= urlText.slice(0,1);
  if (fc=="?") {
    l= urlText.length;
    urlText= urlText.slice(1,l);
    ArgSet= urlText.split("&");
    return (ArgSet.length);
  }
  return("0");
}



function newWindow (UrlFile, UrlParams, Width, Height) {
  var Url2Open= UrlFile;
  if (UrlParams != null) {
    Url2Open += '?' + UrlParams;
  }
  var Size= 'resizable=yes';
  if ((Width != 0) && (Height != 0)) {
    Size=   'width=' + Width
         + ',height=' + Height
         + ',resizable=no';
  }
  //alert (Url2Open);
  window.open(Url2Open, 'A', Size);
}

