var send_Form=new Class({Implements:Options,options:{url:"",Replyto:"",Success:"",the_el:"",use_waiter:true},initialize:function(options){this.setOptions(options)},send_the_Form:function(){var use_waiter=this.options.use_waiter;var reply_to=this.options.Replyto;var if_successful=this.options.Success;var the_el=this.options.the_el;var request=new Request({url:this.options.url,method:'post',evalScripts:true,onRequest:function(){if(use_waiter)document.id(reply_to).wait()},onSuccess:function(){var myString=request.response.text;if(use_waiter)document.id(reply_to).release();if($defined(document.id(reply_to)))document.id(reply_to).set('html',myString);if(if_successful=='new_tipz'){if($defined($$('.custom_tip'))){tips()}}if(if_successful=='delete'){if($defined(document.id('total_images'))){countit=document.id('total_images').get('html');var the_count=countit-1;document.id('total_images').set('html',the_count)}if($defined(document.id('row'+the_el)))document.id('row'+the_el).dispose();if($defined(document.id('row_'+the_el)))document.id('row_'+the_el).dispose()}},onFailure:function(){document.id(this.options.Replyto.id).set('html','OOPS something went wrong.')}}).send()}});function toggle_inch_or_cm(the_val){if(the_val=='cm'){$$('.cm').setStyle('visibility','hidden');$$('.cm').setStyle('display','none');$$('.cma').setStyle('font-weight','normal');$$('.inches').setStyle('visibility','visible');$$('.inches').setStyle('display','inline');$$('.inchesa').setStyle('font-weight','bold')}if(the_val=='inches'){$$('.inches').setStyle('visibility','hidden');$$('.inches').setStyle('display','none');$$('.inchesa').setStyle('font-weight','normal');$$('.cm').setStyle('visibility','visible');$$('.cm').setStyle('display','inline');$$('.cma').setStyle('font-weight','bold')}}var better_tips=new Class({Implements:Options,options:{template:"",template_name:'cloud_talk',the_el:""},initialize:function(options){this.setOptions(options)},tipit:function(){var the_template=this.options.template;var the_el=this.options.the_el;var the_template_name=this.options.template_name;var the_pos=the_el.getPosition();var the_el_size=the_el.getSize();var the_tip=the_el.getProperty('rel');var myTag=the_el.getFirst().get('tag');var the_id=the_el.getFirst().get('alt');if($defined($(the_id)))the_tip=$(the_id).get('html');if($chk(the_el.getProperty('title')))var the_tip_image=the_el.getProperty('title');var the_tip_text=new Element('div',{'class':'tip-text','html':the_tip});if($chk(the_el.getProperty('title')))var the_tip_title=new Element('div',{'class':'tip-title','html':the_tip_image});var childs=$G($$(the_template).getElements('div'));childs.each(function(er,index){var image_size=Array();if(er.hasClass('tip')){var childs2=$G(er.getElements('div'));childs.each(function(ed,index){if(ed.hasClass('tip-text')||ed.hasClass('tip-title'))ed.destroy();the_tip_text.inject(er);if($chk(the_el.getProperty('title')))the_tip_title.inject(er);$$(the_template).setStyle('visibility','visible');$$(the_template).setStyle('display','block');if($chk(the_el.getProperty('title'))){image_size=document.body.getElementById('tip_image').getSize()}else{image_size.x='0';image_size.y='0'}var window_size=window.getSize();$$('.tip-title').setStyle('width',image_size.x);if(!$chk(the_el.getProperty('title'))){if(ed.hasClass('tip-bottom')){cloud_talk_size=the_tip_text.getSize();if((cloud_talk_size.x+the_pos.x)>window_size.x){ed.setStyle('background','url(templates/white/images/cloud_talk_bottom_b.gif) left bottom no-repeat')}else{ed.setStyle('background','url(templates/white/images/cloud_talk_bottom.gif) left bottom no-repeat')}}}})}});var window_size=window.getSize();if(!$chk(the_el.getProperty('title'))){if((cloud_talk_size.x+the_pos.x)>window_size.x){var mor_left=cloud_talk_size.x-40;$$('.cloud_talk').setPosition({relativeTo:$(the_el),position:'upperRight',edge:'bottomLeft',offset:{x:-mor_left,y:-5}})}else{$$('.cloud_talk').setPosition({relativeTo:$(the_el),position:'upperRight',edge:'bottomLeft',offset:{x:-50,y:-5}})}}else{var the_left=the_pos.x+the_el_size.x+16;$$(the_template).setPosition({relativeTo:$(the_el),position:'centerRight',edge:'Left',offset:{x:10,y:0}});if((the_left+image_size.x)>window_size.x){$$(the_template).setPosition({relativeTo:$(the_el),position:'centerLeft',edge:'Right',offset:{x:-10,y:0}})}}}});var SimpleSelectStyle=new Class({Implements:Options,options:{select_class:'',form_id:'',left_padding:3},initialize:function(options){this.setOptions(options);if($chk(this.options.select_class)){var selects=$$('select');selects.each(function(er,index){this.style_selects(er,index)}.bind(this))}},style_selects:function(select_el,index){var imgProps=select_el.getProperty('multiple');if(imgProps)select_el.setStyle('background-color','#cccccc');if(!imgProps){var select_el_width=select_el.getSize().x;var select_el_span_name=select_el.get('name')+'_span'+index;if(!$defined($(select_el_span_name))){var value=select_el.getFirst().get('value');var text=select_el.getFirst().get('text');if(select_el_width!=0){select_el.getElements('option').each(function(o){if(o.selected==true){value=o.get('value');text=o.get('text')}});var span=new Element('span').set('text',text).setProperty('id',select_el_span_name).inject(select_el,'before').setStyles({'width':select_el_width-this.options.left_padding,'display':'inline-block','position':'relative','padding-left':this.options.left_padding,'background':'#cccccc url(templates/white/images/selectbg_arrow.gif) no-repeat bottom right','border':'1px solid #000000','text-align':'left','padding':'1px','height':'16px'});select_el.addClass('listdata').setProperty('size',1).setStyles({'width':select_el_width+2,'opacity':.01,'display':'inline-block','position':'relative','margin-left':-(select_el_width+2)}).addEvent('change',function(){span.set('text',this.options[this.options.selectedIndex].get('text'))})}}}}});window.addEvent('domready',function(){var isIE6=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("msie 7")==-1;if(isIE6){var aTmp2,i,j,oLI,aUL,aA;var aTmp=$$('ul.art-menu','ul.Control-menu');aTmp.each(function(er,index){var the_class=er.get('class');aTmp2=er.getElements('li');aTmp2.each(function(es,index2){oLI=aTmp2[index2];aUL=es.getElements('ul');if(aUL&&aUL.length){oLI.UL=aUL[0];aA=oLI.getElements('a');if(aA&&aA.length)oLI.A=aA[0];oLI.addEvent('mouseenter',function(el){this.set('class',the_class+'hover');this.UL.className+=" "+the_class+"hoverUL";if(this.A)this.A.className+=" "+the_class+"hoverA"});oLI.addEvent('mouseleave',function(el){this.className=this.className.replace(the_class+"hover","");this.UL.className=this.UL.className.replace(the_class+"hoverUL","");if(this.A)this.A.className=this.A.className.replace(the_class+"hoverA","")})}})})}var myURI=window.location;var drop_select_style=new SimpleSelectStyle({select_class:'select1'});if($defined($$('.DatePicker'))){$$('.DatePicker').each(function(el,index){var the_id=el.get('id');new DatePicker(the_id,{format:'%Y-%m-%d'})})}if($defined($$('.style_table'))){$$('.style_table').setStyle('border','none');var children=$$('.style_table tbody tr');children.each(function(el,index){var tds=el.getChildren('td');tds.each(function(ep,index){if(ep.hasClass('td')){if(index==0)ep.setStyle('border-left','1px solid')}ep.setStyle('border-color','#999999')})})}var toolTips2=new Tips({className:'cloud_talk',offsets:{'x':16,'y':16},hideDelay:100});var toolTips=new Tips($$('.product_image'),{className:'custom_tip',offsets:{'x':16,'y':-16},hideDelay:100});if($defined($('station'))){$('station').addEvent('click',function(el){if($('station').getProperty('checked')==true){$('firstname').setProperty('value',$('shipping_firstname').getProperty('value'));$('lastname').setProperty('value',$('shipping_lastname').getProperty('value'));$('address').setProperty('value',$('shipping_address').getProperty('value'));$('city').setProperty('value',$('shipping_city').getProperty('value'));$('state').setProperty('value',$('shipping_state').getProperty('value'));$('postcode').setProperty('value',$('shipping_postcode').getProperty('value'));$('phone').setProperty('value',$('shipping_phone').getProperty('value'));$('email').setProperty('value',$('shipping_email').getProperty('value'));$('email_again').setProperty('value',$('shipping_email').getProperty('value'));$('company').setProperty('value',$('shipping_company').getProperty('value'));var children=$('country').getChildren('option');children.each(function(el,index){if(el.get('value')==$('shipping_country').getProperty('value'))el.selected=true})}})}if($defined($('postage_type'))){if($('postage_type').hasClass('courier_alert'))new StickyWin.Alert("courier postage","You have chosen courier as your delivery option.<br/>Please <b>DO NOT</b> enter a P.O. Box as your delivery address.<br/>You <b>MUST</b> enter a street address as our couriers can not deliver to a P.O. Box and your order will be delayed",{uiOptions:{width:500}})}if($defined($('no_agree'))){$('no_agree').addEvent('click',function(el){new StickyWin.Alert("terms and conditions","You must agree to the terms and conditions to proceed with this order",{uiOptions:{width:500}})})}$$('.product_image').each(function(el){var image=el.get('src').replace(/small/,"middle");var alt=el.get('alt');el.store('tip:title','<img src="'+image+'" />');if(alt!=null)el.store('tip:text','<span class="tip-text-span">'+alt+'</span>');toolTips.attach(el);toolTips.addEvent('show',function(tip,ep){var image_size=tip.getFirst().getNext().getFirst().getFirst().getDimensions();tip.setStyle('width',image_size.width+20)})});$$('a').addEvent('mouseover',function(el){if($defined(this.getFirst()))var check=this.getFirst().get('name');if(this.getProperty('name')=='tipper'){var the_template=$$('.cloud_talk');if(this.hasClass('product_tips'))the_template=$$('.custom_tip');var deans_tips=new better_tips({template:the_template,template_name:'cloud_talk',the_el:this});deans_tips.tipit()}});$$('a').addEvent('click',function(el){if($defined(this.getFirst())){var check=this.getFirst().get('name');if(this.get('tag')=='a'&&(this.hasClass('copyright')||this.hasClass('order_notes'))&&check!='help_button'){var the_caption=this.get('class').replace("_"," ");if(this.hasClass('copyright'))the_caption='copyright information';el=new Event(el).stop();new StickyWin.Modal.Ajax({url:this.get('href'),wrapWithUi:true,caption:the_caption,uiOptions:{width:'600px'}}).update()}}});$$('a').addEvent('mouseout',function(el){if(this.getProperty('name')=='tipper'){var the_template=$$('.cloud_talk');if(this.hasClass('product_tips'))the_template=$$('.custom_tip');$$(the_template).setStyle('visibility','hidden');$$(the_template).setStyle('display','none')}});if($defined($('show_currency')))$('show_currency').addEvent('click',function(el){var currency=new Fx.Reveal($('currency_table'));currency.toggle();var drop_select_style=new SimpleSelectStyle({select_class:'select1'})});if($defined($('currencyFrm'))&&$defined($('currency_result'))){new Fupdate($('currencyFrm'),$('currency_result'),{resetForm:false})}if($defined($$('.toggle_inch_cm'))){var toggle_inch_cm=Cookie.read('toggle_inch_cm');if(toggle_inch_cm){toggle_inch_or_cm(toggle_inch_cm)}else{var setmyCookie=Cookie.write('toggle_inch_cm','inches',{duration:365});toggle_inch_or_cm('inches')}$$('.toggle_inch_cm').each(function(eb){var toggle_print_sizes=eb.getChildren('a');toggle_print_sizes.each(function(el){el.addEvent('click',function(er){er=new Event(er).stop();var the_val=this.get('href');var setmyCookie=Cookie.write('toggle_inch_cm',the_val,{duration:365});toggle_inch_or_cm(the_val)})})})}if($defined($$('.column'))){var maxHeight=0;var counter=0;var row=0;$$('.column').each(function(el,index){var size=el.getSize();var divHeight=size.y;maxHeight=Math.max(maxHeight,divHeight);counter++;el.removeClass('column');el.addClass('row'+row);if(counter==2){counter=0;$$('.row'+row).setStyle('height',maxHeight);row++;maxHeight=0}})}$$('.modal','#redeem_gift_vouchers','#redeem_gift_vouchers1').addEvent('click',function(el){el=new Event(el).stop();new StickyWin.Modal.Ajax({url:this.get('href'),wrapWithUi:true,caption:this.get('rel'),uiOptions:{width:'600px'},destroyOnClose:true}).update()});if($defined(document.id('wildfire')))document.id('wildfire').addEvent('click',function(el){var the_id=document.id('id').get('value');var image_id=document.id('image_name'+the_id).get('value');var image=document.id('product_image_'+image_id).get('src');var pconf={CID:'Large_'+the_id,advancedTracking:'true',defaultContent:'<a href="'+myURI+'" target="new"><img src="http://www.buyaphoto.net/'+image+'" border="0" alt="Buyaphoto image"><\/a><br/><a href="'+myURI+'" target="new">Buyaphoto.net<\/a>',UIConfig:'<config><display showEmail="true" useTransitions="true" showBookmark="true" networksWithCodeBox=""><\/display><body corner-roundness="8;8;8;8"><background frame-color="Transparent" gradient-color-begin="#404040" gradient-color-end="#404040"><\/background><controls bold="true"><snbuttons type="textUnder" frame-color="#000000" background-color="" over-background-color="#FFFFFF" color="#CACACA" corner-roundness="0;8;8;8" gradient-color-begin="#8A8A8A" gradient-color-end="#000000" font="Arial" bold="false" over-gradient-color-begin="#AAAAAA" over-gradient-color-end="#000000" over-color="#F4F4F4" down-color="#000000"><more frame-color="Transparent"><\/more><\/snbuttons><textboxes frame-color="#000000" color="#AAAAAA" corner-roundness="0;0;0;0" gradient-color-begin="#202020" gradient-color-end="#0B0B0B" font="Arial" bold="false"><codeboxes color="#EAEAEA" frame-color="#8A8A8A" gradient-color-begin="#000000"><\/codeboxes><inputs frame-color="#6D0000"><\/inputs><dropdowns frame-color="#6D0000" handle-gradient-color-begin="#B60000" handle-gradient-color-end="#6D0000" handle-over-gradient-color-begin="#FF0000" handle-over-gradient-color-end="#DA0000" handle-down-gradient-color-begin="#FF0000" handle-down-gradient-color-end="#6D0000" background-color="#6D0000" gradient-color-begin="#000000"><\/dropdowns><\/textboxes><buttons frame-color="#000000" gradient-color-begin="#000000" gradient-color-end="#757575" color="#F4F4F4" corner-roundness="0;8;8;8" font="Arial" size="10" bold="false" down-frame-color="#000000" over-gradient-color-begin="#F4F4F4" down-gradient-color-begin="#910000" over-gradient-color-end="#555555" down-gradient-color-end="#FF0000" over-color="#000000"><\/buttons><listboxes corner-roundness="5;5;5;5"><\/listboxes><servicemarker gradient-color-begin="#000000" gradient-color-end="#000000"><\/servicemarker><\/controls><texts color="#FFFFFF" font="Arial" size="10"><privacy color="#959595" size="11"><\/privacy><headers size="11" bold="true"><\/headers><labels size="11" bold="true"><\/labels><messages color="#D5D5D5" frame-thickness="0" corner-roundness="0;0;0;0" gradient-color-begin="#B60000" gradient-color-end="#000000" size="11" bold="true"><\/messages><links color="#DFDFDF" underline="false" size="11" bold="true" over-color="#FFFFFF" down-color="#F4F4F4"><\/links><\/texts><\/body><\/config>'};Wildfire.initPost('258701','divWildfirePost',500,300,pconf)});$$('form').each(function(ec){if(ec.hasClass('add_to_basket')){var the_id=ec.id.value;new Fupdate(document.id(ec),document.id('basket_contents'),{resetForm:false,emulation:true,onSend:function(){var the_name=document.id('image_name'+the_id).get('value');fly_to_basket('product_image_'+the_name)},onComplete:function(){enable_reset();if(ec.get('name')=='add_to_basket_warnproportion'){new StickyWin.Confirm("This image is out of proportion","This image is out of proportion and will not fit the paper size correctly.<br/>For more information about this please click the OK button or to ignore the warning click the Cancel button.",{uiOptions:{width:'600px'},onConfirm:function(){new StickyWin.Modal.Ajax({url:'./?task=main&object=faq&action=printme_show_faq&id=24',wrapWithUi:true,caption:'How will my photo look when printed ?',uiOptions:{width:'600px'}}).update()}})}}})}if(ec.hasClass('form_check')){var form_check=new FormValidator.Inline(ec.get('id'),{scrollToErrorsOnSubmit:false});if($defined($('payment_type'))&&$defined($('payment_helper'))){$('payment_type').addEvent('change',function(el){var payment_helper=new Fx.Reveal($('payment_helper'));var the_selected=$('payment_type').getSelected().get('value');if(the_selected==6)alert('Warning You have chosen payment as collected in house');if(the_selected==1){payment_helper.reveal();var drop_select_style=new SimpleSelectStyle({select_class:'select1'});$('order_type4').addClass('validate-custom-required emptyValue:"null"');form_check.enforceField($('order_type4'))}else{if($('order_type4').hasClass('validate-custom-required emptyValue:"null"'))$('order_type4').removeClass('validate-custom-required emptyValue:"null"');form_check.ignoreField($('order_type4'));payment_helper.dissolve()}})}if($defined($('select_card'))){var images=['card_logos/card_sm_visa_csc.gif','card_logos/card_sm_masterc_csc.gif','card_logos/card_sm_amex_csc.gif','card_logos/blank.gif'];var loader=new Asset.images(images);var thecontents=new Array();thecontents[1]=' The 3 digits after the card number on the signature panel of your card.';thecontents[2]=' The 4-digit number on the right and above the embossed card number.    ';$('select_card').addEvent('change',function(el){var the_selected=$('select_card').getSelected().get('value');form_check.enforceField($('cvctext'));if(the_selected=='Visa'){$('pic').setProperty('src','card_logos/card_sm_visa_csc.gif');$('cvctext').set('text',thecontents[1])}if(the_selected=='Mastercard'){$('pic').setProperty('src','card_logos/card_sm_masterc_csc.gif');$('cvctext').set('text',thecontents[1])}if(the_selected=='Amex'){$('pic').setProperty('src','card_logos/card_sm_amex_csc.gif');$('cvctext').set('text',thecontents[2])}if(the_selected=='Dinersclub'){$('pic').setProperty('src','card_logos/blank.gif');form_check.ignoreField($('cvctext'));$('CardSecurityCode').setStyle('visibility','hidden');$$('.chk1').setStyle('visibility','hidden')}else{$('CardSecurityCode').setStyle('visibility','visible');$$('.chk1').setStyle('visibility','visible')}})}}if(ec.hasClass('Buyaphoto_paypal_form'))ec.submit()});if($defined(document.id('reset_basket')))enable_reset();if($defined(document.id('currency_frame')))new Collapsable($('show_currency'),$('currency_frame'))});function enable_reset(){if($defined(document.id('reset_basket')))$$('#remove_vouchers, #remove_vouchers1, #reset_basket').addEvent('click',function(el){el=new Event(el).stop();var to_send=new send_Form({url:this.href,use_waiter:true,Replyto:document.id('basket_contents')});if(this.id=="reset_basket"){new StickyWin.Confirm("Please confirm","Are you sure you want to reset your shopping basket?<br/>Clicking OK will remove all products from your basket.",{uiOptions:{width:'600px'},onConfirm:function(){to_send.send_the_Form()}})}else{to_send.send_the_Form()}})}function fly_to_basket(image){var perent=document.id(image).getParent('td');var image_src=document.id(image).getProperty('src');var the_pos=document.id(image).getPosition();var image2=new Element('img',{'src':image_src});image2.inject(document.body);document.id(image2).setStyles({position:'absolute',top:the_pos.y,left:the_pos.x});var basket_contentsEffects=new Fx.Morph(document.id(image2),{duration:1000,transition:Fx.Transitions.Sine.easeOut,onComplete:function(){document.id(image2).destroy()}});var blob=new Fx.Move(document.id(image2),{relativeTo:document.id('basket_contents'),position:'upperLeft',transition:Fx.Transitions.Elastic.easeOut,duration:'long',onComplete:function(){basket_contentsEffects.start({'height':0,'width':0})}}).start()}function register(){window.open("./?task=main&object=printme_register&action=show","","width=400,height=400,scrollbars ,resizable")}function lost_password(){window.open("./?task=main&object=printme_register&action=lost_password","","width=400,height=400,scrollbars ,resizable")}