function showPicture(title, close, url, katname, img, width, height, mb, sb, rs) {
  getlink = "/php/bilder_popup.php?close="+close+"&url="+url+"&katname="+katname+"&title="+title+"&width="+width+"&height="+height;
  popup = window.open(getlink, title, "width="+width+", height="+height+", menubar="+mb+", scrollbars="+sb+", resizable="+rs);
  popup.name = title;
  popup.focus();
  return false;
}

//Popup
function websPopup(url, width, height) {
  window.open(url,"popup","width=" + width + ",height=" + height + ",menubar=yes,scrollbars=yes,resizable=yes");
}
//Popup Weiterempfehlen
function websPopupVariable(url, width, height, bar, scroll, resize) {
  window.open(url,"popup","width=" + width + ",height=" + height + ",menubar=" + bar + ",scrollbars=" + scroll + ",resizable=" + resize);
}
//PopUp mit allen Funktionen
function websPopupAll(url, width, height, mb, rs, sx, sy, scb, st, tb, top) { //, menubar, resizable, screenX, screenY, scrollbars, status, toolbar, top)
  newWindow = window.open(url,"popup","width=" + width + ",height=" + height + ",menubar=" + mb + ",scrollbars=" + scb + ",screenx="+ sx + ",screeny=" + sy + ",status="+st+",toolbar=" + tb + ",resizable=" + rs);
  newWindow.focus();
}

//PopUp mit allen Funktionen fuer "Seite versenden"
function websPopupSend (pageurl) { //, menubar, resizable, screenX, screenY, scrollbars, status, toolbar, top)
  var url     = "/de/content/send_url/send_url.php?url=" + pageurl;
  var width   = 800;
  var height  = 680;
  var mb      = 'yes';
  var rs      = 'no';
  var sx      = 100;
  var sy      = 100;
  var scb     = 'no';
  var st      = 'yes';
  var tb      = 'no';
  var top     = 'yes';

  //javascript:websPopupAll('/de/content/send_url/send_url.php?url='+document.URL,800,680,'yes','no','yes', 'no', 'yes');
  newWindow = window.open(url,"popup","width=" + width + ",height=" + height + ",menubar=" + mb + ",scrollbars=" + scb + ",screenx="+ sx + ",screeny=" + sy + ",status="+st+",toolbar=" + tb + ",resizable=" + rs);
  newWindow.focus();
}
function bookmark() {
  var doc_title = document.title;
  var doc_url = document.URL;
  if (document.all && !window.opera){ //IE5+
      document.write("<a href=\"javascript:window.external.AddFavorite(document.URL,document.title);\">Zu Favoriten hinzufügen</a></li>");
  }
  else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')){ //Gecko
      document.write("<a href=\"javascript:window.sidebar.addPanel ('" + doc_title + "', '" + doc_url + "','');\" title=\"" + doc_title + "\" target=\"_content\">Zu Favoriten hinzufügen</a>");
  }
  else{
      document.write("<a href=\"" + doc_url + "\" title=\"" + doc_title + "\" rel=\"sidebar\" target=\"_content\">Zu Favoriten hinzufügen</a>");
  }
}

function indexInArray(arr,val) {
  for(var i=0;i<arr.length;i++) {
    if(arr[i]==val) {
      return i;
    }
  }
    return -1;
}
