function avapopup(G,E,B,D,A){var C=(screen.width-B)/2;var F=(screen.height-D)/2;winprops="height="+D+",width="+B+",top="+F+",left="+C+",scrollbars="+A+",notresizable";win=window.open(G,E,winprops);if(win.opener==null){win.opener=self}if(parseInt(navigator.appVersion)>=4){win.window.focus()}}function openpopup(F,D,A,C){var B=(screen.width-A)/2;var E=(screen.height-C)/2;winprops="height="+C+",width="+A+",top="+E+",left="+B+",scrollbars=no,resizable";win=window.open(F,D,winprops);if(win.opener==null){win.opener=self}if(parseInt(navigator.appVersion)>=4){win.window.focus()}return win}function avaaken(D,B,F,A){var C=(screen.width-B)/2;var E=(screen.height-F)/2;editWindow=window.open(D,A,"width="+B+",height="+F+",top="+E+",left="+C+",toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=yes,copyhistory=0");if(editWindow.opener==null){editWindow.opener=self}if(parseInt(navigator.appVersion)>=4){editWindow.window.focus()}}function avaaken2(E,B,H,A){var D=(screen.width-B)/2;var G=(screen.height-H)/2;var F=(A)?"yes":"no";var C=window.open(E,"Fail","width="+B+",height="+H+",toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars="+F+",copyhistory=0,left="+D+",top="+G);C.focus()}function avaaken3(A,G,H,F,B){var I=(screen.width-H)/2;var C=(screen.height-F)/2;var E=(B)?"yes":"no";var D=window.open(G,A,"width="+H+",height="+F+",toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars="+E+",copyhistory=0,left="+I+",top="+C);D.focus()}function avaprintaken(E,B,G,A,D){var C=(screen.width-B)/2;var F=(screen.height-G)/2;editWindow=window.open(E,A,"width="+B+",height="+G+",top="+F+",left="+C+",toolbar="+D+",directories=0,menubar=1,status=0,resizable=1,location=0,scrollbars=yes,copyhistory=0");if(editWindow.opener==null){editWindow.opener=self}}function gallupaken(D,B,F,A){var C=(screen.width-B)/2;var E=(screen.height-F)/2;editWindow=window.open(D,A,"width="+B+",height="+F+",top="+E+",left="+C+",toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=no,copyhistory=0");if(editWindow.opener==null){editWindow.opener=self}}var Nav4=((navigator.appName=="Netscape")&&(parseInt(navigator.appVersion)==4));var dialogWin=new Object();function openDialog(D,F,B,E,C){if(!dialogWin.win||(dialogWin.win&&dialogWin.win.closed)){dialogWin.returnFunc=E;dialogWin.returnedValue="";dialogWin.args=C;dialogWin.url=D;dialogWin.width=F;dialogWin.height=B;dialogWin.name=(new Date()).getSeconds().toString();if(Nav4){dialogWin.left=window.screenX+((window.outerWidth-dialogWin.width)/2);dialogWin.top=window.screenY+((window.outerHeight-dialogWin.height)/2);var A="screenX="+dialogWin.left+",screenY="+dialogWin.top+",resizable=no,width="+dialogWin.width+",height="+dialogWin.height}else{dialogWin.left=(screen.width-dialogWin.width)/2;dialogWin.top=(screen.height-dialogWin.height)/2;var A="left="+dialogWin.left+",top="+dialogWin.top+",resizable=no,width="+dialogWin.width+",height="+dialogWin.height}dialogWin.win=window.open(dialogWin.url,dialogWin.name,A);dialogWin.win.focus()}else{dialogWin.win.focus()}}function deadend(){if(dialogWin.win&&!dialogWin.win.closed){dialogWin.win.focus();return false}}var IELinkClicks;function disableForms(){IELinkClicks=new Array();for(var C=0;C<frames.length;C++){for(var B=0;B<frames[C].document.forms.length;B++){for(var A=0;A<frames[C].document.forms[B].elements.length;A++){frames[C].document.forms[B].elements[A].disabled=true}}IELinkClicks[C]=new Array();for(B=0;B<frames[C].document.links.length;B++){IELinkClicks[C][B]=frames[C].document.links[B].onclick;frames[C].document.links[B].onclick=deadend}}}function enableForms(){for(var C=0;C<frames.length;C++){for(var B=0;B<frames[C].document.forms.length;B++){for(var A=0;A<frames[C].document.forms[B].elements.length;A++){frames[C].document.forms[B].elements[A].disabled=false}}for(B=0;B<frames[C].document.links.length;B++){frames[C].document.links[B].onclick=IELinkClicks[C][B]}}}function blockEvents(){if(Nav4){window.captureEvents(Event.CLICK|Event.MOUSEDOWN|Event.MOUSEUP|Event.FOCUS);window.onclick=deadend}else{disableForms()}window.onfocus=checkModal}function unblockEvents(){if(Nav4){window.releaseEvents(Event.CLICK|Event.MOUSEDOWN|Event.MOUSEUP|Event.FOCUS);window.onclick=null;window.onfocus=null}else{enableForms()}}function checkModal(){if(dialogWin.win&&!dialogWin.win.closed){dialogWin.win.focus()}}function replace(A,G,E){var C=A.length,F=G.length;if((C==0)||(F==0)){return A}var B=A.indexOf(G);if((!B)&&(G!=A.substring(0,F))){return A}if(B==-1){return A}var D=A.substring(0,B)+E;if(B+F<C){D+=replace(A.substring(B+F,C),G,E)}return D}var whitespace=" \t\n\r";function isEmpty(A){return((A==null)||(A.length==0))}function isWhitespace(B){var A;if(isEmpty(B)){return true}for(A=0;A<B.length;A++){var C=B.charAt(A);if(whitespace.indexOf(C)==-1){return false}}return true}function check_string(A,B){if(isWhitespace(A.value)){if(!isWhitespace(B)){alert(B)}if(A.focus()){}return false}else{return true}}function check_email(A,D){var C=A.value;if(isWhitespace(C)){if(!isWhitespace(D)){alert(D)}if(A.focus()){}return false}var B=1;var E=C.length;while((B<E)&&(C.charAt(B)!="@")){B++}if((B>=E)||(C.charAt(B)!="@")){if(!isWhitespace(D)){alert(D)}if(A.focus()){}return false}else{B+=2}while((B<E)&&(C.charAt(B)!=".")){B++}if((B>=E-1)||(C.charAt(B)!=".")){if(!isWhitespace(D)){alert(D)}if(A.focus()){}return false}else{return true}}function add_to_cart(formname,page,prod){var qty;qty=eval('document.forms["'+formname+'"].qty'+prod+".value");if(isEmpty(qty)){qty=1}if(isWhitespace(qty)){qty=1}avapopup(page+"?add="+prod+"&qty="+qty,"add2cart",250,150,"no")}function del_from_cart(C,B,A){window.location.replace(B+"&del="+A)}function to_cart(){if(window.name=="add2cart"&&window.opener){window.opener.location.replace("./index.php?op=cart");window.close()}else{window.location.replace("./index.php?op=cart")}}function save_cart(A){avapopup(A+"?op=save","savecart",250,100,"no")}function setCookie(B,C,A,D){document.cookie=B+"="+escape(C)+((A==null)?"":(";expires="+A.toGMTString()))}function getCookie(A){var B=A+"=";if(document.cookie.length>0){offset=document.cookie.indexOf(B);if(offset!=-1){offset+=B.length;end=document.cookie.indexOf(";",offset);if(end==-1){end=document.cookie.length}return unescape(document.cookie.substring(offset,end))}}}function changeCookie(C,D){var B=new Date();var A=new Date();A.setTime(B.getTime()+3600*24*31);setCookie("saurus_shoppingcart",C,A,D)}function safe_filename(B){var A=B.toString();var C=new RegExp("(\\W+)","g");A=A.replace(C,"_");return A}function init_datepicker(B,A,C){if(window.jQuery&&$&&$.datepicker){jQuery(function(E){load_datepicker_settings();if(A&&C){function D(F){return{minDate:(F.id==C?E.datepicker.getDateFor("#"+A):null),maxDate:(F.id==A?E.datepicker.getDateFor("#"+C):null)}}E("#"+B).datepicker({beforeShow:D,showOn:"",speed:"",onSelect:function(F){document.getElementById(B).focus();E.datepicker.hideDatepicker()}})}else{E("#"+B).datepicker({showOn:"",speed:"",onSelect:function(F){document.getElementById(B).focus();E.datepicker.hideDatepicker()}})}});$.datepicker.showFor("#"+B)}else{openDialog("kalender.php?vorm=frmEdit&lahter="+B+"&longyear=1","200","167")}}