
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function SubmitSearchQuery(query_string) {
  document.SearchSite.action = '/search.php?query_string=' + query_string;
  return true;
}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function OpenNewWindow(WndSrc, WndParams) {
  //Popup Fenster erzeugen
  var New_Wnd = window.open(WndSrc,'PopupWindow', WndParams);
  New_Wnd.focus();
}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function GotoPage(pageid, category) {
  //Quelle fr pSearchSite setzen
  //location.href="/" + category + "/" + pageid + ".php";
  //Quelle fr pContent setzten
  var addSlash = "";
  
  if (pageid != "") {
    addSlash = "/";
  } else {
    addSlash = "";
  }
  
  var i = pageid.indexOf("#");
  if (i >= 0)
    {
      pageid0 = pageid.substr(0,i);
      pageid1 = pageid.substr(i);
      window.location.href="/" + category + addSlash + pageid0 + ".php" + pageid1;
    }
  else
    {
      //Umleiten
      window.location.href="/" + category + addSlash + pageid + ".php";
    }
}
 
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     
function ClearField() {     
//Textfeld Inhalt lschen
 if (document.SearchSite.query_string.value == "Search") {
  document.SearchSite.query_string.value = "";  
 }      
}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      
function FillField(FieldText) {
//Textfeld fllen
 document.SearchSite.query_string.value = FieldText;
}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function GotoPageIE(PageDestination) {
 //Auf Seite Springen, IEfix
 if (navigator.appName.indexOf("Microsoft") > -1) {
  var Param = PageDestination.split(",");
  var Category, Content;          
  Content = Param[0];
  Category = Param[1];   
  var i = Content.indexOf("#");
  var newUrl = "/" + Category;  
  if (i > 0)
    {
      Content0 = Content.substr(0,i);
      Content1 = Content.substr(i);
      newUrl += "/" + Content0 + ".php" + Content1;
    }
  else if (Content != "overview" && Content != "")
    {
      newUrl += "/" + Content;
    }
  else 
    {
      newUrl += ".php";
    } 
  //update des content-frame auf neue Quelle 
  window.location.href=newUrl;
 }
}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function SwitchLang(LangFolder) {
  //Setzt fr alle Frames neue Quellen
  location.href = LangFolder + "index.php3";
}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function CheckSearchString(strSearch){
  //Prueft den zu suchenden String auf Gltigkeit und gibt ggf. Fehlermeldung aus.
  if (strSearch == "" ) {
    alert ("Ung&uuml;ltige Suchanfrage. Bitte Suchbegriffe &uuml;berpr&uuml;fen!");
    return false
  } else {
    return true
  } 
}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function menuItemEffectOver(id){

classname = document.getElementById(id).className;

if (classname.indexOf("a") == -1){
    
    classname += "h";
document.getElementById(id).className = classname;
}


}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


function menuItemEffectOut(id){

classname = document.getElementById(id).className;

if (classname.indexOf("a") == -1){
    classname = classname.substring(0, classname.length - 1);
document.getElementById(id).className = classname;
}



}

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
