function openPopup(url, ID) {
	switch(ID){
		case 4:
			parent.location.href = url;
			break;
		case 5:
			parent.window.opener.location.href = url;
			break;
		default:
			if (parseInt(ID,10) > 0) {
				window.open(url, "ePilotPopup"+ID, IstrListboxTargetPopupstyle[ID]);
			}	else {
				window.open(url);
			}
	}
}

function RunSearch(lngPopupMode) {

  var queryval = document.forms["suche"].elements["Z"].value;
  var ID = document.forms["suche"].elements["ID"].value;

  if (lngPopupMode > 0) {
    var strLink = IstrPopupLink;
	  strLink += "/ID/" + ID + "/Z/" + encodeURIComponent(queryval);
    openPopup(strLink, lngPopupMode);
  }
  else {
    var strLink = IstrBaseLink;
	  strLink += "/ID/" + ID + "/Z/" + encodeURIComponent(queryval);
    document.location.href = strLink;
  }
}
