String.prototype.form=function(){var n,s=this.split('$'),a=arguments;for(n=0;n<s.length&&n<a.length;++n){s[n]+=a[n].toString();}return s.join('');};Number.prototype.toStringPad=function(p,s){var n=Math.abs(this).toString();while(n.length<p)n='0'+n;return s ||0>this?(0>this?'-':'+')+n:n;};if(!document.getElementsByTagName){document.getElementsByTagName=function(t){var n,q=[];if(document.all)for(n=0;n<document.all.length;++n)if(t==document.all[n].nodeName)q[q.length]=document.all[n];return q;};}if(!document.getElementById){document.getElementById=function(i){return document.all&&document.all[i]?document.all[i]:{};}}function $F(f,e){var x =document.forms[f];return!x||!e?x:(x.elements[e]);}function $I(i){return document.getElementById(i);}function $N(i){return document.getElementsByTagName(i);}function $L(i){if(i)window.location.href=i;else return window.location.href;}function $W(i,m,w,h){if(!w)var w =800;if(!h)var h =600;var x =(!m?',status=0,toolbar=0,location=0,menubar=0,directories=0':'');window.open(i,'_blank','status=0,toolbar=0,resizable=0,width='+w+',height='+h+x);}function $E(i,l){var e =$I(i);if(e){if(!l)var l =false;if(e.addEventListener)e.addEventListener('mouseup',l,false);else e.onclick=l;}}function $R(){return document.referrer?document.referrer:'';}if(!HTMLButtonElement)var HTMLButtonElement={prototype:{}};if(!HTMLInputElement)var HTMLInputElement={prototype:{}};if(!HTMLSelectElement)var HTMLSelectElement={prototype:{}};if(!HTMLTextAreaElement)var HTMLTextAreaElement={prototype:{}};if(!HTMLFormElement)var HTMLFormElement={prototype:{}};HTMLButtonElement.prototype.on=HTMLInputElement.prototype.on=HTMLSelectElement.prototype.on=HTMLTextAreaElement.prototype.on=HTMLFormElement.prototype.on=function(){var n,a=arguments;for(n=0;n<a.length-1;++n){var i =a[n].toLowerCase();this['vue'==i?'onclick':'on'+i]=this.act_;if(true!==a[a.length-1]){this[i+'_act_']=a[a.length-1];}}};HTMLButtonElement.prototype.act_=HTMLInputElement.prototype.act_=HTMLSelectElement.prototype.act_=HTMLTextAreaElement.prototype.act_=HTMLFormElement.prototype.act_=function(e){if(!e)var e =window.event;if(this.vue_&&this.vue_act_&&('click'==e.type||'dblclick'==e.type))this.vue_act_(e);if(!this[e.type+'_act_'])if(!this.form||!this.form[e.type+'_act_'])return true;if(!e.internal_){e.from=e.relatedTarget||e.fromElement;e.src=(window.event?e.srcElement:e.target);if(3==e.src.nodeType)e.src=e.src.parentNode;e.to=e.relatedTarget||e.fromElement;if('click'==e.type||'dblclick'==e.type)e.btn=(e.which&&1==e.which?1:(e.button&&(0==e.button||1==e.button)?1:0))+(e.which&&3==e.which?2:(e.button&&2==e.button?2:0))+(e.which&&2==e.which?4:(e.button&&4==e.button?4:0));if(e.pageX||e.pageY){e.xps=e.pageX;e.yps=e.pageY;}else if(e.clientX||e.clientY){e.xps=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e.yps=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;}else e.xps=e.yps=0;}return this[e.type+'_act_']?this[e.type+'_act_'](e):this.form[e.type+'_act_']?this.form[e.type+'_act_'](e):true;};HTMLButtonElement.prototype.vue_act_=HTMLInputElement.prototype.vue_act_=HTMLSelectElement.prototype.vue_act_=HTMLTextAreaElement.prototype.vue_act_=HTMLFormElement.prototype.vue_act_=function(){};HTMLButtonElement.prototype.get=HTMLInputElement.prototype.get=HTMLSelectElement.prototype.get=HTMLTextAreaElement.prototype.get=HTMLFormElement.prototype.get=function(v){var n=0,l,r=[];if('FORM'==this.tagName){var k,t=this.elements;if(!v){for(n=0;n<t.length;++n)if(t[n].get){if(t[n].name)r[t[n].name]=t[n].get();else if(t[n].id)r[t[n].id]=t[n].get();}}else{for(k in v )if(t[v[k]]&&t[v[k]].get)r[k]=t[v[k]].get();}return r;}else switch(this.type){case'select-one':case'select-multiple':while(n<this.options.length)if(true==this.options[n++].selected)r[r.length]=this.options[n-1].value;return 0==r.length?false:r.join(';');case'radio':for(l=this.form[this.name];n<l.length;++n)if(true==x[n].checked)r[r.length]=x[n].value;return 0==r.length?false:r.join(';');case'checkbox':return this.checked&&this.value?this.value:this.checked;default:return this.value;}};HTMLButtonElement.prototype.toString=HTMLInputElement.prototype.toString=HTMLSelectElement.prototype.toString=HTMLTextAreaElement.prototype.toString=function(){return this.get().toString();};HTMLButtonElement.prototype.set=HTMLInputElement.prototype.set=HTMLSelectElement.prototype.set=HTMLTextAreaElement.prototype.set=HTMLFormElement.prototype.set=function(v,t,sv){var n=0,l,o;if('FORM'==this.tagName){var k,t=this.elements;for(k in v )if(t[k])t[k].set(v[k]);}else switch(this.type){case'select-one':case'select-multiple':for(n=0;n<this.options.length;++n){if(this.options[n].value==v){this.selectedIndex=n;return this;}}if(t){o=new Option(t,v);if(this.add){for(n=0;n<this.options.length;++n){if(sv?this.options[n].value>v:this.options[n].name>t){try{this.add(o,this.options[n]);}catch(ie){this.add(o,n);}this.selectedIndex=n;return this;}}}this.options[this.options.length]=o;this.selectedIndex=this.options.length-1;}return this;case'radio':for(l=this.form[this.name];n<l.length;++n)l[n].checked=!!(l[n].value==v);break;case'checkbox':this.checked=!!v;break;default:this.value=v;}if(this.set_act_)this.act_({type:'set',internal_:true});return this;};HTMLButtonElement.prototype.check=HTMLInputElement.prototype.check=HTMLSelectElement.prototype.check=HTMLTextAreaElement.prototype.check=function(md){var k ={numi:'0123456789',numn:'0123456789.',numb:'01',numh:'0123456789abcdefABCDEF',numo:'01234567',nump:'0123456789.',numd:'0123456789.',nume:'0123456789.',nums:'0123456789.',txta:'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'},p={nump:'£',numd:'$',nume:'E'},s={},h={nums:'+-'},t={},j={numn:'.',nump:'.',numd:'.',nume:'.',nums:'.'},f={txtl:function(q){return q.toLowerCase();},txtu:function(q){return q.toUpperCase();},txtm:function(q){var n,f=true,r='';for(n=0;n<q.length;++n){r+=(f?q.charAt(n).toLowerCase():q.charAt(n).toUpperCase());f=(' '==r.charAt(r.length-1)?false:true);}return r;}},vm=(this.className?[0,'']:this.className.split('-')),vp='',vs='',vc,v,n;vm[2]=(!vm[2]?parseInt(vm[2]):0);vm[3]=(!vm[3]?parseInt(vm[3]):999999);v=vc=this.get();if(j[vm[1]]){vc=vc.split('.');vc[0]+='.';vc=vc.join('');}if(k[vm[1]])for(n=0;n<vc.length;++n)if(-1!=k[vm[1]].indexOf(v.charAt(n)))vc+=v.charAt(n);if(f[vm[1]])vc=f[vm[1]](vc);if(p[vm[1]])vc=p[vm[1]]+vc;if(s[vm[1]])vc=vc+s[vm[1]];if(vc!=v&&md)this.set(v=vc);if(vc==v)return vm[2]<=vc.length&&vc.length<=vm[3];return false;};{var idn_=0,ids_=0;if(!Date.prototype.getFullYear){Date.prototype.getFullYear=function(){return this.getYear()+1900;};}if(!Date.prototype.setFullYear){Date.prototype.setFullYear=function(y){this.setYear(y);};}Date.prototype.getDayName=function(n){var d =['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];return d[n?n%7:this.getDay()%7];};Date.prototype.getMonthName=function(n){var m =['Janurary','Feburary','March','April','May','June','July','August','September','October','November','December'];return m[n?n%12:this.getMonth()%12];};Date.prototype.calendar=function(ce,nt,s,ml){var m,b,l,r,i=this.id_=++idn_;var n,c,d,t,h=['<table class=calendar cellspacing=0 cellpadding=0>'];if(!s)var s =(this.interval?this.interval:1440);this.interval=s;if(!ml)var ml=12;if(nt)h[h.length]='<tr><th colspan='+(1440<=this.interval?7:16)+'><h4><input type=button class=date-hide id=date-hide-'+i+' value=X> &nbsp;'+nt+'</h4></th></tr>';h[h.length]='<tr><th>'+['S','M','T','W','T','F','S'].join('</th><th>')+(1440<=this.interval?'</th></tr>':'</th><th rowspan=8>&nbsp;</th><th colspan=8>Time</th></tr>');for(n=c=0,t=50;n<6;++n){h[h.length]='<tr>';for(m=0;m<7;++m){h[h.length]='<td><input type=button class=date-grey name=date-'+(++c)+'-'+i+' value=""></td>';}if(1440>this.interval){for(m=0;m<8;++m){h[h.length]='<td><input type=button class=date-grey name=date-'+(++t)+'-'+i+' value=""></td>';}}h[h.length]='</tr>';}h[h.length]='<tr><td><input type=button class=date-pick name=date-back-'+i+' value="&larr;"></td><td colspan=5><select class=date-pick name=date-pick-'+i+'>';for(n=0,(d=new Date(this)).setDate(1);n<ml;++n){h[h.length]='<option value='+(d.getFullYear()*100+d.getMonth()+1)+'>'+d.getMonthName()+' '+d.getFullYear();d.setMonth(d.getMonth()+1);}h[h.length]='</select></td><td><input type=button class=date-pick name=date-next-'+i+' value="&rarr;"></td></tr></table>';h[h.length]='</table>';if(document.createElement){var e =document.createElement('DIV');e.innerHTML=h.join('');if('string'==typeof(ce))ce=$I('view-'+ce);if(!ce)ce=document.body;ce.appendChild(e);}for(n=0;n<document.forms.length;++n){if(document.forms[n].elements['date-pick-'+i]){document.forms[n]['date-'+i]=this;this.form=document.forms[n];this.form.elements['date-back-'+i].onclick=function(){this.form['date-'+i].setDate(0);this.form['date-'+i].refresh();};this.form.elements['date-next-'+i].onclick=function(){this.form['date-'+i].setMonth(this.form['date-'+i].getMonth()+1);this.form['date-'+i].setDate(1);this.form['date-'+i].refresh();};this.form.elements['date-pick-'+i].onchange=function(){var v =this.options[this.selectedIndex].value;this.form['date-'+i].setMonth(v%100-1);this.form['date-'+i].setFullYear(Math.floor(v/100));this.form['date-'+i].refresh();};for(m=1;m<43;++m){this.form.elements['date-'+m+'-'+i].onclick=function(){if(''!=this.value){var dd=this.form['date-'+i];var dn=new Date(dd);dn.setDate(this.value-0);if(dd.minimum<=dn&&dn<=dd.maximum){dd.setDate(this.value-0);dd.refresh();}}};}if(1440>this.interval)for(m=51;m<99;++m){this.form.elements['date-'+m+'-'+i].onclick=function(){var b =this.form['date-'+i];var s =(!b.interval?15:b.interval),t=b.getHours()*60+b.getMinutes();switch(this.value){case'<':t-=b.interval;case'':break;case'>':t+=b.interval;case'00':break;default:if(!isNaN(this.value-0)&&this.value<24)t=this.value*60;}t=Math.round(t/b.interval)*b.interval;b.setHours(Math.floor(t/60));b.setMinutes(t%60);b.setSeconds(0);b.refresh();};}}}if(nt)$E('date-hide-'+i,function(){ce.className='view-hide';});this.refresh();return this;};Date.prototype.refresh=function(s){var n,c,d,l,b,i=this.id_;if(!s)var s =++ids_;else if(this.seq_&&s==this.seq_)return;this.seq_=s;if(!this.lastDate)this.lastDate=this;if(this.minimum)while(this.minimum>this){if(this.getFullYear()<(this.minimum.getFullYear()-2))this.setFullYear(this.minimum.getFullYear()-1);else if(this.getMonth()<this.minimum.getMonth())this.setMonth(this.getMonth()+1);else if(this.getMonth()==this.minimum.getMonth()&&this.getDate()<this.lastDate.getDate())this.setMonth(this.getMonth()+1);else this.setDate(this.getDate()+1);}else this.minimum=new Date(1901,1,1);if(this.maximum)while(this.maximum<this){if(this.getFullYear()>(this.maximum.getFullYear()+2))this.setFullYear(this.maximum.getFullYear()+2);else if(this.getMonth()<this.maximum.getMonth())this.setMonth(this.getMonth()-1);else this.setDate(this.getDate()-1);}else this.maximum=new Date(3001,1,1);if(this.setMinimum)while(this.setMinimum>this)this.setMinimum.setTime(this.setMinimum.getTime()-(this.setMinimum.interval?this.setMinimum.interval:1440)*60000);else this.setMinimum=new Date(this.minimum);if(this.setMaximum)while(this.setMaximum<this)this.setMaximum.setTime(this.setMaximum.getTime()+(this.setMaximum.interval?this.setMaximum.interval:1440)*60000);else this.setMaximum=new Date(this.maximum);if(i){if(this.form){d=new Date(this);d.setDate(1);d=d.getDay()+1;l=new Date(this);l.setDate(1);l.setMonth(l.getMonth()+1);l.setDate(-1);l=d+l.getDate();c=new Date(this);c.setDate(1);for(n=1;n<43;++n){b=this.form.elements['date-'+n+'-'+i];if(n<d||n>l){b.value='';b.className='date-grey';}else{if(c<this)b.className=(this.setMinimum&&c<this.setMinimum?'date-below':'date-before');else if(c>this)b.className=(this.setMaximum&&c>this.setMaximum?'date-above':'date-after');else b.className='date-this';c.setDate((b.value=c.getDate())+1);}if(!b.get)b.get=HTMLInputElement.prototype.get;if(!b.set)b.set=HTMLInputElement.prototype.set;}if(1440>this.interval){var clk=[55,56,57,65,66,74,82,90,89,97,96,95,94,93,92,84,83,75,67,59,60,52,53,54];for(n=0;n<clk.length;++n){b=this.form.elements['date-'+clk[n]+'-'+i];b.value=n;b.className=(n<this.getHours()?'date-before':(n>this.getHours()?'date-after':'date-this'));if(!b.get)b.get=HTMLInputElement.prototype.get;if(!b.set)b.set=HTMLInputElement.prototype.set;}this.form.elements['date-70-'+i].value=this.getHours().toStringPad(2);this.form.elements['date-71-'+i].value=this.getMinutes().toStringPad(2);this.form.elements['date-78-'+i].value='<';this.form.elements['date-79-'+i].value='>';}b=this.form.elements['date-pick-'+i];if(!b.get)b.get=HTMLSelectElement.prototype.get;if(!b.set)b.set=HTMLSelectElement.prototype.set;b.set(this.getFullYear()*100+this.getMonth()+1,this.getMonthName()+' '+this.getFullYear(),true);}}if(this.dates_&&this.dates_.length)for(n=0;n<this.dates_.length;++n)this.dates_[n].refresh(s);if(this.targets_&&this.targets_.length)for(n=0;n<this.targets_.length;++n)this.targets_[n].setDate(this);if(this.x_)this.x_();};Date.prototype.setLink=function(){var n;if(!this.dates_)this.dates_=arguments;else for(n=0;n<arguments.length;++n)this.dates_[this.dates_.length]=arguments[n];return this;};Date.prototype.setTarget=function(){var n,t;if(!this.targets_)this.targets_=[];for(n=0;n<arguments.length;++n){t=this.targets_[this.targets_.length]=arguments[n];t.date=this;t.onchange=function(){var n,x=this.get(),th=this.date.getHours(),tm=this.date.getMinutes(),ts=this.date.getSeconds(),d=this.date.getDate(),m=1+this.date.getMonth(),y=this.date.getFullYear();this.date.lastDate=new Date(this.date);if(''==x){for(n=0;n<this.date.targets_.length;++n)this.date.targets_[n].set('');return;}var ss=(x+'//').split('/'),sh=(x+'--').split('-'),c=this.className.split('-'),id=0,im=0;switch(c[2]?c[2]:(''!=ss[2]?'uk':(''!=sh[2]?'iso':(''!=ss[1]?'myuk':(''!=sh[1]?'myiso':(-1<x.indexOf(':')?'time':'stamp')))))){case'time':x=(x+'::').split(':');th=x[0]-0;tm=x[1]-0;ts=x[2]-0;break;case'us':if(-1<x.indexOf('/')){d=ss[1]-0;m=ss[0]-0;y=ss[2]-0;}else if(6==x.length||8==x.length){d=x.substring(2,4)-0;m=x.substring(0,2)-0;y=x.substring(4)-0;}break;case'uk':if(-1<x.indexOf('/')){d=ss[0]-0;m=ss[1]-0;y=ss[2]-0;}else if(6==x.length||8==x.length){d=x.substring(0,2)-0;m=x.substring(2,4)-0;y=x.substring(4)-0;}break;case'myus':case'myuk':d=1;if(-1<x.indexOf('/')){m=ss[0]-0;y=ss[1]-0;}else if(4==x.length||6==x.length){m=x.substring(0,2)-0;y=x.substring(2)-0;}break;case'iso':d=sh[2]-0;m=sh[1]-0;y=sh[0]-0;break;case'myiso':d=1;m=sh[1]-0;y=sh[0]-0;break;case'second':ts=x-0;break;case'minute':tm=x-0;break;case'hour':th=x-0;break;case'day':d=x-0;break;case'month':m=x-0;break;case'year':y=x-0;break;case'my':m=x%100;y=Math.floor(x/100);break;case'days':if(this.date.setMinimum){d=x-1+this.date.setMinimum.getDate();m=1+this.date.setMinimum.getMonth();y=this.date.setMinimum.getFullYear();}break;case'months':if(this.date.setMinimum){d=this.date.setMinimum.getDate();m=x-0+1+this.date.setMinimum.getMonth();y=this.date.setMinimum.getFullYear();}break;case'dstamp':case'stamp':x=this.get().split('T')[0];d=x%100;m=Math.floor(x/100)%100;y=Math.floor(x/10000);x=(this.get()+'T').split('T')[1];case'tstamp':th=x.substring(0,2)-0;tm=x.substring(2,4)-0;ts=x.substring(4,6)-0;break;}if(isNaN(y))y=this.date.getFullYear();this.date.setFullYear(y+(y<33?2000:(y<100?1900:0)),(isNaN(m)?this.date.getMonth()+1:m)+im-1,(isNaN(d)?this.date.getDate():d)+id);if(!isNaN(th))this.date.setHours(th);if(!isNaN(tm))this.date.setMinutes(tm);if(!isNaN(ts))this.date.setSeconds(ts);this.date.refresh();};t.setDate=function(q){var v ='',c=this.className.split('-'),th=q.getHours(),tm=q.getMinutes(),ts=q.getSeconds(),d=q.getDate(),m=1+q.getMonth(),n=q.getMonthName(),y=q.getFullYear(),x=this.get();var ss=(x+'//').split('/'),sh=(x+'--').split('-');switch(c[2]?c[2]:(''!=ss[2]?'uk':(''!=sh[2]?'iso':(''!=ss[1]?'myuk':(''!=sh[1]?'myiso':(-1<x.indexOf(':')?'time':'stamp')))))){case'time':v=th+':'+tm+(0==ts?'':':'+ts);break;case'us':v=m.toStringPad(2)+'/'+d.toStringPad(2)+'/'+y;break;case'uk':v=d.toStringPad(2)+'/'+m.toStringPad(2)+'/'+y;break;case'myus':case'myuk':v=m.toStringPad(2)+'/'+y;break;case'iso':v=y+'-'+m.toStringPad(2)+'-'+d.toStringPad(2);break;case'myiso':v=y+'-'+m.toStringPad(2);break;case'second':v=ts;break;case'minute':v=tm;break;case'hour':v=th;break;case'day':v=d;break;case'month':v=m;break;case'year':v=y;break;case'my':v=y*100+m;break;case'days':v=Math.ceil((this.date.getTime()-this.date.setMinimum.getTime())/(24*60*60*1000))+1;break;case'months':x=new Date(this.date.setMinimum?this.date.setMinimum:this.date.minimum);v=(this.date.getFullYear()-x.getFullYear())*12+this.date.getMonth()-x.getMonth()+(this.date.getDate()<=x.getDate()?0:1);break;case'rfc':v=q.getDayName().substring(0,3)+', '+d+' '+q.getMonthName().substring(0,3)+' '+y+' '+q.getHours().toStringPad(2)+':'+q.getMinutes().toStringPad(2)+':'+q.getSeconds().toStringPad(2)+' '+(Math.floor(q.getTimezoneOffset()/60)*100+q.getTimezoneOffset()%60).toStringPad(4,true);break;case'stamp':v=y*10000+m*100+d+(0==th&&0==tm&&0==ts?'':'T'+(th*10000+tm*100+ts).toStringPad(6));break;case'dstamp':v=y*10000+m*100+d;break;case'tstamp':v=(th*10000+tm*100+ts).toStringPad(6);break;}if(this.set)this.set(v);};if(!t.get||!t.set){t.get=HTMLInputElement.prototype.get;t.set=HTMLInputElement.prototype.set;}t.setDate(this);}return this;};Date.prototype.getHTML=function(i,s,m,x){var n,d,h=[];if(!this.interval)this.interval=1440;if(!s)s=this.interval;else this.interval=s;if(!m)m=this.minimum;else this.minimum=m;if(!x)x=this.maximum;else this.maximum=x;if(s&&0!=(s%1440)){h[h.length]='<div class=datetime><select name='+i+'-time id='+i+'-time class=date-pick-tstamp>';for(n=0;n<1440;n+=s)h[h.length]='<option value='+(Math.floor(n/60)*100+n%60).toStringPad(4)+'00>'+Math.floor(n/60)+':'+(n%60).toStringPad(2);h[h.length]='</select>';}else h[h.length]='<div class=date>';h[h.length]='<select name='+i+'-day id='+i+'-day class=date-pick-day>';for(n=1;n<32;++n)h[h.length]='<option value='+n+'>'+n;h[h.length]='</select><select name='+i+'-my id='+i+'-my class=date-pick-my>';for((d=new Date(m.getTime())).setDate(1);d<=x;d.setMonth(d.getMonth()+1)){h[h.length]='<option value='+(d.getFullYear()*100+d.getMonth()+1)+'>'+d.getMonthName().substring(0,3)+' '+d.getFullYear();}h[h.length]='</select><input type=hidden id='+i+'-date name='+i+'-date value="" class=date-pick-stamp><input type=button id='+i+'-calendar class='+i+'-calendar value=" "></div>';if(!$I('view-'+i))h[h.length]='<div id=view-'+i+' class=view-hide>&nbsp;</div>';return h.join('');};Date.prototype.activateHTML=function(i){var s =$I(i+'-time');if(s)this.setTarget(s);this.setTarget($I(i+'-day'),$I(i+'-my'),$I(i+'-date'));$E(i+'-calendar',function(e){if(!e)var e =window.event;var i =$I('view-'+(e.target?e.target:(e.srcElement?e.srcElement:this)).className.split('-')[0]);if(i)i.className=('view-show'==i.className?'view-hide':'view-show');});return this.refresh();};}String.prototype.toStringXML=String.prototype.encodeTag=String.prototype.encodeData=function(){return this.split('&').join('&amp;').split('<').join('&lt;').split('>').join('&gt;').split('"').join('&quot;');};String.prototype.decodeTag=String.prototype.decodeData=function(){return this.split('&quot;').join('"').split('&gt;').join('>').split('&lt;').join('<').split('&amp;').join('&');};String.prototype._base64='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';String.prototype.encodeBase64=function(){var r ='',n=0,c1,c2,c3,t,k=this._base64;while(n<this.length){c1=this.charCodeAt(n++);c2=this.charCodeAt(n++);c3=this.charCodeAt(n++);r+=k.charAt(c1>>2);t=(c1&3)<<4;if(!isNaN(c2)){r+=k.charAt(t+(c2>>4));t=(c2&15)<<2;if(!isNaN(c3)){r+=k.charAt(t+(c3>>6));t=c3&63;}}r+=k.charAt(t);}return r;};String.prototype.decodeBase64=function(){var r ='',n=0,s=this+'===',e1,e2,e3,e4,k=this._base64;while(n<this.length){e1=k.indexOf(s.charAt(n++));e2=k.indexOf(s.charAt(n++));e3=k.indexOf(s.charAt(n++));e4=k.indexOf(s.charAt(n++));if(-1!=e1&&-1!=e2){r+=String.fromCharCode((e1<<2)|(e2>>4));if(-1!=e3){r+=String.fromCharCode((e2&15)<<4|(e3>>2));if(-1!=e4)r+=String.fromCharCode(((e3&3)<<6)|e4);}}}return r;};function Store(n,l){this.cn=n;this.lm=(l?l:0);this.vx=['B64'];var m,x,c=document.cookie.split(';'),q=n+'=';for(m=0,x=c[0];m<c.length;x=c[++m]){while(' '==x.charAt(0))x=x.substring(1,x.length);if(0==x.indexOf(q)){this.vx=x.substring(q.length,x.length).split('.');if('B64'!=this.vx[0])this.vx=['B64'];break;}}}Store.prototype.set=function(i,v){if(!i)var i =0;if(!v)var v ='';var n,d=new Date();d.setDate(d.getDate()+this.lm);for(n=this.vx.length;n<=i;++n)this.vx[n]='';this.vx[i+1]=v.encodeBase64();document.cookie=this.cn+'='+this.vx.join('.')+'; expires='+d.toGMTString()+'; path=/';};Store.prototype.get=function(i){if(!i)var i =0;return(i+1)<this.vx.length?this.vx[i+1].decodeBase64():'';};Store.prototype.wipe=function(i){if(!i){var d =new Date();d.setDate(d.getDate(-1));document.cookie=this.cn+'=; expires='+d.toGMTString()+'; path=/';}else this.set('',i);};Store.prototype.getAll=function(l){var n;for(n=0;n<l.length;++n)if(l[n]&&l[n].set&&(n+1)<this.vx.length)l[n].set(this.get(n));return this;};Store.prototype.setAll=function(l){var n;for(n=0;n<l.length;++n)if(l[n]&&l[n].get)this.set(n,l[n].get());else if(l[n])this.set(n,'');return this;};function getNetworks(t,i){if(!i)var i ='/images/network/';t=escape(t);var k,p=escape(window.location.href),r=[];var l ={'del.icio.us':'del.icio.us/post?url='+p+'&amp;title='+t,'digg':'digg.com/submit?phase=2&amp;url='+p+'&amp;title='+t,'reddit':'reddit.com/submit?url='+p+'&amp;title='+t,'ma.gnolia.com':'ma.gnolia.com/bookmarklet/add?url='+p+'&amp;title='+t,'newsvine':'www.newsvine.com/_tools/seed&amp;save?u='+p+'&amp;h='+t,'furl':'www.furl.net/storeIt.jsp?u='+p+'&amp;t='+t,'facebook':'www.facebook.com/sharer.php?u='+p+'&amp;t='+t,'google':'www.google.com/bookmarks/mark?op=add&amp;bkmk='+p+'&amp;title='+t,'yahoo':'myweb2.search.yahoo.com/myresults/bookmarklet?u='+p+'&amp;t='+t,'technorati':'technorati.com/cosmos/search.html?url='+p,'icerocket':'blogs.icerocket.com/search?q='+p};for(k in l )r[r.length]=['<a rel=nofollow class=snw-',k.split('.')[0],' href="http://',l[k],'"><img src="',i,k,'.png" alt="Bookmark with ',k,'"></a>'].join('');return'Bookmark/Search this article with:<br>'+r.join(' ');}var TI={dst:{e:'Europe',o:'Australia &amp; New Zealand',x:'World wide ex. USA &amp; Canada',w:'World wide'},dstt:'e||Europe|Travel to members of the European Community and european countries. (Albania, Andorra, Armenia, Austria, Azerbaijan, Belarus, Belgium, Bosnia-Herzegovina, Bulgaria, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Georgia, Germany, Gibraltar, Greece, Hungary, Iceland, Ireland, Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Macedonia, Malta, Moldova, Monaco, Netherlands, Norway, Poland, Portugal, Romania, Russia, San Marino, Serbia/Montenegro, Slovakia, Slovenia, Spain, Sweden, Switzerland, Turkey, Ukraine, United Kingdom, and Vatican City.)||o||Australia &amp; New Zealand|Includes transfer and short stop-overs (up to 72 hours) during the trip to Australia &amp; New Zealand.||x||Worldwide ex. USA|Travel world wide, excluding the USA, Canada, and countries the FCO advises against travel to.||w||Worldwide|Travel the World, excluding countries the FCO advises against travel to.',res:{gb:'United Kingdom'},rest:'Residency|You must habitually reside in this country (i.e., have your main home in this country) and have not spent more than 6 months abroad in the last 12 months.',hide:{tilong:1},opts:{tinobags:['Exclude Baggage',0,'Exclude Baggage|Reduce the cost of your policy by removing cover for baggage and personal effects.']},ages:{ti18to49:['Age 18-49',1]},topl:'<div class=g><h2>Backpackers Insurance</h6></div>',butn:'<div class=g><input type=submit id=tiquote name=tiquote value="Get Insurance Quote"></div>'};var AH={airport:{'ABZ':'Aberdeen','BFS':'Belfast','BLK':'Blackpool','BHX':'Birmingham','BRS':'Bristol','CWL':'Cardiff','CVT':'Coventry','DOV':'Dover Port','DUB':'Dublin','MME':'Durham Valley (Teeside)','EMA':'East Midlands (Nottingham)','EDI':'Edinburgh','LGW':'Gatwick (London)','GLA':'Glasgow','LHR':'Heathrow (London)','HUY':'Humberside (Kirmington)','LBA':'Leeds Bradford','LPL':'Liverpool','LCY':'London City','LTN':'Luton','MAN':'Manchester','NCL':'Newcastle','NWI':'Norwich','PIK':'Prestwick (Glasgow)','SOU':'Southampton','STN':'Stansted (London)'},parking:{'0':'No parking required','1':'1 day','2':'2 days','3':'3 days','4':'4 days','5':'5 days','6':'6 days','7':'7 days','8':'8 days','9':'9 days','10':'10 days','12':'12 days','15':'15 days','18':'18 days','21':'21 days'},room:{'S10':'Single - 1 Adult','T20':'Twin - 2 Adults','D20':'Double - 2 Adults','T12':'Triple - 1 Adult 2 Children','T21':'Triple - 2 Adults 1 Child','T30':'Triple - 3 Adults','F13':'Family - 1 Adult 3 Children','F22':'Family - 2 Adults 2 Children','F23':'Family - 2 Adults 3 Children','F31':'Family - 3 Adults 1 Child','F32':'Family - 3 Adults 2 Children'}};var AP={airport:{'ABZ':'Aberdeen','BFS':'Belfast','BHX':'Birmingham','BLK':'Blackpool','BRS':'Bristol','CWL':'Cardiff','DSA':'Doncaster (Robin Hood)','DOV':'Dover Port','MME':'Durham Valley (Teeside)','EMA':'East Midlands (Nottingham)','EDI':'Edinburgh','FOL':'Folkstone Eurotunnel','INV':'Inverness','LGW':'Gatwick (London)','GLA':'Glasgow','LHR':'Heathrow (London)','HUY':'Humberside (Kirmington)','LBA':'Leeds Bradford','LPL':'Liverpool (John Lennon)','LCY':'London City','LTN':'Luton','MAN':'Manchester','NCL':'Newcastle','NWI':'Norwick','PIK':'Prestwick (Glasgow)','SOU':'Southampton','STN':'Stansted (London)'},people:{'1':'1','2':'2','3':'3','4':'4','5':'5','6':'6','7':'7','8':'8','9':'9','10':'10'}};{function createCheckbox(i,l,m,t){if(!t)var t ='';return['<label for="',i,'">',l,'</label><input type=checkbox value=1 id="',i,'" name="',i,'" title="',t,(m?'" checked="checked">':'">')].join('');}function createSelectRange(i,m,x,s,t){var n,h=[];if(!t)var t ='';for(n=m;n<x;++n)h[h.length]=[n,(n==s?'" selected="selected">':'">'),n].join('');return['<select name="',i,'" id="',i,'" title="',t,'"><option value="',h.join('</option><option value="'),'</option></select>'].join('');}function createSelectData(i,d,s,t){var k,h=[];if(!t)var t ='';for(k in d )h[h.length]=[k,(k==s?'" selected="selected">':'">'),d[k]].join('');return['<select name="',i,'" id="',i,'" title="',t,'"><option value="',h.join('</option><option value="'),'</option></select>'].join('');}function getDateText(){var d =new Date;return[d.getDayName(),',&nbsp;',d.getDate(),'-',d.getMonthName().substring(0,3),'-',d.getFullYear()].join('');}var c =new Date;var y =c.getFullYear(),m=c.getMonth(),d=c.getDate();function ti(fh,aid,tid,mt,ws,gf,bn,bp){var da=new Date(y,m,d,0,0,0,0),dr=new Date(y,m,d+(!bp?3:31),0,0,0,0),dm=new Date(y,m,d,0,0,0,0),dx=new Date(y+2,m,d,0,0,0,0);da.minimum=dm;da.setMaximum=dr;da.interval=1440;da.maximum=dx;dr.minimum=dm;dr.setMinimum=da;dr.interval=1440;dr.maximum=dx;var k,rf,op=[],ag=[];if(TI.opts)for(k in TI.opts)op[op.length]='<div class=g>'+createCheckbox(k,TI.opts[k][0],TI.opts[k][1],TI.opts[k][2])+'</div>';if(TI.ages)for(k in TI.ages)ag[ag.length]=['<div class=g><label for="',k,'">',TI.ages[k][0],'</label>',createSelectRange(k,0,10,TI.ages[k][1],TI.ages[k][2]),'</div>'].join('');if(TI.hide)for(k in TI.hide)op[op.length]='<input type=hidden name="'+k+'" id="'+k+'" value="'+TI.hide[k]+'">';rf=($R()+'//').split('//')[1];fh.innerHTML=['<div id=tirform><form class=travelinsurance id=ti method=post action="/scripts/quote/">',(TI.topl?TI.topl:''),'<input type=hidden name=aid value="$"><input type=hidden name=tiid value="$"><input type=hidden name=tiref value="$">'.form(aid,tid,rf),(TI.dst?'<div class=g><label for=tiarea>Destination</label><div class=gc>'+createSelectData('tiarea',TI.dst,'e',TI.dstt)+'</div></div>':''),'<div class=g><label for=tistart-date>From</label><div class=gc>',da.getHTML('tistart'),'</div></div>','<div class=g id=tito><label for=tiend-date>To</label><div class=gc>',dr.getHTML('tiend'),'</div></div>',(TI.pol?'<div class=g><label for=tipolicy>Policy Type</label><div class=gc>'+createSelectData('tipolicy',TI.pol,'s',TI.polt)+'</div></div>':''),(TI.res?'<div class=g><label for=tiresidency>Residency</label><div class=gc>'+createSelectData('tiresidency',TI.res,'gb',TI.rest)+'</div></div>':''),(TI.midl?TI.midl:''),'<div class=op><div class=g><em>Options</em></div>',op.join(''),'</div>','<div class=pp><div class=g><em>Number of Travellers</em></div>',ag.join(''),'</div>',(TI.butn?TI.butn:''),'<div id=tihelp><div class=top>&nbsp;</div><div class=mid><div class=txt id=titext>&nbsp;</div></div><div class=bas>&nbsp;</div></div>',(TI.ext?TI.ext:''),'</form></div>'].join('');var n,f=$I('ti'),help=$I('tihelp'),text=$I('titext');for(n=0;n<f.elements.length;++n){f.elements[n].get=HTMLInputElement.prototype.get;f.elements[n].set=HTMLInputElement.prototype.set;f.elements[n].act_=HTMLInputElement.prototype.act_;f.elements[n].onmouseover=function(e){if(!e)var e =window.event,ie=true;if(this.title&&!this.tag_){if(1<this.title.split('||').length){var n,p,s=this.title.split('||');this.tag_={};for(n=0;n<s.length;n+=2){this.tag_[s[n]]='<h3><img alt="i" src="/images/i.gif"> '+s[n+1].split('|').join('</p><p>').replace('</p>','</h3>')+'</p>';}}else{this.tag_='<h3><img alt="i" src="/images/i.gif"> '+this.title.split('|').join('</p><p>').replace('</p>','</h3>')+'</p>';}this.title='';}if(this.tag_&&''!=this.tag_){var o =this,ox=0,oy=0;if(e.pageX||e.pageY){y=e.pageY;}else if(e.clientX||e.clientY){y=e.clientY+document.body.scrollTop+document.documentElement.scrollTop;}else{x=y=0;}while(o.offsetParent&&'FORM'!=o.tagName){o=o.offsetParent;}while(o.offsetParent){oy+=o.offsetTop;o=o.offsetParent;}text.innerHTML=(this.tag_[this.value]&&9<this.tag_[this.value].length?this.tag_[this.value]:this.tag_);help.style.top=(y-oy-help.offsetHeight-6)+'px';}};f.elements[n].onmouseout=function(){help.style.top='-55555px';};}da.calendar('tistart','Start Date').setLink(dr).activateHTML('tistart');dr.calendar('tiend','End Date').setLink(da).activateHTML('tiend');function hideOpt(){var h =$I('tito'),f=$I('ti').elements;if(!f.tilong)f.tilong={checked:false};if(h)h.style.visibility=((f.timulti&&!f.timulti.checked)||(f.tisingle&&f.tisingle.checked)||(f.tilong&&f.tilong.checked)?'visible':'hidden');h=f.ti0to17;if(h&&(h.disabled=f.tilong.checked))h.selectedIndex=0;h=f.ti50to65;if(h&&(h.disabled=f.tilong.checked))h.selectedIndex=0;h=f.ti66to70;if(h&&(h.disabled=(f.tilong.checked||f.tiski.checked)))h.selectedIndex=0;h=f.ti71to75;if(h&&(h.disabled=(f.tilong.checked||f.tiski.checked)))h.selectedIndex=0;h=f.ti76to80;if(h&&(h.disabled=(f.tilong.checked||f.tiski.checked)))h.selectedIndex=0;if(f.tilong.checked){if(h=f.tigolf){h.checked=false;h.disabled=true;}if(h=f.tibusiness){h.checked=false;h.disabled=true;}if(h=f.tipolicy){h.disabled=false;h.set('s');h.disabled=true;}}else{if(h=f.tigolf)h.disabled=false;if(h=f.tibusiness)h.disabled=false;if(h=f.tipolicy)h.disabled=false;}}var f =$I('ti').elements;if(f.tisingle)f.tisingle.onclick=hideOpt;if(f.timulti)f.timulti.onclick=hideOpt;if(f.tilong)f.tilong.onclick=hideOpt;if(f.tiski)f.tiski.onclick=function(){var h,f=$I('ti').elements;h=f.ti66to70;if(h&&(h.disabled=(f.tilong.checked||f.tiski.checked)))h.selectedIndex=0;h=f.ti71to75;if(h&&(h.disabled=(f.tilong.checked||f.tiski.checked)))h.selectedIndex=0;h=f.ti76to80;if(h&&(h.disabled=(f.tilong.checked||f.tiski.checked)))h.selectedIndex=0;};if(ws&&f.tiski)f.tiski.checked=true;if(gf&&f.tigolf)f.tigolf.checked=true;if(bn&&f.tibusiness)f.tibusiness.checked=true;if(bp&&f.tilong)f.tilong.checked=true;if(bp&&f.tinobags)f.tinobags.checked=true;if(mt&&f.timulti)f.timulti.checked=true;var k,n,r=$R().toLowerCase();if(TI.auto)for(k in TI.auto)for(n=0;n<TI.auto[k].length;++n)if(-1!=r.indexOf(TI.auto[k][n]))if(f[k]&&!f[k].disabled)f[k].checked=true;var cke=new Store('ti',30),ckl=[f.tiarea,f['tistart-date'],f['tiend-date'],f.tipolicy,f.tiresidency,f.ticurrency,f.ti0to17,f.ti18to49,f.ti50to65,f.ti66to70,f.ti71to75,f.ti76to80,f.tisingle,f.timulti,f.tilong,f.tiski,f.tigolf,f.tibusiness,f.tinobags,f.aid,f.tiid,f.tiref];cke.getAll(ckl).setAll(ckl);f['tistart-date'].onchange();f['tiend-date'].set(cke.get(2)).onchange();hideOpt();if(''==f.tiref.get())f.tiref.set(rf);if(''==f.aid.get())f.aid.set(aid);if(''==f.tiid.get())f.tiid.set(tid);$I('tiquote').onclick=function(){cke.setAll(ckl);var f =this.form.elements;var pp,pc=(f.ti0to17?f.ti0to17.get():0)-0,pa=-(0-(f.ti18to65?f.ti18to65.get():0)-(f.ti18to49?f.ti18to49.get():0)-(f.ti50to65?f.ti50to65.get():0)-(f.ti66to70?f.ti66to70.get():0)-(f.ti71to75?f.ti71to75.get():0)-(f.ti76to80?f.ti76to80.get():0)),pt=(f.tipolicy?f.tipolicy.get():'s');if(0==(pp=(pc+pa)))alert('Please select at least one person for the policy');else if(2!=pp&&'c'==pt)alert('Policies for a couple expect only two people.\n(A couple can be either legally married, a common law husband and wife or an adult couple who have cohabited for at least one year. All limits and excesses are per person irrespective of one or both travelling on the same trip.)');else if(2<pa&&'f'==pt)alert('Policies for a family expect no more than two adults.\n(A family is considered to be a legally married couple, a common law husband and wife, a single parent or adult couple who have cohabited for at least one year and includes children (aged under 18).)\nPlease purchase seperate policies for the other adults.');else if(pp==pc)alert('Policies booked online must have at least one adult (18+), please phone 08450-264-264 to book a child-only policy');else if(-8<pp&&'g'==pt)alert('Policies for a group expect 8 or more people.\n(A group is 8 or more people travelling on a single trip and insured under the same policy. If your group has more than 16 people, please call us at 08450-264-264.)');else if(f.tilong&&f.tilong.checked&&pp!=f.ti18to49.get())alert('Long stay policies are only available for 18 to 49s');else if(f.tilong&&f.timulti&&f.tilong.checked&&f.timulti.checked)alert('Please select EITHER annual OR long stay. (This system does not support both together.)');else return true;return false;};}function ap(f){var da=new Date(y,m,d,0,0,0,0),dr=new Date(y,m,d+3,0,0,0,0),dm=new Date(y,m,d,0,0,0,0),dx=new Date(y+2,m,d,0,0,0,0);da.minimum=dm;da.setMaximum=dr;da.interval=30;da.maximum=dx;dr.minimum=dm;dr.setMinimum=da;dr.interval=30;dr.maximum=dx;f.innerHTML=['<div id=tilform><form action="http://www.bestairportparkingdeals.co.uk/scripts/park/" id=tx class=airportparking>','<div class=g><label for=airport>Airport</label>',createSelectData('airport',AP.airport,'LHR'),'</div>','<div class=g><label for=arrive-calendar>Arrive</label><div style="float:right;width:244px">',da.getHTML('arrive'),'</div></div>','<div class=g><label for=return-calendar>Return</label><div style="float:right;width:244px">',dr.getHTML('return'),'</div></div>','<div class=g><label for=people>People</label>',createSelectRange('people',1,10,2),'</div>','<div class=g><input type=image id=parkbook name=parkbook src="/images/get-quote.gif" value="Compare Airport Parking"></div>','</form></div>'].join('');da.calendar('arrive','Arrival Date').setLink(dr).activateHTML('arrive');dr.calendar('return','Return Date').setLink(da).activateHTML('return');$I('parkbook').onclick=function(e){var a =this.form['airport'],d=this.form['arrive-date'],r=this.form['return-date'],p=this.form['people'];$L(['http://www.bestairportparkingdeals.co.uk/scripts/park/?','arrive=',d.value,'&return=',r.value,'&people=',p[p.selectedIndex].value,(a?'&airport='+a[a.selectedIndex].value:'')].join(''));return false;};}function ah(f){var da=new Date(y,m,d+1,12,0,0,0),dm=new Date(y,m,d,0,0,0,0),dx=new Date(y+1,m,d,0,0,0,0);da.minimum=dm;da.interval=1440;da.maximum=dx;f.innerHTML=['<div id=tilform><form action="http://www.airport-hotels.co.uk/list-hotels.html.php" id=tx class=airporthotels>','<div class=g><label for=airport-hotel>Airport</label>',createSelectData('airport-hotel',AH.airport,'LHR'),'</div>','<div class=g><label for=date-calendar>Arrive</label><div class=gc>',da.getHTML('date'),'</div></div>','<div class=g><label for=room1>Room</label>',createSelectData('room1',AH.room,'D20'),'</div>','<div class=g><label for=parking>Park</label>',createSelectData('parking',AH.parking,'0'),'</div>','<div class=g><input type=image id=hotelbook name=hotelbook src="/images/get-quote.gif" value="Compare Airport Hotels"></div>','</form></div>'].join('');da.calendar('date','Arrival Date').activateHTML('date');$I('hotelbook').onclick=function(e){var a =this.form['airport-hotel'],p=this.form.parking,r=this.form.room1,d=this.form['date-date'];$L(['http://www.airport-hotels.co.uk/list-hotels.html.php?','date-date=',d.value,'&room1=',r[r.selectedIndex].value,'&parking=',p[p.selectedIndex].value,(a?'&airport-hotel='+a[a.selectedIndex].value:'')].join(''));return false;};}if(!aid)var aid='bbpi';if(!tid)var tid='1';window.onload=function start(a,t){var h;h=$I('includeinsurancebp');if(h)ti(h,aid,tid,0,0,0,0,1);h=$I('includeinsuranceet');if(h)ti(h,aid,tid,0,0,0,1);h=$I('includeinsurancegf');if(h)ti(h,aid,tid,0,0,1);h=$I('includeinsurancews');if(h)ti(h,aid,tid,0,1);h=$I('includeinsurancemt');if(h)ti(h,aid,tid,1);h=$I('includeinsurance');if(h)ti(h,aid,tid);h=$I('includeinsurance64p');if(h)ti(h,aid,tid);h=$I('includeairportparking');if(h)ap(h);h=$I('includeairporthotels');if(h)ah(h);h=$I('home');if(h)h.innerHTML='<a href="/">Travel Insurance Home</a>';h=$I('today');if(h)h.innerHTML=getDateText();h=$I('logo');if(h){h.onclick=function(){$L('/')};h.style.cursor='pointer';}h=$I('includenetwork');if(h)h.innerHTML=getNetworks(''+h.innerHTML);h=$I('thawte');if(h){h.innerHTML=y+'-'+(1+m)+'-'+d;h.onclick=function(){$W('https://www.thawte.com/core/process?process=public-site-seal-cert-details&public-site-seal-cert-details.referer=https://www.cheaptravelinsurance.com/',false,500,600);};h.style.cursor='pointer';}};};
