function search() {
var MyQuery = document.suche.suchfeld.value;
if(MyQuery == '' || MyQuery == 'Suchbegriff') {
alert("Bitte Suchbegriff eingeben");
} else {
MyQuery = '../docs/searchresult?OpenDocument&Query=' + MyQuery.replace(/ /, '+');
document.location.href = MyQuery;
}
return false;
}
function open_rechner(w_file)
{
var info_win = window.open(w_file,"rechner","width=600,height=540,screenX=0,screenY=0,menubar=yes,scrollbars=yes,status=yes,resizable=no,status=no");
// window.open("../vwfiles/Info_Praemienrechner/$file/Popup_1.htm","Info","width=600,height=520,screenX=0,screenY=0,menubar=yes,scrollbars=yes,status=yes,resizable=no,status=no");
};
function openAHP(site) {
var docpfadtemp2="";
var urltemp=top.location.href.toLowerCase();
var subdomain=top.location.href.split("/");
subdomain=subdomain[2].toLowerCase();
subdomain=subdomain.replace(".service.central.de","");
if (urltemp.indexOf(".service.central.de")!=-1) docpfadtemp2="/central_inter_agt/AMBAUpublikation.nsf/docs/"+subdomain;
var docpfad="../../central_inter.nsf/docs/";
var docpfadsuche='../../central_agt_search.nsf/SKonfEingabeByKey/Eingabemaske" onclick="open_popup()" target="popup';
var homepagelink=docpfadtemp2+"Homepage";
var portraitlink=docpfadtemp2+"Portrait";
var kontaktlink=docpfadtemp2+"Kontakt";
switch(site) {
case "home":
top.location.href = homepagelink;
break;
case "portrait":
top.location.href = portraitlink;
break;
case "kontakt":
pop = window.open( kontaktlink, 'popup', 'width=650,height=600,scrollbars=yes,dependant=no,screenX=90,screenY=50,status=no,toolbar=no,menubar=no');
pop.focus();
break;
default:
top.location.href = homepagelink;
break;
}
}
function PopUp(URLLink, Width, Height, Typ) {
if(URLLink.indexOf("Informationsanforderung")>=0 && AHP == "1") {
openAHP('kontakt');
return false;
}
if (Typ == null){
if (Width == null) Width = 650;
if (Height == null) Height = 500;
status = '';
winprops = "'width=" + eval(Width) + ",height=" + eval(Height) + ",top=10,left=10,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,status=yes'";
var oURLLinkLow = URLLink.toLowerCase();
if (oURLLinkLow.indexOf("javascript")!=-1 || oURLLinkLow.indexOf("http:")!=-1 || oURLLinkLow.indexOf("https:")!=-1 || oURLLinkLow.indexOf("dl=")!=-1 || oURLLinkLow.indexOf("$file")!=-1) {
URLLink = URLLink;
} else if (oURLLinkLow.indexOf("?")!=-1) {
URLLink = URLLink + "&DL=PopUp";
} else {
URLLink = URLLink + "?openDocument&DL=PopUp";
}
win = window.open(URLLink, "PopUp", eval(winprops));
win.focus();
}
if (Typ == 'Formular') {
if (Width == '') Width = 550;
if (Height == '') Height = 680;
status = '';
winprops = "'width=" + eval(Width) + ",height=" + eval(Height) + ",left=10,top=10,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,status=yes'";
URLLink = 'https://secure.central.de/internet/central/microsite/central_microsite_forms.nsf/FormEntry?ReadForm&Name='+URLLink;
if (window.location.href.indexOf('.service.central.de')>0 ) URLLink = URLLink+'&'+window.location.host;
winform = window.open(URLLink, "Formular", eval(winprops));
winform.focus();
}
}
function PrintPreview(URLLink, Width, Height) {
if (Width == null) Width = 650;
if (Height == null) Height = 500;
status = '';
if(top.name != "PopUp" && top.name != "Preview" && top.name != "Search") {
winprops = "'width=" + eval(Width) + ",height=" + eval(Height) + ",top=10,left=10,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,status=no'";
if(URLLink.indexOf("?OpenDocument") == -1 && URLLink.indexOf("&DL=PopUp") == -1)
URLLink = URLLink + "?OpenDocument&DL=PopUp";
else if(URLLink.indexOf("?OpenDocument") > 0 && URLLink.indexOf("&DL=PopUp") == -1)
URLLink = URLLink + "&DL=PopUp";
win = window.open(URLLink, "Preview", eval(winprops));
win.focus();
win.print();
} else {
window.print();
}
}
function tvspot(File1, File2, File3) {
var anzahl = 3;
if (File2 == null | File2 == "") anzahl = 1;
if (File3 == null | File3 == "") anzahl = 2;
var zufall = parseInt((Math.random() * 100) % anzahl);
switch (zufall) {
case 0:
var File = File1;
break;
case 1:
var File = File2;
break;
case 2:
var File = File3;
break;
default:
var File = File1;
break;
}
document.write('');
}
function randomVisual(bild1,bild2,bild3,bild4) {
var zufall = parseInt((Math.random() * 100) % 4);
var bild = bild1;
if (bild3 == null | bild3 == "") bild3 = bild1;
if (bild4 == null | bild4 == "") bild4 = bild2;
switch (zufall) {
case 0:
bild = bild1;
break;
case 1:
bild = bild2;
break;
case 2:
bild = bild3;
break;
case 3:
bild = bild4;
break;
default:
bild = bild1;
break;
}
var pre ="";
document.write(pre+bild+sub);
}