function togglefaqs(faqid){if(document.getElementById('faq-'+faqid).className=='faqs'){document.getElementById('cat-'+faqid).className='faq-category-active';document.getElementById('faq-'+faqid).className='faqs-active';}else{document.getElementById('cat-'+faqid).className='faq-category';document.getElementById('faq-'+faqid).className='faqs';}}
function send_form(formid,replaceid){var url='/shop/ajax_forms.php';new Ajax.Updater(replaceid,url,{method:'post',parameters:$(formid).serialize(true),onUninitialized:$(replaceid).innerHTML='<img src="/images/loading.gif" class="loading" alt="loading" />',evalScripts:true});}
function hideall(){for(i=0;i<topnodes.length;i++){if(document.getElementById('subnavigation-node-'+topnodes[i])){document.getElementById('subnavigation-node-'+topnodes[i]).className='subnavigation-node-invisible';}}}function showsubnavigation(nodeid){if(document.getElementById('subnavigation-node-'+nodeid)){document.getElementById('subnavigation-node-'+nodeid).className='subnavigation-node-visible';}}function hidesubnavigation(nodeid){if(document.getElementById('subnavigation-node-'+nodeid)){document.getElementById('subnavigation-node-'+nodeid).className='subnavigation-node-invisible';}}
function togglecriterion(criterionid){if(document.getElementById('crit-'+criterionid).className=='criterion-info'){document.getElementById('crit-'+criterionid).className='criterion-info-active';document.getElementById('info-'+criterionid).className='info-active';}else{document.getElementById('crit-'+criterionid).className='criterion-info';document.getElementById('info-'+criterionid).className='info';}}function toggleoptions(productid){if(document.getElementById('productselection-options-'+lastopened)){document.getElementById('productselection-options-'+lastopened).style.display='none';}if(document.getElementById('productselection-options-'+productid)){document.getElementById('productselection-options-'+productid).style.display='block';}lastopened=productid;}function showconfirmationbox(productid,optionid,text){if(document.getElementById('option-'+productid+'-'+optionid).checked==true){if(confirm(text)){acceptoptionconfirmation(productid,optionid);}else{declineoptionconfirmation(productid,optionid);}}}function declineoptionconfirmation(productid,optionid){if(document.getElementById('options-confirmation-'+productid+'-'+optionid)){document.getElementById('options-confirmation-'+productid+'-'+optionid).style.display='none';}document.getElementById('option-'+productid+'-'+optionid).checked=false;}function acceptoptionconfirmation(productid,optionid){if(document.getElementById('options-confirmation-'+productid+'-'+optionid)){document.getElementById('options-confirmation-'+productid+'-'+optionid).style.display='none';}document.getElementById('option-'+productid+'-'+optionid).checked=true;}
var currentimage=null;var currenttransition=null;function rupImage(id,url,subline,listener,callback){this.image=new Image();this.image.owner=this;this.loaded=false;this.id=id;this.url=url;this.subline=subline;this.listener=listener;this.callback=callback;this.image.onload=function(){currentimage.loaded=true;currentimage.listener[currentimage.callback](currentimage.id);currentimage=null;};this.image.onerror=this.image.onload;this.load=function(){if(currentimage==null){currentimage=this;this.image.src=this.url;}};}function rupTransition(containera,containerb,fadetime,listener,callback){this.containera=containera;this.containerb=containerb;this.fadetime=Math.max(Math.round(fadetime/100),10);this.fadestep=1/this.fadetime;this.listener=listener;this.callback=callback;this.setOpacity=function(container,value){container.opacity=value;var percent=Math.round(value*100);with(container.style){opacity=value;MozOpacity=value;KhtmlOpacity=value;filter="alpha(opacity="+percent+")";};};this.fade=function(){if(currenttransition!=null){var bopacity=parseFloat(this.containerb.opacity);if(bopacity<1){var nextbopacity=bopacity+this.fadestep;if(nextbopacity>1)nextbopacity=1;this.setOpacity(this.containerb,nextbopacity);setTimeout("currenttransition.fade();",this.fadetime);}else{currenttransition=null;this.listener[this.callback](this.id);}}};}function rupGallery(){this.images=new Array();this.imagecontainers=new Array();this.currentimage=0;this.currentcontainer=0;this.depth=100;this.fadetime=1500;this.setImageContainers=function(imagecontainers){this.imagecontainers=imagecontainers;};this.setSublineContainer=function(sublinecontainer){this.sublinecontainer=sublinecontainer;};this.setNumberOfContainer=function(numberofcontainer){this.numberofcontainer=numberofcontainer;};this.addImage=function(url,subline){this.images.push(new rupImage(this.images.length,url,subline,this,"showImage"));};this.showImage=function(index){if(currenttransition==null&&this.images[index]&&this.imagecontainers[this.currentcontainer]){if(!this.images[index].loaded)this.images[index].load();else{var containera=this.imagecontainers[this.currentcontainer];this.currentcontainer=(this.currentcontainer+1)%this.imagecontainers.length;var containerb=this.imagecontainers[this.currentcontainer];containera.style.zIndex=this.depth+1;containerb.style.zIndex=this.depth;currenttransition=new rupTransition(containera,containerb,this.fadetime,this,"endFade");currenttransition.setOpacity(containerb,0);containerb.firstChild.src=this.images[index].url;containerb.style.zIndex=this.depth+2;currenttransition.fade();}}};this.endFade=function(){if(this.numberofcontainer)this.numberofcontainer.innerHTML=(this.currentimage+1)+"/"+this.images.length;if(this.sublinecontainer)this.sublinecontainer.innerHTML=this.images[this.currentimage].subline;};this.previousImage=function(){var previmage=this.currentimage-1;if(previmage<0)previmage+=this.images.length;this.currentimage=previmage;this.showImage(this.currentimage);};this.nextImage=function(){this.currentimage=(this.currentimage+1)%this.images.length;this.showImage(this.currentimage);};}
function toggledomaininfo(domainid){if(document.getElementById('domain-'+domainid).className=='domain-info'){document.getElementById('domain-'+domainid).className='domain-info-active';document.getElementById('info-'+domainid).className='info-active';}else{document.getElementById('domain-'+domainid).className='domain-info';document.getElementById('info-'+domainid).className='info';}}function toggleproductinfo(productid){if(document.getElementById('product-'+productid).className=='product-info'){document.getElementById('product-'+productid).className='product-info-active';document.getElementById('info-'+productid).className='info-active';}else{document.getElementById('product-'+productid).className='product-info';document.getElementById('info-'+productid).className='info';}}function togglepayment(paymentmethod){if(document.getElementById('payment-'+lastopened)){document.getElementById('payment-'+lastopened).style.display='none';}if(document.getElementById('payment-'+paymentmethod)){document.getElementById('payment-'+paymentmethod).style.display='block';}lastopened=paymentmethod;}function toggledomainrow(shorttld,classname,setactive){if(setactive){document.getElementById('domainresults-row-'+activedomain).className='domainresults-'+activeclassname;}if(document.getElementById('domainresults-row-'+shorttld).className!='domainresults-active'||shorttld==activedomain||setactive){document.getElementById('domainresults-row-'+shorttld).className='domainresults-active';}else{document.getElementById('domainresults-row-'+shorttld).className='domainresults-'+classname;}if(setactive){activedomain=shorttld;activeclassname=classname;}}function toggleproductrow(productid,classname,setactive){if(setactive){document.getElementById('productselection-row-'+activeproductid).className='domainresults-'+activeclassname;}if(document.getElementById('productselection-row-'+productid).className!='productselection-active'||productid==activeproductid||setactive){document.getElementById('productselection-row-'+productid).className='productselection-active';}else{document.getElementById('productselection-row-'+productid).className='productselection-'+classname;}if(setactive){activeproductid=productid;activeclassname=classname;}}function toggledomaindata(domain){if(document.getElementById('domaindata-'+domain).style.display=='none'){document.getElementById('domaindata-'+domain).style.display='block';}else{document.getElementById('domaindata-'+domain).style.display='none';}}function check_javascript(){new Ajax.Request('/shop/ajax_javascriptcheck.php');}function get_domain_status(domain,tld,server,service,shortdomain,domaincount){var shorttld=tld.substr(1);new Ajax.Request('/shop/ajax_domaincheck.php',{method:'get',parameters:{domain:domain,tld:shorttld,server:server,service:service},onSuccess:function(transport){var response=transport.responseText||'error';if(response==1){$('domain-left-loading-'+shortdomain).className='display-none';$('domain-left-free-'+shortdomain).className='display';$('domain-main-free-'+shortdomain).className='display';if(domaincount==0){document.domain_selected.domain[0].checked=true;$('domainresults-row-'+shortdomain).className='domainresults-active';}}else if(response==0){$('domain-left-loading-'+shortdomain).className='display-none';$('domain-left-registered-'+shortdomain).className='display';$('domain-main-registered-'+shortdomain).className='display';if(domaincount==0){document.domain_selected.domain[1].checked=true;$('domainresults-row-'+shortdomain).className='domainresults-active';}}else{$('domain-left-loading-'+shortdomain).className='display-none';$('domain-left-registered-'+shortdomain).className='display';$('domain-main-error-'+shortdomain).className='display';}}});}