function fcOpenPopup(WindowOption,PageID,arData,winWidth,winHeight){ if(WindowOption == "IndexPrint"){ winWidth = 680; } if(winWidth == 0 || winWidth > screen.width){ winWidth=screen.width-20; } if(winHeight == 0 || winHeight > screen.height){ winHeight=screen.height-100; } var posY=(screen.width/2)-(winWidth/2); var posX=(screen.height/2)-(winHeight/2); if(WindowOption == "IndexPopup"){ window.open("index_blank.php?PageID="+PageID+"&"+arData[0][0]+"="+arData[0][1]+"","DetailView","width="+winWidth+",height="+winHeight+",location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,top="+posX+",left="+posY+""); } else if(WindowOption == "DirectPopup"){ window.open(""+arData+"","DetailView","width="+winWidth+",height="+winHeight+",location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,top="+posX+",left="+posY+""); } else if(WindowOption == "0"){ window.open("index_blank.php?PageID="+PageID,"DetailView","width="+winWidth+",height="+winHeight+",location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,top="+posX+",left="+posY+""); } else if(WindowOption == "1"){ window.open("index_blank.php?PageID="+PageID+"&CustomBgrnd="+arData,"PageView","width="+winWidth+",height="+winHeight+",location=no,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=no,top="+posX+",left="+posY+""); } else if(WindowOption == "2"){ window.open("index_blank.php?PageID="+PageID+"&"+arData[0][0]+"="+arData[0][1]+"","DetailView","width="+winWidth+",height="+winHeight+",location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,top="+posX+",left="+posY+""); } } var objWindowPrint; function OpenWindowPrint(PageID,arData,winWidth,winHeight){ winWidth = 680; if(winWidth == 0 || winWidth > screen.width){ winWidth=screen.width-20; } if(winHeight == 0 || winHeight > screen.height){ winHeight=screen.height-100; } var posY=(screen.width/2)-(winWidth/2); var posX=(screen.height/2)-(winHeight/2); woPageTpl = "index_print.php?PageID="+PageID; woPageName = "PrintView"; if(objWindowPrint){ if(!objWindowPrint.closed){ objWindowPrint.close(); } } objWindowPrint = window.open(woPageTpl,woPageName,"left="+posX+",top="+posY+",width="+winWidth+",height="+winHeight+",location=no,menubar=yes,status=no,toolbar=no,resizable=yes,scrollbars=yes"); objWindowPrint.focus(); } function fcSendContactMail(){ if(document.ContactMail.ContactName.value==""){ alert("Bitte geben Sie Ihren Namen an!"); document.ContactMail.ContactName.focus(); }else if(document.ContactMail.ContactEmail.value==""){ alert("Bitte geben Sie Ihre Adresse an!"); document.ContactMail.ContactEmail.focus(); }else if(document.ContactMail.ContactEmail.value!=""&&document.ContactMail.ContactEmail.value.search(/[a-z|A-Z|0-9|_|\-|\.]+?@[a-z|A-Z|0-9|_|\-|\.]+?\.[a-z|A-Z][a-z|A-Z]+?/)==-1){ alert("Bitte geben Sie eine gültige Adresse an!"); document.ContactMail.ContactEmail.focus(); }else if(document.ContactMail.ContactSubject.value==""){ alert("Bitte geben Sie einen Betreff an!"); document.ContactMail.ContactSubject.focus(); }else if(document.ContactMail.ContactText.value==""){ alert("Bitte geben Sie einen Text an!"); document.ContactMail.ContactText.focus(); }else{ document.ContactMail.submit(); } } function fcFilewindow(FileID,FileWinWidth,FileWinHeight){ var FileWindowWidth=FileWinWidth; var FileWindowHeight=FileWinHeight; var FileWindowPosX=(screen.width/2)-(FileWindowWidth/2); var FileWindowPosY=(screen.height/2)-(FileWindowHeight/2); if(FileID != ""){ window.open("index_detail.php?FileID="+FileID+"","DetailView","left="+FileWindowPosX+",top="+FileWindowPosY+",width="+FileWindowWidth+",height="+FileWindowHeight+",location=no,menubar=no,status=no,toolbar=no,resizable=no,scrollbars=no"); } } function fcAlbumbrowser(BrowserID,AlbumID){ var AlbumBrowserWidth=950; var AlbumBrowserHeight=600; var AlbumBrowserPosX=(screen.width/2)-(AlbumBrowserWidth/2); var AlbumBrowserPosY=(screen.height/2)-(AlbumBrowserHeight/2); if(BrowserID == 1){ window.open("index_blank.php?PageID=14&AlbumID="+AlbumID,"BilderAlbum","left="+AlbumBrowserPosX+",top="+AlbumBrowserPosY+",width="+AlbumBrowserWidth+",height="+AlbumBrowserHeight+",location=no,menubar=no,status=no,toolbar=no,resizable=no,scrollbars=no"); } } function fcVideowindow(WindowID,VideoID){ var VideoWindowWidth=400; var VideoWindowHeight=370; var VideoWindowPosX=(screen.width/2)-(VideoWindowWidth/2); var VideoWindowPosY=(screen.height/2)-(VideoWindowHeight/2); if(WindowID == 1){ window.open("index_blank.php?PageID=17&VideoID="+VideoID,"Video","left="+VideoWindowPosX+",top="+VideoWindowPosY+",width="+VideoWindowWidth+",height="+VideoWindowHeight+",location=no,menubar=no,status=no,toolbar=no,resizable=no,scrollbars=no"); } } // Produktdetail Detail var intTableIDOld = ""; function ShowTableDetail(intButtonID,intTableID){ if(intTableIDOld != "" && intTableIDOld != intTableID){ if(document.getElementById(intTableIDOld)){ document.getElementById(intTableIDOld).style.display = "none"; } intTableIDOld = ""; } if(document.getElementById(intTableID) && document.getElementById(intButtonID)){ if(document.getElementById(intTableID).style.display == "none"){ document.getElementById(intTableID).style.display = "block"; intTableIDOld = intTableID; } else{ document.getElementById(intTableID).style.display = "none"; intTableIDOld = ""; } } } // WINDOW PAGE SCROLL var PageScrollInterval; var strPageScrollDirection; var strPageScrollStep = 4; var strPageScrollSpeed = 50; function PageScroll(strDirection){ if(PageScrollInterval){ StopPageScrollInterval(); } if(strDirection == "up" || strDirection == "dn"){ strPageScrollDirection = strDirection; PageScrollInterval = window.setInterval("PageScrolling()", strPageScrollSpeed); } else{ StopPageScrollInterval(); } } function PageScrolling(){ if(strPageScrollDirection == "up"){ window.scrollBy(0,-strPageScrollStep); } else if(strPageScrollDirection == "dn"){ window.scrollBy(0,strPageScrollStep); } } function StopPageScrollInterval(){ if(PageScrollInterval){ window.clearInterval(PageScrollInterval); } } // LOADER CALLBACK function startCallback() { // make something useful before submit (onStart) return true; } function completeCallback(response) { // response: strAction|strActionOutput|intId if(response != ""){ var reg1 = /<(.*?)>/; // oeffnen pre-tag enfternen (-zeichensatz übergibt html-tags) var reg2 = /<\/(.*?)>/; // schliessen pre-tag enfternen strResponse = response.replace(reg1,""); strResponse = strResponse.replace(reg2,""); arResponse = strResponse.split("|"); strAction = arResponse[0]; strActionOutput = arResponse[1]; intID = arResponse[2]; //alert("1: "+strAction+", 2: "+strActionOutput+", 3: "+intID); } } AIM = { frame : function(c) { var n = 'f' + Math.floor(Math.random() * 99999); var d = document.createElement('DIV'); d.innerHTML = ''; document.body.appendChild(d); var i = document.getElementById(n); if (c && typeof(c.onComplete) == 'function') { i.onComplete = c.onComplete; } return n; }, form : function(f, name) { f.setAttribute('target', name); }, submit : function(f, c) { AIM.form(f, AIM.frame(c)); if (c && typeof(c.onStart) == 'function') { return c.onStart(); } else { return true; } }, loaded : function(id) { var i = document.getElementById(id); if (i.contentDocument) { var d = i.contentDocument; } else if (i.contentWindow) { var d = i.contentWindow.document; } else { var d = window.frames[id].document; } if (d.location.href == "about:blank") { return; } if (typeof(i.onComplete) == 'function') { i.onComplete(d.body.innerHTML); } } }