function setMediaFile(id, src, hideimage){
src = src.replace("//", "/");
document.getElementById(id).value = src;
if(hideimage == null || hideimage == 0 || hideimage == false){
document.getElementById(id + '_span').innerHTML = "
"
+""
+""
+""
+"
" + src + "";
}
else
document.getElementById(id + '_span').innerHTML = "
" + src.replace(/\n/g, "
");
}
function image_popup(url,breite){
if(breite != null){
var width=breite;
var height=breite;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 4;
newwindow = window.open("https://www.nuessler.ch/modules/system/cmd_image_popup.php?src="+url+"&width="+width,"newwindow",
"width=" +breite+",height=" +height+",screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=0,resizable=0,menubar=no");
newwindow.focus();
}else{
var breite=screen.availWidth-8;
var width=breite;
var height=screen.availHeight;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 4;
newwindow = window.open("https://www.nuessler.ch/modules/system/cmd_image_popup.php?src="+url+"&width="+width,"newwindow",
"width=" +breite+",height=" +height+",screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=0,resizable=0,menubar=no");
newwindow.focus();
}
}
function popup(url,breite,hoehe){
var url;
var width=breite;
var height=hoehe;
var l = (screen.availWidth - width) / 2;
var t = (screen.availHeight - height) / 2;
newwindow = window.open(url,"newwindow",
"width=" +breite+",height=" +hoehe+",screenX="+l+",screenY="+t+",left=" +l+",top="+t+",scrollbars=yes,resizable=0,menubar=no");
newwindow.focus();
}
function confirm_delete(url, type){
if(confirm(type+' wirklich löschen?\n\nEinträge, die nur in dieser '+type+' sind, \nwerden komplett gelöscht!') == true)
window.location = url;
}
function show_layer(id, show){
if(show){
document.getElementById(id).style.display = "";
document.getElementById(id).style.visibility = "visible";
}
else{
document.getElementById(id).style.display = "none";
document.getElementById(id).style.visibility = "hidden";
}
}
function layer_visible(id){
var vis = document.getElementById(id).style.visibility;
return ((vis == "visible") || (vis == ""));
}
function toggle_layer(id){
show_layer(id, !layer_visible(id));
}
function goto_url(url){
window.location = url;
}
function showWMTT(id) {
wmtt = document.getElementById(id);
wmtt.style.display = "block";
}
function hideWMTT() {
wmtt.style.display = "none";
}