function insertZoomHTML(){var inBody=document.getElementsByTagName("body").item(0);var inSpinbox=document.createElement("div");inSpinbox.setAttribute('id','ZoomSpin');inSpinbox.style.position='absolute';inSpinbox.style.left='10px';inSpinbox.style.top='10px';inSpinbox.style.visibility='hidden';inSpinbox.style.zIndex='525';inBody.insertBefore(inSpinbox,inBody.firstChild);var inSpinImage=document.createElement("img");inSpinImage.setAttribute('id','SpinImage');inSpinImage.setAttribute('src',zoomImagesURI+'zoom-spin-1.png');inSpinbox.appendChild(inSpinImage);var inZoombox=document.createElement("div");inZoombox.setAttribute('id','ZoomBox');inZoombox.style.position='absolute';inZoombox.style.left='10px';inZoombox.style.top='10px';inZoombox.style.visibility='hidden';inZoombox.style.zIndex='499';inBody.insertBefore(inZoombox,inSpinbox.nextSibling);var inImage1=document.createElement("img");inImage1.onclick=function(event){zoomOut(this,event);return false;};inImage1.setAttribute('src',zoomImagesURI+'spacer.gif');inImage1.setAttribute('id','ZoomImage');inImage1.setAttribute('border','0');inImage1.setAttribute('style','-webkit-box-shadow: '+shadowSettings+'0.0)');inImage1.style.display='block';inImage1.style.width='10px';inImage1.style.height='10px';inImage1.style.cursor='pointer';inZoombox.appendChild(inImage1);var inClosebox=document.createElement("div");inClosebox.setAttribute('id','ZoomClose');inClosebox.style.position='absolute';if(browserIsIE){inClosebox.style.left='-1px';inClosebox.style.top='0px';}else{inClosebox.style.left='-15px';inClosebox.style.top='-15px';}
inClosebox.style.visibility='hidden';inZoombox.appendChild(inClosebox);var inImage2=document.createElement("img");inImage2.onclick=function(event){zoomOut(this,event);return false;};inImage2.setAttribute('src',zoomImagesURI+'closebox.png');inImage2.setAttribute('width','30');inImage2.setAttribute('height','30');inImage2.setAttribute('border','0');inImage2.style.cursor='pointer';inClosebox.appendChild(inImage2);if(!document.getElementById('ZoomImage').style.webkitBoxShadow&&!browserIsIE){var inFixedBox=document.createElement("div");inFixedBox.setAttribute('id','ShadowBox');inFixedBox.style.position='absolute';inFixedBox.style.left='50px';inFixedBox.style.top='50px';inFixedBox.style.width='100px';inFixedBox.style.height='100px';inFixedBox.style.visibility='hidden';inFixedBox.style.zIndex='498';inBody.insertBefore(inFixedBox,inZoombox.nextSibling);var inShadowTable=document.createElement("table");inShadowTable.setAttribute('border','0');inShadowTable.setAttribute('width','100%');inShadowTable.setAttribute('height','100%');inShadowTable.setAttribute('cellpadding','0');inShadowTable.setAttribute('cellspacing','0');inFixedBox.appendChild(inShadowTable);var inShadowTbody=document.createElement("tbody");inShadowTable.appendChild(inShadowTbody);var inRow1=document.createElement("tr");inRow1.style.height='25px';inShadowTbody.appendChild(inRow1);var inCol1=document.createElement("td");inCol1.style.width='27px';inRow1.appendChild(inCol1);var inShadowImg1=document.createElement("img");inShadowImg1.setAttribute('src',zoomImagesURI+'zoom-shadow1.png');inShadowImg1.setAttribute('width','27');inShadowImg1.setAttribute('height','25');inShadowImg1.style.display='block';inCol1.appendChild(inShadowImg1);var inCol2=document.createElement("td");inCol2.setAttribute('background',zoomImagesURI+'zoom-shadow2.png');inRow1.appendChild(inCol2);var inSpacer1=document.createElement("img");inSpacer1.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer1.setAttribute('height','1');inSpacer1.setAttribute('width','1');inSpacer1.style.display='block';inCol2.appendChild(inSpacer1);var inCol3=document.createElement("td");inCol3.style.width='27px';inRow1.appendChild(inCol3);var inShadowImg3=document.createElement("img");inShadowImg3.setAttribute('src',zoomImagesURI+'zoom-shadow3.png');inShadowImg3.setAttribute('width','27');inShadowImg3.setAttribute('height','25');inShadowImg3.style.display='block';inCol3.appendChild(inShadowImg3);inRow2=document.createElement("tr");inShadowTbody.appendChild(inRow2);var inCol4=document.createElement("td");inCol4.setAttribute('background',zoomImagesURI+'zoom-shadow4.png');inRow2.appendChild(inCol4);var inSpacer2=document.createElement("img");inSpacer2.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer2.setAttribute('height','1');inSpacer2.setAttribute('width','1');inSpacer2.style.display='block';inCol4.appendChild(inSpacer2);var inCol5=document.createElement("td");inCol5.setAttribute('bgcolor','#ffffff');inRow2.appendChild(inCol5);var inSpacer3=document.createElement("img");inSpacer3.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer3.setAttribute('height','1');inSpacer3.setAttribute('width','1');inSpacer3.style.display='block';inCol5.appendChild(inSpacer3);var inCol6=document.createElement("td");inCol6.setAttribute('background',zoomImagesURI+'zoom-shadow5.png');inRow2.appendChild(inCol6);var inSpacer4=document.createElement("img");inSpacer4.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer4.setAttribute('height','1');inSpacer4.setAttribute('width','1');inSpacer4.style.display='block';inCol6.appendChild(inSpacer4);var inRow3=document.createElement("tr");inRow3.style.height='26px';inShadowTbody.appendChild(inRow3);var inCol7=document.createElement("td");inCol7.style.width='27px';inRow3.appendChild(inCol7);var inShadowImg7=document.createElement("img");inShadowImg7.setAttribute('src',zoomImagesURI+'zoom-shadow6.png');inShadowImg7.setAttribute('width','27');inShadowImg7.setAttribute('height','26');inShadowImg7.style.display='block';inCol7.appendChild(inShadowImg7);var inCol8=document.createElement("td");inCol8.setAttribute('background',zoomImagesURI+'zoom-shadow7.png');inRow3.appendChild(inCol8);var inSpacer5=document.createElement("img");inSpacer5.setAttribute('src',zoomImagesURI+'spacer.gif');inSpacer5.setAttribute('height','1');inSpacer5.setAttribute('width','1');inSpacer5.style.display='block';inCol8.appendChild(inSpacer5);var inCol9=document.createElement("td");inCol9.style.width='27px';inRow3.appendChild(inCol9);var inShadowImg9=document.createElement("img");inShadowImg9.setAttribute('src',zoomImagesURI+'zoom-shadow8.png');inShadowImg9.setAttribute('width','27');inShadowImg9.setAttribute('height','26');inShadowImg9.style.display='block';inCol9.appendChild(inShadowImg9);}
if(includeCaption){var inCapDiv=document.createElement("div");inCapDiv.setAttribute('id','ZoomCapDiv');inCapDiv.style.position='absolute';inCapDiv.style.visibility='hidden';inCapDiv.style.marginLeft='auto';inCapDiv.style.marginRight='auto';inCapDiv.style.zIndex='501';inBody.insertBefore(inCapDiv,inZoombox.nextSibling);var inCapTable=document.createElement("table");inCapTable.setAttribute('border','0');inCapTable.setAttribute('cellPadding','0');inCapTable.setAttribute('cellSpacing','0');inCapDiv.appendChild(inCapTable);var inTbody=document.createElement("tbody");inCapTable.appendChild(inTbody);var inCapRow1=document.createElement("tr");inTbody.appendChild(inCapRow1);var inCapCol1=document.createElement("td");inCapCol1.setAttribute('align','right');inCapRow1.appendChild(inCapCol1);var inCapImg1=document.createElement("img");inCapImg1.setAttribute('src',zoomImagesURI+'zoom-caption-l.png');inCapImg1.setAttribute('width','13');inCapImg1.setAttribute('height','26');inCapImg1.style.display='block';inCapCol1.appendChild(inCapImg1);var inCapCol2=document.createElement("td");inCapCol2.setAttribute('background',zoomImagesURI+'zoom-caption-fill.png');inCapCol2.setAttribute('id','ZoomCaption');inCapCol2.setAttribute('valign','middle');inCapCol2.style.fontSize='14px';inCapCol2.style.fontFamily='Helvetica';inCapCol2.style.fontWeight='bold';inCapCol2.style.color='#ffffff';inCapCol2.style.textShadow='0px 2px 4px #000000';inCapCol2.style.whiteSpace='nowrap';inCapRow1.appendChild(inCapCol2);var inCapCol3=document.createElement("td");inCapRow1.appendChild(inCapCol3);var inCapImg2=document.createElement("img");inCapImg2.setAttribute('src',zoomImagesURI+'zoom-caption-r.png');inCapImg2.setAttribute('width','13');inCapImg2.setAttribute('height','26');inCapImg2.style.display='block';inCapCol3.appendChild(inCapImg2);}};Carousel=Class.create(Abstract,{initialize:function(scroller,slides,controls,options){this.scrolling=false;this.scroller=$(scroller);this.slides=slides;this.controls=controls;this.options=Object.extend({duration:40,auto:true,frequency:3,visibleSlides:1,controlClassName:'carousel-control',jumperClassName:'carousel-jumper',disabledClassName:'carousel-disabled',selectedClassName:'carousel-selected',circular:true,wheel:true,effect:'scroll',transition:'sinoidal'},options||{});if(this.options.effect=='fade'){this.options.circular=true;}
this.slides.each(function(slide,index){slide._index=index;});if(this.controls){this.controls.invoke('observe','click',this.click.bind(this));}
if(this.options.wheel){this.scroller.observe('mousewheel',this.wheel.bindAsEventListener(this)).observe('DOMMouseScroll',this.wheel.bindAsEventListener(this));;}
if(this.options.auto){this.start();}
if(this.options.initial){var initialIndex=this.slides.indexOf($(this.options.initial));if(initialIndex>(this.options.visibleSlides-1)&&this.options.visibleSlides>1){if(initialIndex>this.slides.length-(this.options.visibleSlides+1)){initialIndex=this.slides.length-this.options.visibleSlides;}}
this.moveTo(this.slides[initialIndex]);}},click:function(event){this.stop();var element=event.findElement('a');if(!element.hasClassName(this.options.disabledClassName)){if(element.hasClassName(this.options.controlClassName)){eval("this."+element.rel+"()");}else if(element.hasClassName(this.options.jumperClassName)){this.moveTo(element.rel);if(this.options.selectedClassName){this.controls.invoke('removeClassName',this.options.selectedClassName);element.addClassName(this.options.selectedClassName);}}}
this.deactivateControls();event.stop();},moveTo:function(element){if(this.options.beforeMove&&(typeof this.options.beforeMove=='function')){this.options.beforeMove();}
this.previous=this.current?this.current:this.slides[0];this.current=$(element);var scrollerOffset=this.scroller.cumulativeOffset();var elementOffset=this.current.cumulativeOffset();if(this.scrolling){this.scrolling.cancel();}
switch(this.options.effect){case'fade':this.scrolling=new Effect.Opacity(this.scroller,{from:1.0,to:0,duration:this.options.duration,afterFinish:(function(){this.scroller.scrollLeft=elementOffset[0]-scrollerOffset[0];this.scroller.scrollTop=elementOffset[1]-scrollerOffset[1];new Effect.Opacity(this.scroller,{from:0,to:1.0,duration:this.options.duration,afterFinish:(function(){if(this.controls){this.activateControls();}
if(this.options.afterMove&&(typeof this.options.afterMove=='function')){this.options.afterMove();}}).bind(this)});}).bind(this)});break;case'scroll':default:var transition;switch(this.options.transition){case'spring':transition=Effect.Transitions.spring;break;case'sinoidal':default:transition=Effect.Transitions.sinoidal;break;}
this.scrolling=new Effect.SmoothScroll(this.scroller,{duration:this.options.duration,x:(elementOffset[0]-scrollerOffset[0]),y:(elementOffset[1]-scrollerOffset[1]),transition:transition,afterFinish:(function(){if(this.controls){this.activateControls();}
if(this.options.afterMove&&(typeof this.options.afterMove=='function')){this.options.afterMove();}
this.scrolling=false;}).bind(this)});break;}
return false;},prev:function(){if(this.current){var currentIndex=this.current._index;var prevIndex=(currentIndex==0)?(this.options.circular?this.slides.length-1:0):currentIndex-1;}else{var prevIndex=(this.options.circular?this.slides.length-1:0);}
if(prevIndex==(this.slides.length-1)&&this.options.circular&&this.options.effect!='fade'){this.scroller.scrollLeft=(this.slides.length-1)*this.slides.first().getWidth();this.scroller.scrollTop=(this.slides.length-1)*this.slides.first().getHeight();prevIndex=this.slides.length-2;}
this.moveTo(this.slides[prevIndex]);},next:function(){if(this.current){var currentIndex=this.current._index;var nextIndex=(this.slides.length-1==currentIndex)?(this.options.circular?0:currentIndex):currentIndex+1;}else{var nextIndex=1;}
if(nextIndex==0&&this.options.circular&&this.options.effect!='fade'){this.scroller.scrollLeft=0;this.scroller.scrollTop=0;nextIndex=1;}
if(nextIndex>this.slides.length-(this.options.visibleSlides+1)){nextIndex=this.slides.length-this.options.visibleSlides;}
this.moveTo(this.slides[nextIndex]);},first:function(){this.moveTo(this.slides[0]);},last:function(){this.moveTo(this.slides[this.slides.length-1]);},toggle:function(){if(this.previous){this.moveTo(this.slides[this.previous._index]);}else{return false;}},stop:function(){if(this.timer){clearTimeout(this.timer);}},start:function(){this.periodicallyUpdate();},pause:function(){this.stop();this.activateControls();},resume:function(event){if(event){var related=event.relatedTarget||event.toElement;if(!related||(!this.slides.include(related)&&!this.slides.any(function(slide){return related.descendantOf(slide);}))){this.start();}}else{this.start();}},periodicallyUpdate:function(){if(this.timer!=null){clearTimeout(this.timer);this.next();}
this.timer=setTimeout(this.periodicallyUpdate.bind(this),this.options.frequency*1000);},wheel:function(event){event.cancelBubble=true;event.stop();var delta=0;if(!event){event=window.event;}
if(event.wheelDelta){delta=event.wheelDelta/120;}else if(event.detail){delta=-event.detail/3;}
if(!this.scrolling){this.deactivateControls();if(delta>0){this.prev();}else{this.next();}}
return Math.round(delta);},deactivateControls:function(){this.controls.invoke('addClassName',this.options.disabledClassName);},activateControls:function(){this.controls.invoke('removeClassName',this.options.disabledClassName);}});Effect.SmoothScroll=Class.create();Object.extend(Object.extend(Effect.SmoothScroll.prototype,Effect.Base.prototype),{initialize:function(element){this.element=$(element);var options=Object.extend({x:0,y:0,mode:'absolute'},arguments[1]||{});this.start(options);},setup:function(){if(this.options.continuous&&!this.element._ext){this.element.cleanWhitespace();this.element._ext=true;this.element.appendChild(this.element.firstChild);}
this.originalLeft=this.element.scrollLeft;this.originalTop=this.element.scrollTop;if(this.options.mode=='absolute'){this.options.x-=this.originalLeft;this.options.y-=this.originalTop;}},update:function(position){this.element.scrollLeft=this.options.x*position+this.originalLeft;this.element.scrollTop=this.options.y*position+this.originalTop;}});;function validateCreditCard(s){var v="0123456789";var w="";for(i=0;i<s.length;i++){x=s.charAt(i);if(v.indexOf(x,0)!=-1)
w+=x;}
j=w.length/2;k=Math.floor(j);m=Math.ceil(j)-k;c=0;for(i=0;i<k;i++){a=w.charAt(i*2+m)*2;c+=a>9?Math.floor(a/10+a%10):a;}
for(i=0;i<k+m;i++)c+=w.charAt(i*2+1-m)*1;return(c%10==0);}
