function noPostBack(sNewFormAction)
{document.forms[0].action=sNewFormAction;document.forms[0].__VIEWSTATE.name='NOVIEWSTATE';document.forms[0].target='_blank';}
function finanzinfo(){var ausg="http://www.kirstein.de";dis=window.open(ausg,"my2","toolbar=0,scrollbars, resizable=0,status=no,width=370, height=280 innerHeight=280,innerWidth=370,outerHeight=430,outerwidth=370");}
function shippingcosts(){var ausg="http://www.kirstein.de/versandkosten.htm";dis=window.open(ausg,"sc","toolbar=0,scrollbars, resizable=1,status=no,width=830, height=450 innerHeight=450,innerWidth=830,outerHeight=450,outerwidth=820");}
function empfehlen(ausg){dis=window.open(ausg,"my2","toolbar=0,resizable=0,status=no,width=420,height=500,innerHeight=500,innerWidth=420,outerHeight=500,outerwidth=420");}
function printWindow(){Browser=parseInt(navigator.appVersion);if(Browser>=4)window.print();}
function fragestellen(artnr,lang,title){var ausg="http://www.kirstein.de/apps/formmail/forms/fragezuprodukt.php?artnr="+artnr+"&lang="+lang+"&title="+title;dis=window.open(ausg,"cb","toolbar=0,scrollbars, resizable=1,status=no,width=640, height=450 innerHeight=450,innerWidth=640,outerHeight=450,outerwidth=630");}
function preisvorschlag(artnr,title){var ausg="http://www.kirstein.de/apps/formmail/forms/preisvorschlag.php?artnr="+artnr+"&title="+title;dis=window.open(ausg,"cb","toolbar=0,scrollbars, resizable=1,status=no,width=640, height=570 innerHeight=570,innerWidth=640,outerHeight=570,outerwidth=630");}
function contactform(sid){var ausg="http://www.kirstein.de/apps/formmail/forms/kontaktformular.php?sid="+sid;dis=window.open(ausg,"cf","toolbar=0,scrollbars, resizable=1,status=no,width=830, height=600 innerHeight=600,innerWidth=830,outerHeight=600,outerwidth=820");}
function callback(sid){var ausg="http://www.kirstein.de/apps/formmail/forms/callback.php?sid="+sid;dis=window.open(ausg,"cb","toolbar=0,scrollbars, resizable=1,status=no,width=640, height=485 innerHeight=485,innerWidth=640,outerHeight=485,outerwidth=630");}
function popup360(url){fenster=window.open(url,"_blank","width=600,height=500,status=yes,scrollbars=yes,resizable=yes");fenster.focus();return false;}
function showInfo(divName,e){document.getElementById(divName).style.display='block';}
function hideInfo(divName){document.getElementById(divName).style.display='none';}
function submitIPaymentForm(formAction,nextButton,prevButton){var sImage=document.getElementById("imgWait").src;document.getElementById(nextButton).disabled=true;document.getElementById(prevButton).disabled=true;document.getElementById("divIPaymentWait").style.display='block';document.forms[0].action=formAction;document.forms[0].__VIEWSTATE.value='';document.forms[0].__EVENTVALIDATION.value='';document.forms[0].method='POST';document.forms[0].submit();document.getElementById("imgWait").src=sImage;return false;}
$(document).ready(function(){$("#controls li a").click(function(){shuffle();var rel=$(this).attr("rel");if($("#"+rel).hasClass("current")){return false;}
$("#"+rel).show();$(".current").fadeOut().removeClass("current");$("#"+rel).addClass("current");$(".active").removeClass("active");$(this).parents("li").addClass("active");set_new_interval(6000);return false;});});function banner_switch(){shuffle();var next=$('.banner.current').next('.banner').length?$('.banner.current').next('.banner'):$('#banners .banner:first');$(next).show();$(".current").fadeOut().removeClass("current");$(next).addClass("current");var next_link=$(".active").next("li").length?$('.active').next('li'):$('#controls li:first');$(".active").removeClass("active");$(next_link).addClass('active');}
$(function(){slide=setInterval("banner_switch()",6000);});function set_new_interval(interval){clearInterval(slide);slide=setInterval("banner_switch()",interval);}
function shuffle(){$(".banner").css("z-index",1).hide();$(".current").css("z-index",2).show();}
function FFSuggest(){var pRequest;var pLayer;var pDebug=false;var pInstanceName='';var pSearchURL='';var pQueryParamName='';var pFormname='';var pLayerName='';var pQueryInput;var pSuggest=new Array();var pLastQuery;var pCurrentSelection=0;var submitted=false;var pSuggestQueryClass='suggestTextQuery';var pSuggestTypeClass='suggestTextType';var pSuggestAmountClass='suggestTextAmount';var pSuggestQueryTypedClass='suggestTextQueryTyped';var pSuggestFooterClass='suggestFooter';var pSuggestHeaderClass='suggestHeader';var pSuggestRowClass='suggestRow';var pSuggestHighlightClass='suggestHighlight';this.init=function(searchURL,formname,queryParamName,divLayername,instanceName,debugMode,mandantParamName,mandant){pSearchURL=searchURL;pFormname=formname;pQueryParamName=queryParamName;pMandantParamName=mandantParamName;pMandant=mandant;pLayerName=divLayername;pInstanceName=instanceName;pDebug=debugMode;if(pSearchURL==''){if(pDebug)alert('no searchurl defined');return null;}else if(pInstanceName==''){if(pDebug)alert('no instancename defined');return null;}else if(pFormname==''){if(pDebug)alert('no formname defined');return null;}else if(pQueryParamName==''){if(pDebug)alert('no queryparamname defined');return null;}else if(pLayerName==''){if(pDebug)alert('need a layer for output');}
pQueryInput=document[pFormname][pQueryParamName];pQueryInput.onkeyup=handleKeyPress;pQueryInput.onfocus=showLayer;pQueryInput.onblur=hideLayer;document[pFormname].onsubmit=handleSubmit;}
function handleSubmit(){submitted=true;if(pSuggest[pCurrentSelection]!=undefined){document[pFormname][pQueryParamName].value=pSuggest[pCurrentSelection].split('###')[0];}}
this.handleClick=function(){if(pSuggest[pCurrentSelection]!=undefined){document[pFormname][pQueryParamName].value=pSuggest[pCurrentSelection].split('###')[0];document[pFormname].submit();}}
this.handleMouseOver=function(pos){var tblCell=getTableCell(pos);unmarkAll();if(tblCell!=null){highlightSuggest(tblCell);pCurrentSelection=pos;}}
this.handleMouseOut=function(pos){var tblCell=getTableCell(pos);if(tblCell!=null){unmarkSuggest(tblCell);pCurrentSelection=-1}}
function handleKeyPress(evt){evt=(evt)?evt:((event)?event:null);var keyCode=evt.keyCode;if(keyCode==38){moveSelection('up')}else if(keyCode==27){hideLayer();}else if(keyCode==40){moveSelection('down');}else{if(pQueryInput.value==''){hideLayer();if(pLayer!=null){pLayer.innerHTML='';}
return null;}
if(pLastQuery!=pQueryInput.value){startAjax();}
pLastQuery=pQueryInput.value;}}
function moveSelection(direction){var pos=pCurrentSelection;if(direction=='up'){pos--;}
else{pos+=1;}
if(pos<0){unmarkAll();pQueryInput.focus();pCurrentSelection=-1;}else{var tblCell=getTableCell(pos);if(tblCell!=null){unmarkAll();highlightSuggest(tblCell);pCurrentSelection=pos;}}
var query=pQueryInput.value;pQueryInput.value='';pQueryInput.focus();pQueryInput.value=query;}
function startAjax(){var query=pQueryInput.value;var requestURL=pSearchURL+'?query='+escape(query)+'&'+pMandantParamName+'='+pMandant;try{if(window.XMLHttpRequest){pRequest=new XMLHttpRequest();}else if(window.ActiveXObject){pRequest=new ActiveXObject("Microsoft.XMLHTTP");}else{if(pDebug)alert('no ajax connection');}
pLayer=document.getElementById(pLayerName);if(pLayer!=null){if(query!=''){pRequest.open("GET",requestURL,true);pRequest.onreadystatechange=callbackAjax;pRequest.send(null);}else{hideLayer();}}else{if(pDebug)alert('no layer for output found');}}catch(ex){hideLayer();if(ex==undefined){if(pDebug)alert('Error: '+ex.getmessage);}else{if(pDebug)alert('Error: '+ex);}}}
function hideLayer(){if(pLayer!=null){pLayer.style.display='none';}}
this.hideLayerOutsideCall=function(){if(pLayer!=null){pLayer.style.display='none';}}
function showLayer(){if(pLayer!=null&&pSuggest!=null&&pSuggest.length>=1){pLayer.style.display='block';}}
function callbackAjax(){if(submitted==false){if(pRequest.readyState==4){if(pRequest.status!=200){hideLayer();if(pDebug)alert('Error ('+pRequest.status+'): '+pRequest.statusText);}else{handleResponse(pRequest.responseText);}}}}
function fireSuggestCompleted(suggestLayerIsVisible){if(typeof(onSuggestCompleted)=='function'){onSuggestCompleted(suggestLayerIsVisible);}}
function handleResponse(text){pCurrentSelection=-1;pSuggest=new Array();pSuggest=text.split('\n');var outputText='<table cellpadding="0" cellspacing="0" class="'+pLayerName+'" width="100%" border="0" onMouseDown="'+pInstanceName+'.handleClick();">';outputText+='<tr class="'+pSuggestHeaderClass+'" ><td nowrap="nowrap" colspan="3">W&auml;hlen Sie einen Vorschlag oder <a href="#">durchsuchen Sie alle Angebote...</a>&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>';var pNewSuggest=new Array();for(var i in pSuggest){var firstChar=pSuggest[i].charCodeAt(0);if(firstChar!=13&&firstChar!=10&&pSuggest[i].length>=1){pNewSuggest.push(pSuggest[i]);}}
pSuggest=pNewSuggest;var query=pQueryInput.value;for(var i in pSuggest){pSuggestParts=new Array();pSuggestParts=pSuggest[i].split("###");outputText+='<tr id="'+pLayerName+'_'+i+'" class="'+pSuggestRowClass+'" onMouseOver="'+pInstanceName+'.handleMouseOver('+i+');" onMouseOut="'+pInstanceName+'.handleMouseOut('+i+');">'
+'<td nowrap="nowrap" class="'+pSuggestQueryClass+'">'+pSuggestParts[0].replace(new RegExp("("+query+")","ig"),'<span class="'+pSuggestQueryTypedClass+'">$1</span>')+'</td>'
+'<td nowrap="nowrap" class="'+pSuggestTypeClass+'">'+pSuggestParts[2]+'</td>'
+'<td nowrap="nowrap" class="'+pSuggestAmountClass+'">'+pSuggestParts[1]+'</td>'
+'</tr>';}
outputText+='<tr><td class="'+pSuggestFooterClass+'" colspan="3">&nbsp;&Auml;hnlichkeitssuche by &copy;FACT-Finder</td></tr></table>';if(pSuggest.length>=1){showLayer();pLayer.innerHTML=outputText;fireSuggestCompleted(true);}else{hideLayer();pLayer.innerHTML='';fireSuggestCompleted(false);}}
function highlightSuggest(tblCell){tblCell.className=pSuggestHighlightClass;}
function unmarkSuggest(tblCell){tblCell.className=pSuggestRowClass;}
function unmarkAll(){var tblCell;for(var i in pSuggest){tblCell=getTableCell(i);if(tblCell!=null){unmarkSuggest(tblCell);}}}
function getTableCell(pos){var tblCell;tblCell=document.getElementById(pLayerName+'_'+pos);return tblCell;}}
