function addEvents(element,eventType,lamdaFunction,useCapture){if(element.addEventListener){element.addEventListener(eventType,lamdaFunction,useCapture);return true}else if(element.attachEvent){var r=element.attachEvent('on'+eventType,lamdaFunction);return r}else{return false}}function clearDefaultText(e){var target=window.event?window.event.srcElement:e?e.target:null;if(!target){return}if(target.value==target.defaultText){target.value=''}}function replaceDefaultText(e){var target=window.event?window.event.srcElement:e?e.target:null;if(!target){return}if(target.value===''&&target.defaultText){target.value=target.defaultText}}function init(){var formInputs=document.getElementsByTagName('input');for(var i=0;i<formInputs.length;i++){var theInput=formInputs[i];if(theInput.type=='text'&&(theInput.className.match(/\bcleardefault\b/)||theInput.id.match(/\SearchForm_SearchForm_Search\b/))){addEvents(theInput,'focus',clearDefaultText,false);addEvents(theInput,'blur',replaceDefaultText,false);if(theInput.value!==''){theInput.defaultText=theInput.value}}}}DOMAssistant.DOMReady(init);function initGallery(){var objLightboxImage=document.createElement("img");objLightboxImage.setAttribute('id','gallery-preview-img');if(startingImage){objLightboxImage.setAttribute('src',startingImage)}objLightboxImage.setAttribute('height','300');objLightboxImage.setAttribute('width','400');$$("gallery-preview").appendChild(objLightboxImage);objLightboxImage=document.createElement("img");objLightboxImage.setAttribute('id','preloader-image');objLightboxImage.setAttribute('width','1');objLightboxImage.setAttribute('height','1');$$('container').appendChild(objLightboxImage);objLightboxImage=document.createElement("img");objLightboxImage.setAttribute('id','preloader-temp-image');objLightboxImage.setAttribute('width','1');objLightboxImage.setAttribute('height','1');$$('container').appendChild(objLightboxImage);objLightboxImage=document.createElement("img");objLightboxImage.setAttribute('id','temp-image');objLightboxImage.setAttribute('width','1');objLightboxImage.setAttribute('height','1');$$('container').appendChild(objLightboxImage);var objLoading=document.createElement("div");objLoading.setAttribute('id','spec-loading');$$("gallery").appendChild(objLoading);var objLoadingImage=document.createElement("p");objLoadingImage.innerHTML="Loading Image";objLoading.appendChild(objLoadingImage)}DOMAssistant.DOMReady(initGallery);function isLoading(){if(isLoadingVar=="true"){}else{$$('spec-loading').style.display="none";$$("gallery-preview").setAttribute('class',"");$$("gallery-preview").setAttribute('className',"")}}function ReplaceImage(currentClick,NewImage){$$("spec-loading").style.display='block';$$("gallery-preview").setAttribute('class',"opacity");$$("gallery-preview").setAttribute('className',"opacity");$$("gallery-inner").elmsByClass("current","a").each(function(){this.setAttribute('class','');this.setAttribute('className','')});var SetCurrentThumb=$$(currentClick);SetCurrentThumb.setAttribute('class','current');SetCurrentThumb.setAttribute('className','current');var imgContainer=$$('gallery-preview-img');TheImageTemp=new Image();TheImageTemp.onload=function(){$$('temp-image').src=NewImage;var TheImage=document.createElement('img');TheImage.onload=function(evt){imgContainer.src=this.src;isLoadingVar="false";isLoading()};TheImage.src=NewImage;TheImageTemp.onload=function(){}};TheImageTemp.src=NewImage}function preloadNext(NewImage){var imgContainer=$$('preloader-image');PreImageTemp=new Image();PreImageTemp.onload=function(){$$('preloader-temp-image').src=NewImage;var PreImage=document.createElement('img');PreImage.onload=function(evt){imgContainer.src=this.src;isLoadingVar="false";isLoading()};PreImage.src=NewImage;PreImageTemp.onload=function(){}};PreImageTemp.src=NewImage}function giftToggle(){if(this.firstChild.checked===true){$(this).addClass("checked")}else if(this.firstChild.checked===false){$(this).removeClass("checked")}}function giftInit(){$('#GiftMultiForm_GiftMultiForm_gifts li').addEvent("click",giftToggle);var checkThese=$('#GiftMultiForm_GiftMultiForm_gifts li').each(function(){if(this.firstChild.checked===true){$(this).addClass("checked")}else if(this.firstChild.checked===false){$(this).removeClass("checked")}})}