Validation.addAllThese([['validate-alpha','Please use letters only (a-z or A-Z) in this field.',function(v){return Validation.get('IsEmpty').test(v)||/^[a-zA-ZäöüÄÖÜß]+$/.test(v);}],['validate-alphanum','Please use only letters (a-z or A-Z) or numbers (0-9) only in this field. No spaces or other characters are allowed.',function(v){return Validation.get('IsEmpty').test(v)||/^[a-zA-Z0-9äöüÄÖÜß]+$/.test(v);}],['validate-nick','Please use only letters (a-z or A-Z) or numbers (0-9) or Dot(.) or Underscore(_) or Minus(-) only in this field. No spaces or other characters are allowed.',function(v){return Validation.get('IsEmpty').test(v)||/^[a-zA-Z0-9äöüÄÖÜß._-]+$/.test(v);}],['validate-names','Please use only letters (a-z or A-Z) or numbers (0-9) or Dot(.) or Underscore(_) or Minus(-) or Slash(/) or Single Quote (\') only in this field. No spaces or other characters are allowed.',function(v){return Validation.get('IsEmpty').test(v)||/^[a-zA-ZäöüÄÖÜß \'\/._-]+$/.test(v);}],['validate-person-names','Please use only letters (a-z or A-Z) or numbers (0-9) or Dot(.) or Underscore(_) or Minus(-) or Slash(/) or Single Quote (\') only in this field. No spaces or other characters are allowed.',function(v){return Validation.get('IsEmpty').test(v)||/^[a-zA-Z0-9äöüÄÖÜß \'.-]+$/.test(v);}],['validate-city','Please use letters only (a-z or A-Z) in this field.',function(v){return Validation.get('IsEmpty').test(v)||/^[a-zA-Z- äöüÄÖÜß]+$/.test(v);}],['validate-street','Please use only letters (a-z or A-Z) or numbers (0-9) or spaces and # only in this field.',function(v){return Validation.get('IsEmpty').test(v)||/^[0-9a-zA-ZäöüÄÖÜß. \-\/,]{4,}$/.test(v);}],['validate-email','Please enter a valid email address. For example johndoe@domain.com.',function(v){return Validation.get('IsEmpty').test(v)||/^[a-z0-9-zA,!\#\$%&'\*\+\/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+\/=\?\^_`\{\|}~-]+)*@[a-z0-9-ZäöüÄÖÜß]+(\.[a-z0-9-]+)*\.([a-z]{2,})$/i.test(v);}]]);Validation.add('validate-nickname','Der Benutzername ist ungültig.<br />Es sind nur Buchstaben und Zahlen, Punkt, Unterstrich und Minus erlaubt und eine Länge von 2 bis 50 Zeichen.',{minLength:2,maxLength:50,include:['validate-nick']});Validation.add('validate-name','Ungültiger Eintrag.<br />Es sind nur Buchstaben, Punkt, Unterstrich, Leerzeichen, Slash, Single Quote und Minus mit einer Länge von 2 bis 50 Zeichen möglich.',{minLength:2,maxLength:50,include:['validate-names']});Validation.add('validate-agb','Unsere AGB\'s wurden noch nicht bestätigt',{include:['validate-select']});Validation.add('validate-citys','Ungültiger Eintrag.<br />Es sind nur Buchstaben, Leerzeichen und Minus mit einer Länge von 3 bis 50 Zeichen möglich.',{minLength:3,maxLength:50,include:['validate-city']});;function sendCartAjaxRequest(url,action)
{var ajaxLoader='<img style="margin:50px 100px" src="/skin/frontend/default/default/images/opc-ajax-loader.gif" />';url+='isajax/1';new Ajax.Request
(url,{method:'post',onCreate:function(){$('pbclub_cart_loader').innerHTML='<div style="margin:0px 0px 10px 25px;"><img style="margin-right:5px;" alt="loader" src="/skin/frontend/dotsource/preisbock2009/images/opc-ajax-loader.gif"/>Bitte warten ...</div>';var text='';if(action=='add'){text='Produkt wird in den Warenkorb gelegt!';}else{text='Produkt wird aus dem Warenkorb entfernt!';}
loader(true,text);},onSuccess:function(transport){if(transport&&transport.responseText){$('div_cart_sidebar_main').update(transport.responseText);transport.responseText.evalScripts();}},onComplete:function(transport){loader(false);}});}
function addProductToCartAjax(url)
{sendCartAjaxRequest(url,'add');}
function deleteProductFromCartAjax(url)
{sendCartAjaxRequest(url,'delete');}
function deleteProductFromCartAjax(url,isProductViewed)
{sendCartAjaxRequest(url,'delete');if(isProductViewed){viewed_product_buyed=0;}};function check_date(_day,_month,_year,_dobHidden){var day;var month;var year;var leap=0;var err=0;err=0;if(_dobHidden==''){return true;}
day=document.getElementsByName(_day)[0].value;month=document.getElementsByName(_month)[0].value;year=document.getElementsByName(_year)[0].value;if(_dobHidden=='opt'&&day==''&&year==''&&month==''){return true;}
if(day.length!=2){day='0'+day}
if(month.length!=2){month='0'+month}
if((month<1)||(month>12)){err=21;}
if(day<1||(day>31)){err=22;}
if(year==''){err=13;}
if((year%4==0)||(year%100==0)||(year%400==0)){leap=1;}
if((month==2)&&(leap==1)&&(day>29)){err=23;}
if((month==2)&&(leap!=1)&&(day>28)){err=24;}
if((day>31)&&((month=="01")||(month=="03")||(month=="05")||(month=="07")||(month=="08")||(month=="10")||(month=="12"))){err=25;}
if((day>30)&&((month=="04")||(month=="06")||(month=="09")||(month=="11"))){err=26;}
if(err==0){return true;}
else{alert("Das von Dir eingegebene Datum ist ungültig! Bitte versuche es noch einmal.");return false;}}