/* ** EINSTELLUNGEN */ var strBgColor = '#106912'; var strPicPath = "/fileadmin/pics", keyCount = 0, strTaste = "fF"; var aryFelder = new Array("text", "file", "password"); var aryPic = new Array(); /*aryPic["imgNavMainStartseite"] = "bt_nav_main_home"; aryPic["imgNavMainAngebote"] = "bt_nav_main_offerte"; aryPic["imgNavMainService"] = "bt_nav_main_servizi"; aryPic["imgNavMainCompany"] = "bt_nav_main_azienda"; aryPic["imgNavMainNews"] = "bt_nav_main_novita"; aryPic["imgNavMainMeinung"] = "bt_nav_main_sua-opinione";*/ /* ** FUNKTIONEN */ function preloadPic (strPrefix, aryPic) { for (var idPic in aryPic) { eval(idPic +'_i = new Image;'); eval(idPic +'_a = new Image;'); eval(idPic +'_i.src = "'+ strPrefix +'/'+ aryPic[idPic] +'_i.gif";'); eval(idPic +'_a.src = "'+ strPrefix +'/'+ aryPic[idPic] +'_a.gif";'); } } function picMouseOver (strPic) { eval("document.getElementById('"+ strPic +"').src = "+ strPic +"_a.src"); } function picMouseOut (strPic) { eval("document.getElementById('"+ strPic +"').src = "+ strPic +"_i.src"); } function keyCheck (e) { var obj = (document.all) ? window.event.srcElement : e.target; var qOk = true; if (obj.type) { for (i = 0; i < aryFelder.length; i++) { if (qOk) { qOk = (obj.type.toLowerCase() != aryFelder[i]); } } if (!qOk && obj.tagName && obj.tagName.toLowerCase() != "input") { qOk = true; } } if (obj.type == "textarea" || obj.type == "select-one" || obj.type == "select-multiple") { qOk = false; } if (qOk) { winTrigger(((document.all) ? window.event.keyCode : e.which)); } } function winTrigger (taste) { for (i = 0; i < strTaste.length; i++) { if (taste == strTaste.charCodeAt(i)) { window.location = "/angebote.html"; break; } } } function navChangeBgColor (layer_ref) { if (strBgColor == '#2C852B') { strBgColor = '#106912'; } else { strBgColor = '#2C852B'; } if (document.all) { //IS IE 4 or 5 (or 6 beta) eval( "document.all." + layer_ref + ".style.background = strBgColor"); } else if (document.getElementById) { hza = document.getElementById(layer_ref); hza.style.background = strBgColor; } else if (document.layers) { //IS NETSCAPE 4 or below document.layers[layer_ref].background = strBgColor; } } function openPopup (strSeite, intBreite, intHoehe, strName, strScrollbars, strResizeable) { var intScreenWidth = screen.width; var intScreenHeight = screen.height; var intPosX = (intScreenWidth / 2) - (intBreite / 2); var intPosY = (intScreenHeight / 2) - (intHoehe / 2); var winPopup = window.open(strSeite, strName, 'width='+ intBreite +',height='+ intHoehe +',left='+ intPosX +',screenX='+ intPosX +',top='+ intPosY +',screenY='+ intPosY +',menubar=no,scrollbars='+ strScrollbars +',resizable='+ strResizeable +',location=no,status=no,directories=no,dependent'); winPopup.focus(); } function PruefeAktion(text) { ch = confirm (text); if (ch) { return true; } else { return false; } } function setupOpt(formname, select1, select2) { if(eval("document.forms[\""+formname+"\"]."+select1+".selectedIndex > 0 && document.forms[\""+formname+"\"]."+select1+"[document.forms[\""+formname+"\"]."+select1+".selectedIndex].value != 999")) { id = eval("document.forms[\""+formname+"\"]."+select1+".options[document.forms[\""+formname+"\"]."+select1+".selectedIndex].value"); eval("document.forms[\""+formname+"\"]."+select2+".selectedIndex=0"); for( r=1; r < r_id[id].length; r++ ) { eval("document.forms[\""+formname+"\"]."+select2+".length=r+1"); eval("document.forms[\""+formname+"\"]."+select2+"[r].text=r_name[id][r]"); eval("document.forms[\""+formname+"\"]."+select2+"[r].value=r_id[id][r]"); } } else { eval("document.forms[\""+formname+"\"]."+select2+".length=1"); } } function setSelectedIndex(formname, selectname, postselect) { if( postselect > 0 ) { for( i=0; i < eval("document.forms[\""+formname+"\"]."+selectname+".length"); i++ ) { if( eval("document.forms[\""+formname+"\"]."+selectname+"[i].value")==postselect ) selectindex = i; } eval("document.forms[\""+formname+"\"]."+selectname+".selectedIndex="+selectindex); } } function redirectUrlToKategorie() { intKategorieID = document.forms['kategorieSelect'].kategorie.value; if(intKategorieID > 0) { location.href='/community/ecards/'+intKategorieID+'/index.html'; } else { location.href='/community/ecards/index.html'; } return false; } function checkOpenPopup(strSeite, strFormular, strElement, intBreite, intHoehe, strName, strScrollbars, strResizeable) { openPopup(strSeite+document.forms[strFormular].elements[strElement][document.forms[strFormular].elements[strElement].selectedIndex].value,intBreite,intHoehe,strName,strScrollbars,strResizeable); return false; } function hideAnkuendigungsLayer() { document.getElementById('layerAnkuendigung').style.visibility="hidden"; } /* ** INITIALISIERUNG */ preloadPic(strPicPath, aryPic); if (document.layers) { window.captureEvents(Event.KEYUP); window.onkeyup = keyCheck; } else { document.onkeyup = keyCheck; } function fn_open_window (url, winName, winWidth, winHeight, winScrollable) { if (winScrollable == 'scrollable') { Scrollbars = 'yes'; } else { Scrollbars = 'no'; } window.open(url, winName, 'width='+ winWidth +',height='+ winHeight +',menubar=no,scrollbars='+ Scrollbars +',resizable=no,location=no,status=no,directories=no,dependent'); return false; } /* Marktfinder */ function GeheNach(f) { if (f == "leer") { document.forms[0].reset(); document.forms[0].elements[0].blur(); return; } else { parent.frames[3].location.href=f; document.forms[0].reset(); document.forms[0].elements[0].blur(); } } function druckfenster(url, width, height) { var Win = window.open('/fileadmin/marktfinder/DE/'+url,"displayWindow",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=0,menubar=0,status=0' ); } /* * HTML classes with popup functionality * * After the class name you can add some popup window options like window height * or width. The option list must be comma seperated. */ var popupElements = new Array ( 'HELP,width=400,height=540,scrollbars=yes,resizable=yes', 'EXTERNAL', 'OPEN-MESSENGER,width=641,height=660,scrollbars=yes,resizable=no' ); var onloadPopups = new Array (); onloadPopups['winterjournal'] = new Array ( '/winterjournal/', 'FN_Winterjournal', new Array('width=620','height=530','scrollbars=no','resizable=no') ); var strFTaste = 'fF'; var aryFelder = new Array( 'text', 'file', 'password'); window.onload = init; if ( document.layers ) { window.captureEvents ( Event.KEYUP ); window.onkeyup = keyCheck; } else { document.onkeyup = keyCheck; } function init ( // no attributes ) { // Changed from to Links = document.getElementsByTagName ( 'area' ); Popups = getWindowAttribute ( popupElements ); doPopups ( Popups, Links ); } /* FUNCTIONS */ /* * Entfernt alle Leerstellen aus einem Array */ function aTrimArray ( Elements ) { if ( Elements.length < 0 ) return false; var ElementsReturn = new Array (); for ( var i = 0; i < Elements.length; i++ ) { ElementsReturn[ i ] = Elements[ i ].replace ( new RegExp ( '/\s/' ), '' ); } return ElementsReturn; } function printPage ( // no attributes ) { window.print (); return false; } function hasComma ( mString ) { if ( mString.length < 1 ) return false; var Return = mString.indexOf ( ',' ); if ( Return > -1 ) return true; return false; } function getWindowAttribute ( Elements ) { if ( Elements.length < 1 ) return false; var WindowNames = new Array (); var WindowAttributes = new Array (); for ( var i = 0; i < Elements.length; i++ ) { WindowAttributes[ i ] = aTrimArray ( Elements[ i ].split ( "," ) ); WindowNames[ i ] = WindowAttributes[ i ].shift (); } var Return = new Array ( WindowNames, WindowAttributes ); return Return; } function arrayWalker ( mArray, mFunction, mAttribute ) { if ( mArray.length < 1 ) return false; if ( mFunction.charAt ( 0 ) == '.' ) { var Method = mFunction; } var Return = new Array (); for ( var i = 0; i < mArray.length; i++ ) { if ( Method ) { Return[ i ] = eval ( 'mArray[ i ]' + Method + ' ( ' + mAttribute + ' )' ); } else { Return[ i ] = eval ( mFunction + ' ( mArray[ i ] )' ); } } return Return; } function doPrint ( Prints, Links ) { if ( !document.getElementsByTagName ) return false; if ( Prints.length < 1 ) return false; for ( var i = 0; i < Links.length; i++ ) { if ( checkClasses ( Prints, Links[ i ].className ) ) { Links[ i ].onclick = function () { window.print (); return false; } } } } function doFavorites ( Favorites, Links ) { if ( !window.attachEvent ) return false; if ( !document.getElementsByTagName ) return false; if ( Favorites.length < 1 ) return false; for ( var i = 0; i < Links.length; i++ ) { if ( checkClasses ( Favorites, Links[ i ].className ) ) { Links[ i ].onclick = function () { window.external.AddFavorite ( this.href, document.title ); return false; } } } } function doPopups ( // Array containing HTML classes with popup functionality Popups, Links ) { if ( !document.getElementsByTagName ) return false; if ( Popups.length < 1 ) return false; for ( var i = 0; i < Links.length; i++ ) { if ( checkClasses ( Popups[ 0 ], Links[ i ].className ) ) { Links[ i ].onclick = function () { var PopupName = checkClasses ( Popups[ 0 ], this.className ); var PopupId = inArray ( PopupName, Popups[ 0 ] ); buildPopup ( this.href, PopupName, Popups[ 1 ][ PopupId ] ); return false; }; } } } function buildPopup ( WindowLocation, WindowName, WindowAttributes ) { WindowName = WindowName.replace ( /-/, "_" ); window.open ( WindowLocation, 'Fressnapf' + WindowName , WindowAttributes.join ( ',' ) ); } function checkClasses ( Needles, Haystack ) { for ( var i = 0; i < Needles.length; i++ ) { if ( Haystack.indexOf ( Needles[ i ] ) > -1 ) { return Needles[ i ]; } } return false; } function inArray ( SearchTerm, Array ) { if ( SearchTerm.length < 1 ) return false; if ( Array.length < 1 ) return false; for ( var i = 0; i < Array.length; i++ ) { if ( Array[ i ] == SearchTerm ) { return i; } } return false; } /* function centra(url, width, height) { if (document.all) { var x = window.screenLeft; var y = window.screenTop; var w = window.document.body.offsetWidth; var h = window.document.body.offsetHeight; } else { var x = window.screenX; var y = window.screenY; var w = window.outerWidth; var h = window.outerHeight; } var cntx = x + Math.round((w - width) / 2); var cnty = y + Math.round((h - height) / 2); window.open (url, null, 'left=' + cntx + ',top=' + cnty + ',width=' + width + ',height=' + height); } document.getElementById('test').onclick = centra('fileadmin/templates/popup/popup/popup.htm',1000,740); */ function forwardPage( goto ) { if( goto == "int" ) { intPage = window.open("http://www.fressnapf.com/en/index.html", "_blank"); } } function openPetsy ( Element ) { link = ( typeof(Element) == 'object' ) ? Element.href : Element; openPopup (link, '960', '660', 'FressnapfPETSY', 'no', 'no'); return false; }