//////////////////////////////////////////////////////////////// // // wScript.js 5.0.1 // erstellt durch Scholl Communications AG, 77694 Kehl, www.scholl.de // erstellt mit Weblication Content Management Server, www.weblication.de // //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// // // Anzupassende Variablen: // var mailPostfix = '@konolfingen.ch'; // //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// // // Beschreibung: Browsererkennung // //////////////////////////////////////////////////////////////// var browser = new browserDetection(); function browserDetection(){ /* var ns = (document.layers) ? 1 : 0; var ie = (document.all) ? 1 : 0; var dom = (document.getElementById) ? 1 : 0; var mac = (navigator.platform.indexOf("Mac") != -1) ? 1 : 0; */ this.useragent = navigator.userAgent.toLowerCase(); this.browserName = "undetected"; this.browserVersion = "undetected"; this.isMozilla = false; this.isNetscape = false; this.isNetscape6 = false; this.isNetscape7 = false; this.isIE = false; this.isIE6 = false; this.isIE7 = false; this.isIE8 = false; this.isFF = false; this.isFF2 = false; this.isFF3 = false; this.isFF35 = false; this.isChrome = false; this.isOpera = false; this.isSafari = false; // Mozilla if(this.useragent.search(/mozilla/) != -1) { this.isMozilla = true; this.browserName = "Mozilla"; this.browserVersion = parseFloat(/(mozilla[^\s]*)/.exec(this.useragent)[0].split("/")[1]); } // Netscape if(this.useragent.search(/netscape/) != -1) { this.browserName = "Netscape"; this.browserVersion = parseFloat(/(firefox[^\s]*)/.exec(this.useragent)[0].split("/")[1]); var browserVersionTest = ""+this.browserVersion; if(browserVersionTest.substring(0, 1) == 7) { this.isNetscape7 = true; } else if(browserVersionTest.substring(0, 1) == 6) { this.isNetscape6 = true; } else if(browserVersionTest.substring(0, 1) <= 5) { this.isNetscape = true; } } // IE if(this.useragent.search(/msie/) != -1) { this.isIE = true; this.browserName = "IE"; this.browserVersion = parseFloat(/(msie[^;]*)/.exec(this.useragent)[0].split(" ")[1]); var browserVersionTest = ""+this.browserVersion; if(browserVersionTest.substring(0, 1) == 8) { this.isIE8 = true; } else if(browserVersionTest.substring(0, 1) == 7) { this.isIE7 = true; } else if(browserVersionTest.substring(0, 1) <= 6) { this.isIE6 = true; } } // Firefox if(this.useragent.search(/firefox/) != -1) { this.isIE = true; this.browserName = "Firefox"; this.browserVersion = parseFloat(/(firefox[^\s]*)/.exec(this.useragent)[0].split("/")[1]); var browserVersionTest = ""+this.browserVersion; if(browserVersionTest.substring(0, 3) == "3.5") { this.isFF35 = true; } else if(browserVersionTest.substring(0, 1) == 3) { this.isFF3 = true; } else if(browserVersionTest.substring(0, 1) <= 2) { this.isFF2 = true; } } // Chrome if(this.useragent.search(/chrome/) != -1) { this.isChrome = true; this.browserName = "Chrome"; this.browserVersion = parseFloat(/(chrome[^\s]*)/.exec(this.useragent)[0].split("/")[1]); } // Opera if(this.useragent.search(/opera/) != -1) { this.isOpera = true; this.browserName = "Opera"; this.browserVersion = parseFloat(/(opera[^\s]*)/.exec(this.useragent)[0].split("/")[1]); } // Safari if(this.useragent.search(/khtml/) != -1) { this.isSafari = true; this.browserName = "Safari (Win)"; this.browserVersion = parseFloat(/(version[^\s]*)/.exec(this.useragent)[0].split("/")[1]); } } //////////////////////////////////////////////////////////////// // // Beschreibung: Druckt das aktuelle Dokument // //////////////////////////////////////////////////////////////// function wPrintDocument(){ if(document.all && navigator.appVersion.substring(22,23)==4) { self.focus(); var OLECMDID_PRINT = 6; var OLECMDEXECOPT_DONTPROMPTUSER = 2; var OLECMDEXECOPT_PROMPTUSER = 1; var WebBrowser = ''; document.body.insertAdjacentHTML('beforeEnd',WebBrowser); WebBrowser1.ExecWB(OLECMDID_PRINT,OLECMDEXECOPT_DONTPROMPTUSER); WebBrowser1.outerHTML = ''; } else { window.print(); } } //////////////////////////////////////////////////////////////////////////////////////// // // Beschreibung: Prüft, ob die Plichtfelder im Formular korrekt ausgefüllt worden sind. // //////////////////////////////////////////////////////////////////////////////////////// function checkForm(validatorsNameStr, validatorsTypeStr, validatorsIdentStr, validatorsMsgStr) { var checkEmail = /.*\@.*\.\w+/i; var errorName = new Array(); var sendFormular = true; var validatorsName = validatorsNameStr.split("|"); var validatorsType = validatorsTypeStr.split("|"); var validatorsIdent = validatorsIdentStr.split("|"); var validatorsMsg = validatorsMsgStr.split("|"); if(validatorsName.length > 0) { for(i=0; i 0) { for(i=0; i 0) { for(i=0; i= 1 && email.lastIndexOf('.') > email.search('@') && email.lastIndexOf('.') >= email.length-5); } //alert(email+"\n"+sendBack); return sendBack; } //////////////////////////////////////////////////////////////// // // Öffnet ein Popup-Fenster // //////////////////////////////////////////////////////////////// function wOpenPopupURL(url, name, options){ var regWidth = /width=(\d+)/; regWidth.exec(options); width = RegExp.$1; if(width == ''){ width = 640; } var regHeight = /height=(\d+)/; regHeight.exec(options); height = RegExp.$1; if(height == ''){ height = 480; } if(!name && !width && !height && !options){ return window.open(url, name); return; } //Zusaetzliche Optionen angeben if(!options){ options = ',resizable=no,scrollbars=no,status=no'; } //Position zentriert festlegen var posLeft = (screen.width / 2) - (width / 2); var posTop = (screen.height / 2) - (height / 2); //alert('top='+posTop+',left='+posLeft+',width='+width+',height='+height+',' + options);<<< return window.open(url, name, 'top='+posTop+',left='+posLeft+',width='+width+',height='+height+',' + options); } //////////////////////////////////////////////////////////////// // // @method void wSendMailNospam(data) // // @desc Öffnet eine E-Mail zum Versenden // // @return void // //////////////////////////////////////////////////////////////// function wSendMailNospam(data){ location.href = 'mailto:' + data.replace('|', '@'); } //////////////////////////////////////////////////////////////// // // jQuery's - Bereich mit JS // //////////////////////////////////////////////////////////////// var $j = jQuery.noConflict(); jQuery(document).ready(function() { //Fancybox jQuery("a[rel=fancybox]").fancybox({ 'hideOnContentClick': true, //'hideOnOverlayClick': true, //'showCloseButton': true, 'overlayShow':true, 'overlayOpacity': 0.5, 'centerOnScroll': false }); jQuery(".elementPictureLupeButton").mouseover(function() { jQuery(this).css('background', 'transparent url(/wDeutsch/wGlobal/layout/images/icons/but_lupe_r.gif) no-repeat scroll 0 0'); }); jQuery(".elementPictureLupeButton").mouseout(function() { jQuery(this).css('background', 'transparent url(/wDeutsch/wGlobal/layout/images/icons/but_lupe_n.gif) no-repeat scroll 0 0'); }); /*Druckvorschau jQuery("#printpreviewLink").click(function() { e.preventDefault(); var anchor = location.hash; var url = location.href.replace(anchor, ''); if(url.indexOf('?') >= 0) { url += '&viewmode=print'; } else { url += '?viewmode=print'; } wOpenPopupURL(url, 'wPrintpreview', 'width=730,height=520,scrollbars=yes'); }); */ //Druckvorschau fns_ jQuery("#printpreviewLink").fancybox({ 'hideOnContentClick': false, 'frameWidth': 800, 'frameHeight': 600, 'overlayShow':true, 'overlayOpacity': 0.5, 'centerOnScroll': false }); //Seite empfehlen jQuery("#tellafriendLink").fancybox({ 'hideOnContentClick': false, 'frameWidth': 320, 'frameHeight': 300, 'overlayShow':true, 'overlayOpacity': 0.5, 'centerOnScroll': false }); //impressumLink fns_ jQuery("#impressumLink").fancybox({ 'hideOnContentClick': false, 'frameWidth': 800, 'frameHeight': 600, 'overlayShow':true, 'overlayOpacity': 0.5, 'centerOnScroll': false }); //sitemapLink fns_ jQuery("#sitemapLink").fancybox({ 'hideOnContentClick': false, 'frameWidth': 800, 'frameHeight': 600, 'overlayShow':true, 'overlayOpacity': 0.5, 'centerOnScroll': false }); //rssLink fns_ jQuery("#rssLink").fancybox({ 'hideOnContentClick': false, 'frameWidth': 800, 'frameHeight': 600, 'overlayShow':true, 'overlayOpacity': 0.5, 'centerOnScroll': false }); }); //////////////////////////////////////////////////////////////// // // jQuery's - Bereich mit PHP (gsg.format) // //////////////////////////////////////////////////////////////// // jQUERY HEADERBILD jQuery(document).ready(function() { jQuery('#headerbild').crossSlide({ sleep: 6, fade: 4 }, [ { src: '/de/img/header/jQueryHeader/header2.jpg', alt:'konolfingen'},{ src: '/de/img/header/jQueryHeader/header1.jpg', alt:'konolfingen'},{ src: '/de/img/header/jQueryHeader/header2.jpg'}]); }); jQuery(document).ready(function() { jQuery('#headerbildsmall').crossSlide({ sleep: 6, fade: 4 }, [ { src: '/de/img/header/small/header1-small.jpg', alt:'konolfingen'},{ src: '/de/img/header/small/header2-small.jpg', alt:'konolfingen'},{ src: '/de/img/header/small/header1-small.jpg'}]); });