function g_GetCookie(_1){
var _2=document.cookie.match("(^|;) ?"+_1+"=([^;]*)(;|$)");
if(_2){
var _3=unescape(_2[2]);
return (unescape(_2[2]));
}else{
return null;
}
};
function g_GetCookieArray(_4){
var i=0;
var _6="";
var _7=new Array();
while(_6=g_GetCookie(""+_4+i)){
i++;
_7.push(_6);
}
if(_7.length<1){
return null;
}else{
return _7;
}
};
function g_SetCookie(_8,_9,_a,_b,_c,_d){
var _e=_8+"="+escape(_9);
if(_a){
_e+="; expires="+_a.toGMTString();
}
if(_b){
_e+="; path="+escape(_b);
}
if(_c){
_e+="; domain="+escape(_c);
}
if(_d){
_e+="; secure";
}
document.cookie=_e;
};
function g_SetCookieArray(_f,_10,exp,_12,_13,_14){
if(!_10||_10.length<1){
return null;
}
for(var i=0;i<_10.length;i++){
g_SetCookie(""+_f+i,_10[i],exp,_12,_13,_14);
}
};
function g_DeleteCookie(_16,_17){
var _18=new Date();
_18.setTime(_18.getTime()-5);
if(document.domain.match("portaldev2.local")!==null){
domain="portaldev2.local";
}else{
domain="orange.co.uk";
}
g_SetCookie(_16,"",_18,_17,domain);
};
function g_DeleteCookieArray(_19,_1a){
var i=0;
var tmp="";
while(tmp=g_GetCookie(""+_19+i)){
g_DeleteCookie(""+_19+i,_1a);
i++;
}
};
function home_openSetAsHomepage(_1d){
window.open(_1d,"setashomepage","menubar=0,resizable=1,width=500,height=400,scrollbars=1");
return (false);
};
var revSci_segJs="<scr"+"ipt type=\"text/javascript\" src=\""+location.protocol+"//js.revsci.net/gateway/gw.js?csid=E05517\" charset=\"ISO-8859-1\"></sc"+"ript>";
var bSegIncluded=false;
function revSciProcess(){
segQS="";
};
function revSciInit(){
rsinetsegs=g_GetCookieArray("rsinetsegs");
if(!rsinetsegs){
document.write(revSci_segJs);
bSegIncluded=true;
}
};
function revSciCookie(){
var _1e=new Date();
_1e.setMonth(_1e.getMonth()+1);
g_DeleteCookieArray("rsinetsegs","/");
g_SetCookieArray("rsinetsegs",rsinetsegs,_1e,"/");
};
function revSciRegisterMeta(){
if(!_MetaRegister||_MetaRegister.length<1){
return;
}
for(var i=0;i<_MetaRegister.length;i++){
var _20=_MetaRegister[i];
if(_20.meta_value&&_20.meta_value.length>0){
DM_addToLoc("revsci_"+_20.meta_name,_20.meta_value);
}
}
};
function revSciSegment(){
segQS="";
if(typeof rsinetsegs!="undefined"){
segQS+=rsinetsegs.length>0?"seg0="+rsinetsegs[0]+";":"";
for(var i=1;i<rsinetsegs.length&&i<=6;i++){
segQS+=("seg"+i+"="+rsinetsegs[i]+";");
}
}
};
function revSciTag(){
if(!bSegIncluded){
document.write(revSci_segJs);
}
DM_tag();
};
var DM_CSID="E05517";
var DM_UIDS=3;
var DM_CHN=document.location.hostname;
var DM_PIX="pix01.revsci.net";
var DM_BPIX="pix01.revsci.net";
var DM_UIDD=document.location.hostname;
var DM_UIDP="/";
var DM_UIDC="";
var DM_UIDN="";
var DM_UIDE=0;
var DM_ADMG=1;
var DM_ANLY=1;
var DM_RTRY=0;
var DM_DREF=0;
var DM_LOAD_TIME=0;
var DM_TOUT_PIX_PATH="";
var DM_CSES=0;
var DM_CTST=0;
var DM_MULT=0;
var DM_FRAG=0;
var DM_RCRC=0;
var DM_BOOM_ON=0;
var DM_BOOM_DMN="";
var DM_BOOM_SRC="";
var DM_BOOM_DCN="";
var thisfsurl=new String(document.location);
var DM_TEST=0;
var DM_REQS=0;
var _DTE=new Date();
var _UNV=navigator;
var _UDC=document;
var _CHR=null;
var _sImg=new Array();
var _evts=new Array();
var _hexc=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
var _BCL1="?&=%.()";
var _GCL2="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var _TGID="a"+_hexc[(DM_TEST<<3|DM_REQS<<2|DM_ADMG<<1|DM_ANLY)];
var _name=_UDC.title;
for(_CHR="",i=0;i<256;i++){
_CHR+=String.fromCharCode(i);
}
var _CRCTbl=new Array(0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117);
var _UID=0;
var _UTZ=(-1*_DTE.getTimezoneOffset())+720;
var _UCS=((DM_CTST)?(_gc(_sc("TC0",1,DM_CHN,"/",0,0))==1?1:0)+(_gc(_sc("TC1",1,DM_CHN,"/",1,0))==1?2:0):0);
var _USID=((DM_CSES)?_sessID():0);
var _CNV="";
var _LOC=_UDC.location.toString();
var _REF=_UDC.referrer.toString();
var _CLD=0;
function DM_tag(){
if(thisfsurl.indexOf("revenuesciencetest=1")!=-1){
document.write("rs ok");
}
if(_CLD==0||DM_MULT==1){
_CLD=1;
switch(DM_UIDS){
case 1:
case 2:
case 5:
var cke=_gc(DM_UIDC);
if(cke==null){
_UID=-1;
}else{
if(cke.indexOf("/")>=0||cke.indexOf("?")>=0){
_UID=-1;
}else{
_UID="DMID"+DM_UIDS+"="+escape(cke);
}
}
break;
case 4:
if((_UID=_gc(DM_UIDN))==null){
_UID=_genID();
_sc(DM_UIDN,_UID,DM_UIDD,DM_UIDP,DM_UIDE,0);
}
_UID="DMID4="+_UID;
break;
}
for(var i=0;i<_evts.length;i++){
_addNV("DM_EVT."+_evts[i].name,_evts[i].props);
}
if(DM_DREF==1){
_addNV("DM_LOC",_encd(_REF,_BCL1,0));
}else{
_addNV("DM_LOC",_encd(_LOC,_BCL1,0));
}
_addNV("DM_REF",_encd(_REF,_BCL1,0));
(_UID!=0&&_UID!=-1?_addNV("DM_HID",_encd(_UID,_BCL1,0)):0);
_addNV("DM_TIT",_encd(_UDC.title.toString(),_BCL1,0));
_CNV+="&DM_EOM=1";
if(_pack(_CNV)){
if(DM_BOOM_ON){
_checkBoom();
}
}
_rstReq();
}
};
function _pack(d){
var _25=new Date();
var rid=_toHex(Math.floor(_25));
var bse="",hdr="",dat="",seq=1;
var prt=location.protocol+"//";
var msl=(DM_PIX.length>DM_BPIX.length?DM_PIX.length:DM_BPIX.length);
var mrl=2000,usd=0;
d=_encd(d,_GCL2,1);
for(var _2f=0,f=1;((DM_FRAG)?(_2f<d.length):(f==1));_2f+=dat.length,f++){
hdr="/"+DM_CSID+"/"+_TGID+"/"+_UCS+"/"+DM_UIDS+"/"+_UTZ+"/"+seq+"/"+_USID+"/"+rid+"/"+_UID+"/";
bse="/"+Math.floor(Math.random()*Math.pow(10,9))+".gif?D=";
lst=(_2f+(mrl-msl-(prt+hdr+bse).length-10)>d.length?1:0);
if(!DM_FRAG){
sts=0;
}else{
if(f==1&&lst==0){
sts=1;
}else{
if(f>1&&lst==0){
sts=2;
}else{
if(f>1&&lst==1){
sts=3;
}else{
sts=0;
}
}
}
}
hdr+=sts+"/";
usd=(prt+hdr+bse).length+msl+8;
dat=d.substr(_2f,(mrl-usd-(d.charAt(_2f+(mrl-usd-1))=="%"?1:(d.charAt(_2f+(mrl-usd-2))=="%"?2:0))));
hdr+=_pad(((DM_RCRC)?_toHex(_crc32(dat)):0),8);
_ship(_toHex(Math.floor(Math.random()*Math.pow(10,9))),prt,DM_PIX,DM_BPIX,hdr+bse+dat,0);
seq++;
}
return 1;
};
function _ship(srl,p,s1,s2,u,t){
if(_sImg[srl]==null){
_sImg[srl]=new Image(2,3);
}
if(t<2){
_sImg[srl].src=p+s1+u;
}else{
if(t<4){
_sImg[srl].src=p+s2+u;
}
}
if(DM_LOAD_TIME>0){
setTimeout("isPixLoaded(_sImg['"+srl+"']);",parseInt(DM_LOAD_TIME)*1000);
}
if(DM_RTRY==1&&DM_LOAD_TIME==0){
_sImg[srl].onerror=function(){
setTimeout("_ship('"+srl+"','"+p+"','"+s1+"','"+s2+"','"+u+"',"+(t+1)+")",5000);
};
}
};
function isPixLoaded(pix){
var _38=new Image();
if(pix.complete){
return pix;
}else{
return pix.src=DM_TOUT_PIX_PATH;
}
};
function _addNV(n,v){
_CNV+=(_CNV?"&":"")+n+"="+v;
};
function _genID(){
return _toHex(Math.floor(_DTE))+"-"+_toHex(Math.floor(Math.random()*Math.pow(10,16)))+"-"+_toHex(_crc32("".concat(_UDC.referrer,_UDC.cookie,_UNV.userAgent,_UTZ,screen.width,screen.height)));
};
function _sessID(){
var sID=_gc("DMSID");
if(sID==null){
sID=_gc(_sc("DMSID",_genID(),DM_UIDD,DM_UIDP,0,0));
}
return (sID);
};
function _sc(n,v,d,p,e,o){
var _42=new Date();
if((n!=""&&v!="")&&(_gc(n)==null||o==1)){
_42.setDate(_DTE.getDate()+e);
_UDC.cookie=n+"="+v+(p!=""?";path="+p:"")+(d!=""?";domain="+d:"")+(e>0?";expires="+_42.toGMTString():"");
}
return n;
};
function _gc(n){
var co=_UDC.cookie;
var pos=co.indexOf(n+"=");
return pos!=-1?co.substring(pos+n.length+1,(co.indexOf("; ",pos)!=-1?co.indexOf("; ",pos):co.length)):null;
};
function _encd(s,_47,b){
for(var i=0,ns="",c="";i<s.length;i++){
if((b==1?_47.indexOf(s.charAt(i))>=0:_47.indexOf(s.charAt(i))<0)){
ns+=s.charAt(i);
}else{
if((c=_CHR.indexOf(s.charAt(i)))>0){
ns+="%"+_pad(_toHex(c),2);
}
}
}
return ns;
};
function _crc32(buf){
i=0;
cnt=buf.length;
crc=4294967295;
while(cnt--!=0){
crc=_CRCTbl[(crc^_CHR.indexOf(buf.charAt(i++)))&255]^(crc>>>8);
}
crc^=4294967295;
crc=(crc&2147483647)+((crc<0)?2147483648:0);
return crc;
};
function _appendToUrl(u,n,v){
return u+((u.indexOf("?")==-1)?"?":"&")+n+"="+v;
};
function _toHex(n){
var rmd=0,quo=0,hex="";
if(n<16){
return _hexc[n];
}else{
rmd=(n%16);
quo=Math.floor((n-rmd)/16);
return (_toHex(quo)+_toHex(rmd));
}
};
function _pad(d,p){
d+="";
while(d.length<p){
d="0"+d;
}
return d;
};
function _checkBoom(){
var _56="",_57="",_58=0,_59=0;
if((_56=_gc("DMSEG"))!=null){
if((_57=_gc("DMBOM"))!=null){
_58=_pad(_toHex(_crc32(_56)),8);
_59=_57.substr(0,_57.indexOf("&"));
if(_58!=_59){
_sendBoom(_56,_58,DM_BOOM_DMN,DM_BOOM_SRC,DM_BOOM_DCN);
}
}else{
_sendBoom(_56,_pad(_toHex(_crc32(_56)),8),DM_BOOM_DMN,DM_BOOM_SRC,DM_BOOM_DCN);
}
}
};
function _sendBoom(_5a,crc,dmn,src,dcn){
var _5f,_60,rid=0,i=0,bl="",u="";
_5a=unescape(_5a);
_5f=_5a.split("&");
if(_5f.length>=6){
if(_5f[5].length>0){
_60=_5f[5].split(",");
while(i<_60.length){
bl+="boom="+_60[i]+";";
i++;
}
rid=Math.floor(Math.random()*Math.pow(10,9));
u="/src="+src+";dcnet="+dcn+";"+bl+"sz=1x1;ord="+rid+"?";
_ship(rid,location.protocol+"//",dmn,dmn,u,0);
_setBoom(crc,1);
}else{
_setBoom(crc,0);
}
}else{
_setBoom(crc,0);
}
};
function _setBoom(crc,snt){
_sc("DMBOM",crc+"&"+_toHex(Math.floor(_DTE))+"&"+snt,DM_CHN,"/",0,1);
};
function _rstReq(){
_CNV="";
_LOC=_UDC.location.toString();
_REF=_UDC.referrer.toString();
_UID=0;
};
function DM_event(e,n,v){
for(var i=0;i<_evts.length;i++){
if(_evts[i].name==e){
if(_evts[i].props.indexOf("("+_encd(n,_BCL1,0)+".")<0){
_evts[i].props+="("+_encd(n,_BCL1,0)+"."+_encd(v,_BCL1,0)+")";
return 1;
}else{
return 0;
}
}
}
_evts[_evts.length]={name:_encd(e,_BCL1,0),props:"("+_encd(n,_BCL1,0)+"."+_encd(v,_BCL1,0)+")"};
return 1;
};
function DM_cat(cat){
_addNV("DM_CAT",_encd(cat,_BCL1,0));
};
function DM_name(f){
_addNV("DM_NAM",_encd(f,_BCL1,0));
};
function DM_keywords(k){
_addNV("DM_KYW",_encd(k,_BCL1,0));
};
function DM_segments(s){
_addNV("DM_SEG",_encd(s,_BCL1,0));
};
function DM_addToLoc(n,v){
_LOC=_appendToUrl(_LOC,n,v);
if(DM_DREF==1){
_REF=_appendToUrl(_REF,n,v);
}
};
function displayDate(){
var _71=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var _72=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var _73=new Date();
document.write(_71[_73.getDay()]+" "+_73.getDate()+" "+_72[_73.getMonth()]+" "+_73.getFullYear());
};
function parseLayout(){
cnt=document.getElementById("maincontainer");
return new PillParser(cnt);
};
function fixLayout(_74){
for(var i=0;i<_74.length;i++){
_74[i].setHeight();
}
};
function printLayout(_76){
for(var i=0;i<_76.length;i++){
var _78=_76[i].debug();
document.write(_78);
}
};
PillParser=function(_79){
this.dom_node=_79;
return this.parse();
};
PillParser.prototype.isPlaceholder=function(_7a){
var _7b=new RegExp("\\bwpm_ph\\b");
return _7b.test(_7a.className);
};
PillParser.prototype.isPill=function(_7c){
var _7d=new RegExp("\\bpill_row\\b|\\bpill_col\\b");
return _7d.test(_7c.className);
};
PillParser.prototype.isCol=function(_7e){
var _7f=new RegExp("\\bcol\\b");
return _7f.test(_7e.className);
};
PillParser.prototype.isRow=function(_80){
var _81=new RegExp("\\brow\\b");
return _81.test(_80.className);
};
PillParser.prototype.parse=function(){
var _82=new Array();
var _83=new Array();
for(var i=0;i<this.dom_node.childNodes.length;i++){
var _85=this.dom_node.childNodes[i];
if(this.isPlaceholder(_85)){
for(var j=0;j<_85.childNodes.length;j++){
_83.push(_85.childNodes[j]);
}
}else{
_83.push(_85);
}
}
for(var i=0;i<_83.length;i++){
var _85=_83[i];
var _87=false;
if(this.isPill(_85)){
_87=new PillModel(_85);
}else{
if(this.isCol(_85)){
_87=new ColModel(_85);
}else{
if(this.isRow(_85)){
_87=new RowModel(_85);
}
}
}
if(_87){
_87.parse();
_82.push(_87);
}
}
return _82;
};
PillModel=function(_88){
this.dom_node=_88;
this.Pill=1;
};
PillModel.prototype.parse=function(){
};
PillModel.prototype.getHeight=function(){
return this.dom_node.offsetHeight;
};
PillModel.prototype.getExtra=function(_89){
var _8a=[["border-bottom-width","borderBottomWidth"],["border-top-width","borderTopWidth"],["padding-top","paddingTop"],["padding-bottom","paddingBottom"],["margin-top","marginTop"],["margin-bottom","marginBottom"]];
var _8b=0;
for(var i=0;i<_8a.length;i++){
var _8d=_8a[i];
var _8e=null;
if(_89.currentStyle){
_8e=_89.currentStyle[_8d[1]];
}else{
if(window.getComputedStyle){
_8e=document.defaultView.getComputedStyle(_89,null).getPropertyValue(_8d[0]);
}
}
var _8f=parseInt(_8e,10);
if(!isNaN(_8f)){
_8b+=_8f;
}
}
return _8b;
};
PillModel.prototype.reveal=function(){
};
PillModel.prototype.setHeight=function(_90){
if(!_90){
this.reveal();
return;
}
var _91=_90-this.getHeight();
var _92=_90-this.getExtra(this.dom_node);
this.dom_node.style.height=_92+"px";
var _93=new RegExp("\\bexpandable\\b");
var _94=this.dom_node.getElementsByTagName("div");
for(var i=0;i<_94.length;i++){
var _96=_94[i];
if(_93.test(_96.className)){
var _97=this.getExtra(_96);
_97=isNaN(_97)?0:_97;
var _98=_96.offsetHeight;
var _99=_98+_91-_97;
_96.style.height=_99+"px";
}
}
this.reveal();
};
PillModel.prototype.isFixedHeight=function(){
var _9a=new RegExp("\\bfixed_height\\b");
return _9a.test(this.dom_node.className);
};
PillModel.prototype.debug=function(){
return "<div style=\"border:2px solid red;padding:4px\">Pill: "+this.getHeight()+"</div>";
};
ColModel=function(_9b){
this.dom_node=_9b;
this.Col=1;
};
ColModel.prototype.parse=function(){
this.children=new PillParser(this.dom_node);
};
ColModel.prototype.getHeight=function(){
if(this.calcedHeight){
return this.calcedHeight;
}
var _9c=0;
for(var i=0;i<this.children.length;i++){
_9c+=this.children[i].getHeight();
}
this.calcedHeight=_9c;
return _9c;
};
ColModel.prototype.setHeight=function(_9e){
var _9f=this.getHeight();
var _a0=_9e-_9f;
var _a1=0;
var _a2=this.children.length;
for(var i=0;i<_a2;i++){
var _a4=this.children[i];
if(_a4.isFixedHeight&&!_a4.isFixedHeight()){
_a1++;
}
}
var _a5=0;
var _a6=0;
for(var i=0;i<_a2;i++){
var _a7=Math.floor(_a0/_a1);
if(_a6>=(_a1-1)){
_a7=_a0-_a5;
}
var _a4=this.children[i];
if(_a4.isFixedHeight&&_a4.isFixedHeight()){
_a4.setHeight();
continue;
}
if(_9e){
_a4.setHeight(_a4.getHeight()+_a7);
_a5+=_a7;
_a6++;
}else{
_a4.setHeight();
}
}
};
ColModel.prototype.debug=function(){
var str="<div style=\"border:2px solid green;padding:4px\">Col: "+this.getHeight();
for(var i=0;i<this.children.length;i++){
str+=this.children[i].debug();
}
str+="</div>";
return str;
};
ColModel.prototype.isFixedHeight=function(){
for(var i=0;i<this.children.length;i++){
if(!this.children[i].isFixedHeight()){
return false;
}
}
return true;
};
RowModel=function(_ab){
this.dom_node=_ab;
this.Row=1;
};
RowModel.prototype.parse=function(){
this.children=new PillParser(this.dom_node);
};
RowModel.prototype.setHeight=function(_ac){
var _ad=_ac;
if(!_ac){
_ad=this.getHeight();
}
for(var i=0;i<this.children.length;i++){
var _af=this.children[i];
var _b0=null;
if(this.isJustified()&&_af.getHeight()<_ad||_ac){
_b0=_ad;
}
_af.setHeight(_b0);
}
};
RowModel.prototype.getHeight=function(){
if(this.calcedHeight){
return this.calcedHeight;
}
var _b1=0;
for(var i=0;i<this.children.length;i++){
var _b3=this.children[i].getHeight();
if(_b3>_b1){
_b1=_b3;
}
}
this.calcedHeight=_b1;
return _b1;
};
RowModel.prototype.isJustified=function(){
var _b4=new RegExp("\\justified\\b");
return _b4.test(this.dom_node.className);
};
RowModel.prototype.debug=function(){
var str="<div style=\"border:2px solid blue;padding:4px\">Row: "+this.getHeight();
for(var i=0;i<this.children.length;i++){
str+=this.children[i].debug();
}
str+="</div>";
return str;
};
RowModel.prototype.isFixedHeight=function(){
for(var i=0;i<this.children.length;i++){
if(this.children[i].isFixedHeight()){
return true;
}
}
return false;
};
_MetaRegister=new Array();
function RegisterMeta(_b8,_b9){
var tmp=new Object();
tmp.meta_name=_b8;
tmp.meta_value=_b9;
_MetaRegister.push(tmp);
};
var AccordianContainer={toggleItem:function(id){
var el=dojo.query("#AccordianContent_"+id)[0];
var _bd=dojo.query("#AccordianMore_"+id)[0];
if(el.style.display=="block"){
el.style.display="none";
_bd.style.backgroundPosition="right 0";
}else{
el.style.display="block";
_bd.style.backgroundPosition="right -16px";
}
}};
function pad(_be,_bf){
var str=_be+"";
while(str.length<_bf){
str="0"+str;
}
return str;
};
function gtZero(_c1){
return (_c1>0?_c1:0);
};
function updateChristmasCountdown(){
var _c2=new Date();
var _c3=new Date(2008,11,25);
var _c4=(_c3-_c2)/60000;
var _c5=gtZero(Math.floor(_c4/1440));
var _c6=pad(gtZero(Math.floor((_c4-(_c5*1440))/60)),2);
var _c7=pad(gtZero(Math.floor((_c4-(_c5*1440)-(_c6*60)))),2);
document.getElementById("countdown-days-span").innerHTML=_c5;
document.getElementById("countdown-hours-span").innerHTML=_c6;
document.getElementById("countdown-mins-span").innerHTML=_c7;
setTimeout(updateChristmasCountdown,60000);
};
function CountingTextArea(id){
this.id=id;
this.limit;
this.component=document.getElementById(this.id+"area");
};
CountingTextArea.prototype.updateCounter=function(){
if(this.component){
var _c9=this.component.value.length;
}
if(_c9<=this.limit){
counter=document.getElementById(this.id+"counter");
if(counter){
counter.innerHTML=this.limit-_c9;
}
return;
}else{
this.component.value=this.component.value.substring(0,this.limit);
return false;
}
};
CountingTextArea.prototype.setLimit=function(_ca){
this.limit=_ca;
return;
};
function CountdownTimer(id){
this.id=id;
var _cc=document.getElementById(this.id+"-text");
var _cd=document.getElementById(this.id+"-timer");
var _ce=document.getElementById(this.id+"-days");
var _cf=document.getElementById(this.id+"-hours");
var _d0=document.getElementById(this.id+"-mins");
var _d1=document.getElementById(this.id+"-secs");
var _d2=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var _d3;
var _d4;
this.setCompletedText=function(_d5){
_d4=_d5;
};
function _d6(_d7,_d8,_d9,_da){
if(_cd){
_cd.innerHTML=_d7+":"+pad(_d8)+":"+pad(_d9)+":"+pad(_da);
}else{
if(_ce){
_ce.innerHTML=pad(_d7);
}
if(_cf){
_cf.innerHTML=pad(_d8);
}
if(_d0){
_d0.innerHTML=pad(_d9);
}
if(_d1){
_d1.innerHTML=pad(_da);
}
}
return;
};
function _dc(){
_cd.innerHTML="";
_cc.innerHTML=_d4;
return;
};
this.startTimer=function(_dd){
_d3=Date.parse(_dd);
_de();
var _df=setInterval(_de,1000);
return;
};
function _de(){
var _e0=new Date();
var _e1=_e0.getYear();
if(_e1<1000){
_e1+=1900;
}
var _e2=_e0.getMonth();
var _e3=_e0.getDate();
var _e4=_e0.getHours();
var _e5=_e0.getMinutes();
var _e6=_e0.getSeconds();
var _e7=_d2[_e2]+" "+_e3+", "+_e1+" "+_e4+":"+_e5+":"+_e6;
var _e8=Date.parse(_e7);
d_date=_d3-_e8;
d_day=Math.floor(d_date/(60*60*1000*24)*1);
d_hour=Math.floor((d_date%(60*60*1000*24))/(60*60*1000)*1);
d_min=Math.floor(((d_date%(60*60*1000*24))%(60*60*1000))/(60*1000)*1);
d_sec=Math.floor((((d_date%(60*60*1000*24))%(60*60*1000))%(60*1000))/1000*1);
if(d_day<=0&&d_hour<=0&&d_min<=0){
_dc();
}else{
_d6(d_day,d_hour,d_min,d_sec);
}
return;
};
function pad(_e9){
return (_e9<10)?"0"+_e9:_e9;
};
};
function dartUK(){
};
dartUK.svr="http://ad.uk.doubleclick.net";
dartUK.tile=0;
dartUK.checktile=0;
dartUK.ord=0;
dartUK.dInfo=new Object();
dartUK.dInfo.ad="nodata";
dartUK.dInfo.gd="nodata";
dartUK.dInfo.cd="nodata";
dartUK.dInfo.rd="nodata";
dartUK.dInfo.td="nodata";
dartUK.init=function(){
this.generatetile();
this.generateOrd();
};
dartUK.generateOrd=function(){
if(this.ord==0){
this.ord=(""+new Date().getTime()).substring(4)+(""+Math.random(1)).substring(2,6);
}
};
dartUK.generatetile=function(){
this.tile=((typeof dartCount!="undefined"))?dartCount:1;
this.checktile=1;
};
dartUK.createStubCookie=function(){
var _ea=new Date(2008,1,31);
document.cookie="dinfo=G=G1:A=A6:C=pcode:R=region:T=town; expires="+_ea.toGMTString()+";domain=orange.co.uk";
};
dartUK.readCookie=function(_eb){
var dc=document.cookie;
var _ed=_eb+"=";
var _ee=dc.indexOf("; "+_ed);
if(_ee==-1){
_ee=dc.indexOf(_ed);
if(_ee!=0){
return null;
}
}else{
_ee+=2;
}
var end=document.cookie.indexOf(";",_ee);
if(end==-1){
end=dc.length;
}
return unescape(dc.substring(_ee+_ed.length,end));
};
dartUK.processDInfo=function(){
var _f0=this.readCookie("dinfo");
if(_f0!=null){
var _f1=_f0.split(":");
for(i=0;i<_f1.length;i++){
var _f2=_f1[i].substring(0,1);
var _f3=_f1[i].split("=");
var _f4=_f3[1];
switch(_f2){
case "A":
var _f5="ad";
break;
case "C":
var _f5="cd";
break;
case "G":
var _f5="gd";
break;
case "R":
var _f5="rd";
break;
case "T":
var _f5="td";
break;
}
if(typeof _f5!="undefined"&&(_f4!=""||_f4.length!=-1||_f4!=null)){
this.dInfo[_f5]=_f4;
}
}
}
};
dartUK.buildDART=function(_f6,_f7){
var _f8="";
if(_f7==0){
this.processDInfo();
var _f9=_f6.lastIndexOf(";")+1;
var _fa=_f6.slice(0,_f9);
var _fb=_f6.slice(_f9);
var _fc="";
if(this.dInfo){
_fc=segQS+"ad="+this.dInfo.ad+";gd="+this.dInfo.gd+";cd="+this.dInfo.cd+";rd="+this.dInfo.rd+";td="+this.dInfo.ad+";";
}
_f8=_fa+_fc+_fb;
return _f8;
}else{
_f8=_f6;
return _f8;
}
};
dartUK.render=function(_fd,_fe){
if(typeof _fe=="undefined"){
var _fe=0;
}
var _ff=this.buildDART(_fd,_fe);
var _100="<scri"+"pt language=\"JavaScript\" "+" src=\""+this.svr+"/adj/"+_ff+";tile="+this.tile+";ord="+this.ord+"?\" type=\"text/javascript\">"+"</scr"+"ipt>";
this.tile++;
document.write(_100);
};
dartUK.init();
function pad(_101,_102){
var str=_101+"";
while(str.length<_102){
str="0"+str;
}
return str;
};
function gtZero(_104){
return (_104>0?_104:0);
};
function updateEventCountdown(_105){
_105=String(_105);
var year=_105.substr(0,4);
var _107=Number(_105.substr(4,2))-1;
var day=_105.substr(6,2);
var _109=new Date();
var _10a=new Date(year,_107,day);
var _10b=(_10a-_109)/60000;
var days=gtZero(Math.floor(_10b/1440));
var _10d=pad(gtZero(Math.floor((_10b-(days*1440))/60)),2);
var mins=pad(gtZero(Math.floor((_10b-(days*1440)-(_10d*60)))),2);
document.getElementById("countdown-days-span").innerHTML=days;
document.getElementById("countdown-hours-span").innerHTML=_10d;
document.getElementById("countdown-mins-span").innerHTML=mins;
setTimeout("updateEventCountdown('"+_105+"')",60000);
};
function pad(_10f,_110){
var str=_10f+"";
while(str.length<_110){
str="0"+str;
}
return str;
};
function gtZero(_112){
return (_112>0?_112:0);
};
function updateOWCountdown(){
var _113=new Date();
var _114=_113.getDay();
var _115=3;
if(_114==_115){
document.getElementById("countdownContainerWednesday").style.display="block";
document.getElementById("countdownContainer").style.display="none";
return false;
}else{
var diff=(7-_114)+_115;
var _117=new Date(_113.getFullYear(),_113.getMonth(),_113.getDate()+diff);
document.getElementById("countdownContainer").style.display="block";
document.getElementById("countdownContainerWednesday").style.display="none";
}
var _118=(_117-_113)/60000;
var days=gtZero(Math.floor(_118/1440));
var _11a=pad(gtZero(Math.floor((_118-(days*1440))/60)),2);
var mins=pad(gtZero(Math.floor((_118-(days*1440)-(_11a*60)))),2);
displayDays=pad(days%7,2);
document.getElementById("countdown-days-div").innerHTML=displayDays;
document.getElementById("countdown-hours-div").innerHTML=_11a;
document.getElementById("countdown-mins-div").innerHTML=mins;
setTimeout(updateOWCountdown,60000);
};
var FlexCarousel={galleryArray:[],galleryMeta:[],galleryCallback:function(id){
var _11d="lightbox_"+id;
var _11e=dojo.query("#"+_11d)[0];
if(dojo.isIE&&_11e){
_11e.style.display="none";
}
var _11f=dojo.query("p#loading_text_"+id);
if(_11f[0]){
_11f[0].style.display="none";
}
return this.galleryArray[id];
},lightboxGalleryCallback:function(id){
return this.galleryArray[id];
},initLightbox:function(_121){
},imageClicked:function(_122,_123){
var _124="lightbox_"+_123;
var _125=dijit.byId(_124);
if(_125){
_125.duration=1;
_124="#"+_124;
if(dojo.isIE){
dojo.query(_124)[0].style.display="block";
}
var _126=this.getImageObject(_122,_123);
var _127=dojo.query(_124+" div.image a")[0];
_127.removeChild(dojo.query(_124+" div.image a img")[0]);
if(typeof (document.getElementById("flexcarousel_lightbox_"+_123).selectImage)=="function"){
document.getElementById("flexcarousel_lightbox_"+_123).selectImage(_122);
}
var _128=dojo.query(_124+" div.caption")[0];
if(_126.caption){
_128.style.display="block";
_128.innerHTML=this.html_entity_decode(_126.caption);
}else{
_128.style.display="none";
}
var _129=document.createElement("img");
_127.appendChild(_129);
dojo.attr(_129,"src",_126.src);
_125.show();
var meta=this.galleryMeta[_123];
orangeTrack("webtrends","lightbox_gallery",{galleryId:meta.id,title:meta.title,contentGroup:meta.contentGroup,imagePosition:_126.position});
}
},lightboxImageClicked:function(_12b,_12c){
},getImageObject:function(_12d,_12e){
var _12f=this.galleryArray[_12e];
for(var i=0;i<_12f.length;i++){
if(_12f[i].id==_12d){
return _12f[i];
}
}
return false;
},html_entity_decode:function(str){
var ta=document.createElement("textarea");
ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");
var _133=ta.value;
ta=null;
return _133;
}};
function closeLightbox(_134){
var _135="lightbox_"+_134;
var _136=dijit.byId(_135);
_136.hide();
};
function log(_137){
console.log(_137);
};
function gallerySubmitVoteForm(_138){
var _139=false;
var _13a=document.forms["form_"+_138].elements;
for(var i=0;i<_13a.length;i++){
var el=document.forms["form_"+_138].elements[i];
if(el.type=="radio"){
if(el.checked){
_139=true;
}
}
}
if(!_139){
alert("Please select an option before you click Vote");
return false;
}
return true;
};
function HeadlineFeature(id){
this.id=id;
this.component=document.getElementById(this.id);
this.currentpane=1;
};
HeadlineFeature.prototype.switchto=function(_13e){
if(this.component&&_13e!=this.currentpane){
var _13f=document.getElementById(this.id+"-"+this.currentpane);
if(_13f){
_13f.className="HeadlineFeatureItem";
}
var _140=document.getElementById(this.id+"-"+_13e);
if(_140){
_140.className="HeadlineFeatureItem open";
this.currentpane=_13e;
}
}
return false;
};
function horseracingChangeSelectedMeeting(){
var _141=document.location.href.split("?");
var _142=_141[0]+"?meeting="+escape(document.getElementById("meeting_select").value);
document.location=_142;
};
function horseracingChangeSelectedDate(){
var _143=document.location.href.split("?");
var _144=_143[0]+"?day="+escape(document.getElementById("date_select").value);
document.location=_144;
};
function BuildAndVerify(f,_146){
var _147=document.forms[_146]["iDepDay"];
var _148=document.forms[_146]["sDepMth"];
var _149=_147[_147.selectedIndex].value;
var _14a=_148[_148.selectedIndex].value;
var _14b=document.forms[_146]["iRetDay"];
var _14c=document.forms[_146]["sRetMth"];
var _14d=_147[_14b.selectedIndex].value;
var _14e=_148[_14c.selectedIndex].value;
if(_149.length==1){
_149="0"+_149;
}
if(_14d.length==1){
_14d="0"+_14d;
}
var _14f=""+_149+"/"+_14a.substring(4)+"/"+_14a.substring(2,4);
var _150=""+_14d+"/"+_14e.substring(4)+"/"+_14e.substring(2,4);
document.forms[_146]["d1"].value=_14f;
document.forms[_146]["d2"].value=_150;
return true;
};
function updateReturnDate(x,ret,_153){
var _154=document.forms[_153][ret];
_154.selectedIndex=x;
};
function greyOutFields(b,_156){
var _157=document.forms[_156]["iRetDay"];
var _158=document.forms[_156]["sRetMth"];
if(b){
_158.style.background="#ccc";
_157.style.background="#ccc";
}else{
_158.style.background="#fff";
_157.style.background="#fff";
}
};
Calendar=function(_159,_15a,_15b,_15c){
this.activeDiv=null;
this.currentDateEl=null;
this.getDateStatus=null;
this.getDateToolTip=null;
this.getDateText=null;
this.timeout=null;
this.onSelected=_15b||null;
this.onClose=_15c||null;
this.dragging=false;
this.hidden=false;
this.minYear=1970;
this.maxYear=2050;
this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];
this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];
this.isPopup=true;
this.weekNumbers=true;
this.firstDayOfWeek=typeof _159=="number"?_159:Calendar._FD;
this.showsOtherMonths=false;
this.dateStr=_15a;
this.ar_days=null;
this.showsTime=false;
this.time24=true;
this.yearStep=2;
this.hiliteToday=true;
this.multiple=null;
this.table=null;
this.element=null;
this.tbody=null;
this.firstdayname=null;
this.monthsCombo=null;
this.yearsCombo=null;
this.hilitedMonth=null;
this.activeMonth=null;
this.hilitedYear=null;
this.activeYear=null;
this.dateClicked=false;
this.startDate=null;
this.endDate=null;
if(typeof Calendar._SDN=="undefined"){
if(typeof Calendar._SDN_len=="undefined"){
Calendar._SDN_len=3;
}
var ar=new Array();
for(var i=8;i>0;){
ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);
}
Calendar._SDN=ar;
if(typeof Calendar._SMN_len=="undefined"){
Calendar._SMN_len=3;
}
ar=new Array();
for(var i=12;i>0;){
ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);
}
Calendar._SMN=ar;
}
};
Calendar._C=null;
Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));
Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));
Calendar.is_opera=/opera/i.test(navigator.userAgent);
Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);
Calendar.getAbsolutePos=function(el){
var SL=0,ST=0;
var _162=/^div$/i.test(el.tagName);
if(_162&&el.scrollLeft){
SL=el.scrollLeft;
}
if(_162&&el.scrollTop){
ST=el.scrollTop;
}
var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};
if(el.offsetParent){
var tmp=this.getAbsolutePos(el.offsetParent);
r.x+=tmp.x;
r.y+=tmp.y;
}
return r;
};
Calendar.isRelated=function(el,evt){
var _167=evt.relatedTarget;
if(!_167){
var type=evt.type;
if(type=="mouseover"){
_167=evt.fromElement;
}else{
if(type=="mouseout"){
_167=evt.toElement;
}
}
}
while(_167){
if(_167==el){
return true;
}
_167=_167.parentNode;
}
return false;
};
Calendar.removeClass=function(el,_16a){
if(!(el&&el.className)){
return;
}
var cls=el.className.split(" ");
var ar=new Array();
for(var i=cls.length;i>0;){
if(cls[--i]!=_16a){
ar[ar.length]=cls[i];
}
}
el.className=ar.join(" ");
};
Calendar.addClass=function(el,_16f){
Calendar.removeClass(el,_16f);
el.className+=" "+_16f;
};
Calendar.getElement=function(ev){
var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;
while(f.nodeType!=1||/^div$/i.test(f.tagName)){
f=f.parentNode;
}
return f;
};
Calendar.getTargetElement=function(ev){
var f=Calendar.is_ie?window.event.srcElement:ev.target;
while(f.nodeType!=1){
f=f.parentNode;
}
return f;
};
Calendar.stopEvent=function(ev){
ev||(ev=window.event);
if(Calendar.is_ie){
ev.cancelBubble=true;
ev.returnValue=false;
}else{
ev.preventDefault();
ev.stopPropagation();
}
return false;
};
Calendar.addEvent=function(el,_176,func){
if(el.attachEvent){
el.attachEvent("on"+_176,func);
}else{
if(el.addEventListener){
el.addEventListener(_176,func,true);
}else{
el["on"+_176]=func;
}
}
};
Calendar.removeEvent=function(el,_179,func){
if(el.detachEvent){
el.detachEvent("on"+_179,func);
}else{
if(el.removeEventListener){
el.removeEventListener(_179,func,true);
}else{
el["on"+_179]=null;
}
}
};
Calendar.createElement=function(type,_17c){
var el=null;
if(document.createElementNS){
el=document.createElementNS("http://www.w3.org/1999/xhtml",type);
}else{
el=document.createElement(type);
}
if(typeof _17c!="undefined"){
_17c.appendChild(el);
}
return el;
};
Calendar._add_evs=function(el){
with(Calendar){
addEvent(el,"mouseover",dayMouseOver);
addEvent(el,"mousedown",dayMouseDown);
addEvent(el,"mouseout",dayMouseOut);
if(is_ie){
addEvent(el,"dblclick",dayMouseDblClick);
el.setAttribute("unselectable",true);
}
}
};
Calendar.findMonth=function(el){
if(typeof el.month!="undefined"){
return el;
}else{
if(typeof el.parentNode.month!="undefined"){
return el.parentNode;
}
}
return null;
};
Calendar.findYear=function(el){
if(typeof el.year!="undefined"){
return el;
}else{
if(typeof el.parentNode.year!="undefined"){
return el.parentNode;
}
}
return null;
};
Calendar.showMonthsCombo=function(){
var cal=Calendar._C;
if(!cal){
return false;
}
var cal=cal;
var cd=cal.activeDiv;
var mc=cal.monthsCombo;
if(cal.hilitedMonth){
Calendar.removeClass(cal.hilitedMonth,"hilite");
}
if(cal.activeMonth){
Calendar.removeClass(cal.activeMonth,"active");
}
var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];
Calendar.addClass(mon,"active");
cal.activeMonth=mon;
var s=mc.style;
s.display="block";
if(cd.navtype<0){
s.left=cd.offsetLeft+"px";
}else{
var mcw=mc.offsetWidth;
if(typeof mcw=="undefined"){
mcw=50;
}
s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";
}
s.top=(cd.offsetTop+cd.offsetHeight)+"px";
};
Calendar.showYearsCombo=function(fwd){
var cal=Calendar._C;
if(!cal){
return false;
}
var cal=cal;
var cd=cal.activeDiv;
var yc=cal.yearsCombo;
if(cal.hilitedYear){
Calendar.removeClass(cal.hilitedYear,"hilite");
}
if(cal.activeYear){
Calendar.removeClass(cal.activeYear,"active");
}
cal.activeYear=null;
var Y=cal.date.getFullYear()+(fwd?1:-1);
var yr=yc.firstChild;
var show=false;
for(var i=12;i>0;--i){
if(Y>=cal.minYear&&Y<=cal.maxYear){
yr.innerHTML=Y;
yr.year=Y;
yr.style.display="block";
show=true;
}else{
yr.style.display="none";
}
yr=yr.nextSibling;
Y+=fwd?cal.yearStep:-cal.yearStep;
}
if(show){
var s=yc.style;
s.display="block";
if(cd.navtype<0){
s.left=cd.offsetLeft+"px";
}else{
var ycw=yc.offsetWidth;
if(typeof ycw=="undefined"){
ycw=50;
}
s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";
}
s.top=(cd.offsetTop+cd.offsetHeight)+"px";
}
};
Calendar.tableMouseUp=function(ev){
var cal=Calendar._C;
if(!cal){
return false;
}
if(cal.timeout){
clearTimeout(cal.timeout);
}
var el=cal.activeDiv;
if(!el){
return false;
}
var _194=Calendar.getTargetElement(ev);
ev||(ev=window.event);
Calendar.removeClass(el,"active");
if(_194==el||_194.parentNode==el){
Calendar.cellClick(el,ev);
}
var mon=Calendar.findMonth(_194);
var date=null;
if(mon){
date=new Date(cal.date);
if(mon.month!=date.getMonth()){
date.setMonth(mon.month);
cal.setDate(date);
cal.dateClicked=false;
cal.callHandler();
}
}else{
var year=Calendar.findYear(_194);
if(year){
date=new Date(cal.date);
if(year.year!=date.getFullYear()){
date.setFullYear(year.year);
cal.setDate(date);
cal.dateClicked=false;
cal.callHandler();
}
}
}
with(Calendar){
removeEvent(document,"mouseup",tableMouseUp);
removeEvent(document,"mouseover",tableMouseOver);
removeEvent(document,"mousemove",tableMouseOver);
cal._hideCombos();
_C=null;
return stopEvent(ev);
}
};
Calendar.tableMouseOver=function(ev){
var cal=Calendar._C;
if(!cal){
return;
}
var el=cal.activeDiv;
var _19b=Calendar.getTargetElement(ev);
if(_19b==el||_19b.parentNode==el){
Calendar.addClass(el,"hilite active");
Calendar.addClass(el.parentNode,"rowhilite");
}else{
if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2))){
Calendar.removeClass(el,"active");
}
Calendar.removeClass(el,"hilite");
Calendar.removeClass(el.parentNode,"rowhilite");
}
ev||(ev=window.event);
if(el.navtype==50&&_19b!=el){
var pos=Calendar.getAbsolutePos(el);
var w=el.offsetWidth;
var x=ev.clientX;
var dx;
var _1a0=true;
if(x>pos.x+w){
dx=x-pos.x-w;
_1a0=false;
}else{
dx=pos.x-x;
}
if(dx<0){
dx=0;
}
var _1a1=el._range;
var _1a2=el._current;
var _1a3=Math.floor(dx/10)%_1a1.length;
for(var i=_1a1.length;--i>=0;){
if(_1a1[i]==_1a2){
break;
}
}
while(_1a3-->0){
if(_1a0){
if(--i<0){
i=_1a1.length-1;
}
}else{
if(++i>=_1a1.length){
i=0;
}
}
}
var _1a5=_1a1[i];
el.innerHTML=_1a5;
cal.onUpdateTime();
}
var mon=Calendar.findMonth(_19b);
if(mon){
if(mon.month!=cal.date.getMonth()){
if(cal.hilitedMonth){
Calendar.removeClass(cal.hilitedMonth,"hilite");
}
Calendar.addClass(mon,"hilite");
cal.hilitedMonth=mon;
}else{
if(cal.hilitedMonth){
Calendar.removeClass(cal.hilitedMonth,"hilite");
}
}
}else{
if(cal.hilitedMonth){
Calendar.removeClass(cal.hilitedMonth,"hilite");
}
var year=Calendar.findYear(_19b);
if(year){
if(year.year!=cal.date.getFullYear()){
if(cal.hilitedYear){
Calendar.removeClass(cal.hilitedYear,"hilite");
}
Calendar.addClass(year,"hilite");
cal.hilitedYear=year;
}else{
if(cal.hilitedYear){
Calendar.removeClass(cal.hilitedYear,"hilite");
}
}
}else{
if(cal.hilitedYear){
Calendar.removeClass(cal.hilitedYear,"hilite");
}
}
}
return Calendar.stopEvent(ev);
};
Calendar.tableMouseDown=function(ev){
if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){
return Calendar.stopEvent(ev);
}
};
Calendar.calDragIt=function(ev){
var cal=Calendar._C;
if(!(cal&&cal.dragging)){
return false;
}
var posX;
var posY;
if(Calendar.is_ie){
posY=window.event.clientY+document.body.scrollTop;
posX=window.event.clientX+document.body.scrollLeft;
}else{
posX=ev.pageX;
posY=ev.pageY;
}
cal.hideShowCovered();
var st=cal.element.style;
st.left=(posX-cal.xOffs)+"px";
st.top=(posY-cal.yOffs)+"px";
return Calendar.stopEvent(ev);
};
Calendar.calDragEnd=function(ev){
var cal=Calendar._C;
if(!cal){
return false;
}
cal.dragging=false;
with(Calendar){
removeEvent(document,"mousemove",calDragIt);
removeEvent(document,"mouseup",calDragEnd);
tableMouseUp(ev);
}
cal.hideShowCovered();
};
Calendar.dayMouseDown=function(ev){
var el=Calendar.getElement(ev);
if(el.disabled){
return false;
}
var cal=el.calendar;
cal.activeDiv=el;
Calendar._C=cal;
if(el.navtype!=300){
with(Calendar){
if(el.navtype==50){
el._current=el.innerHTML;
addEvent(document,"mousemove",tableMouseOver);
}else{
addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);
}
addClass(el,"hilite active");
addEvent(document,"mouseup",tableMouseUp);
}
}else{
if(cal.isPopup){
cal._dragStart(ev);
}
}
if(el.navtype==-1||el.navtype==1){
if(cal.timeout){
clearTimeout(cal.timeout);
}
cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);
}else{
if(el.navtype==-2||el.navtype==2){
if(cal.timeout){
clearTimeout(cal.timeout);
}
cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);
}else{
cal.timeout=null;
}
}
return Calendar.stopEvent(ev);
};
Calendar.dayMouseDblClick=function(ev){
Calendar.cellClick(Calendar.getElement(ev),ev||window.event);
if(Calendar.is_ie){
document.selection.empty();
}
};
Calendar.dayMouseOver=function(ev){
var el=Calendar.getElement(ev);
if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){
return false;
}
if(el.ttip){
if(el.ttip.substr(0,1)=="_"){
el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);
}
el.calendar.tooltips.innerHTML=el.ttip;
}
if(el.navtype!=300){
Calendar.addClass(el,"hilite");
if(el.caldate){
Calendar.addClass(el.parentNode,"rowhilite");
}
}
return Calendar.stopEvent(ev);
};
Calendar.dayMouseOut=function(ev){
with(Calendar){
var el=getElement(ev);
if(isRelated(el,ev)||_C||el.disabled){
return false;
}
removeClass(el,"hilite");
if(el.caldate){
removeClass(el.parentNode,"rowhilite");
}
if(el.calendar){
el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];
}
return stopEvent(ev);
}
};
Calendar.cellClick=function(el,ev){
var cal=el.calendar;
var _1bb=false;
var _1bc=false;
var date=null;
if(typeof el.navtype=="undefined"){
if(cal.currentDateEl){
Calendar.removeClass(cal.currentDateEl,"selected");
Calendar.addClass(el,"selected");
_1bb=(cal.currentDateEl==el);
if(!_1bb){
cal.currentDateEl=el;
}
}
cal.date.setDateOnly(el.caldate);
date=cal.date;
var _1be=!(cal.dateClicked=!el.otherMonth);
if(!_1be&&!cal.currentDateEl){
cal._toggleMultipleDate(new Date(date));
}else{
_1bc=!el.disabled;
}
if(_1be){
cal._init(cal.firstDayOfWeek,date);
}
}else{
if(el.navtype==200){
Calendar.removeClass(el,"hilite");
cal.callCloseHandler();
return;
}
date=new Date(cal.date);
if(el.navtype==0){
date.setDateOnly(new Date());
}
cal.dateClicked=false;
var year=date.getFullYear();
var mon=date.getMonth();
function _1c1(m){
var day=date.getDate();
var max=date.getMonthDays(m);
if(day>max){
date.setDate(max);
}
date.setMonth(m);
};
switch(el.navtype){
case 400:
Calendar.removeClass(el,"hilite");
var text=Calendar._TT["ABOUT"];
if(typeof text!="undefined"){
text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";
}else{
text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to <mihai_bazon@yahoo.com> to get it into the distribution  ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";
}
alert(text);
return;
case -2:
if(year>cal.minYear){
date.setFullYear(year-1);
}
break;
case -1:
if(mon>0){
_1c1(mon-1);
}else{
if(year-->cal.minYear){
date.setFullYear(year);
_1c1(11);
}
}
break;
case 1:
if(mon<11){
_1c1(mon+1);
}else{
if(year<cal.maxYear){
date.setFullYear(year+1);
_1c1(0);
}
}
break;
case 2:
if(year<cal.maxYear){
date.setFullYear(year+1);
}
break;
case 100:
cal.setFirstDayOfWeek(el.fdow);
return;
case 50:
var _1c6=el._range;
var _1c7=el.innerHTML;
for(var i=_1c6.length;--i>=0;){
if(_1c6[i]==_1c7){
break;
}
}
if(ev&&ev.shiftKey){
if(--i<0){
i=_1c6.length-1;
}
}else{
if(++i>=_1c6.length){
i=0;
}
}
var _1c9=_1c6[i];
el.innerHTML=_1c9;
cal.onUpdateTime();
return;
case 0:
if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){
return false;
}
break;
}
if(!date.equalsTo(cal.date)){
cal.setDate(date);
_1bc=true;
}else{
if(el.navtype==0){
_1bc=_1bb=true;
}
}
}
if(_1bc){
ev&&cal.callHandler();
}
if(_1bb){
Calendar.removeClass(el,"hilite");
ev&&cal.callCloseHandler();
}
};
Calendar.prototype.create=function(_par){
var _1cb=null;
if(!_par){
_1cb=document.getElementsByTagName("body")[0];
this.isPopup=true;
}else{
_1cb=_par;
this.isPopup=false;
}
this.date=this.dateStr?new Date(this.dateStr):new Date();
var _1cc=Calendar.createElement("table");
this.table=_1cc;
_1cc.cellSpacing=0;
_1cc.cellPadding=0;
_1cc.calendar=this;
Calendar.addEvent(_1cc,"mousedown",Calendar.tableMouseDown);
var div=Calendar.createElement("div");
this.element=div;
div.className="calendar";
if(this.isPopup){
div.style.position="absolute";
div.style.display="none";
}
div.appendChild(_1cc);
var _1ce=Calendar.createElement("thead",_1cc);
var cell=null;
var row=null;
var cal=this;
var hh=function(text,cs,_1d5){
cell=Calendar.createElement("td",row);
cell.colSpan=cs;
cell.className="button";
if(_1d5!=0&&Math.abs(_1d5)<=2){
cell.className+=" nav";
}
Calendar._add_evs(cell);
cell.calendar=cal;
cell.navtype=_1d5;
cell.innerHTML="<div unselectable='on'>"+text+"</div>";
return cell;
};
var _1d6=function(text,cs){
cell=Calendar.createElement("td",row);
cell.colSpan=cs;
cell.className="button";
cell.calendar=cal;
cell.innerHTML=" ";
return cell;
};
var hhi=function(_1da,cs,_1dc,id){
cell=Calendar.createElement("td",row);
cell.colSpan=cs;
cell.className="button";
if(_1dc!=0&&Math.abs(_1dc)<=2){
cell.className+=" nav";
}
Calendar._add_evs(cell);
cell.calendar=cal;
cell.navtype=_1dc;
cell.innerHTML="<div unselectable='on' id='"+id+"'></div>";
return cell;
};
row=Calendar.createElement("tr",_1ce);
var _1de=6;
(this.isPopup)&&--_1de;
(this.weekNumbers)&&++_1de;
hh("?",1,400).ttip=Calendar._TT["INFO"];
this.title=hh("",_1de,300);
this.title.className="caltitle";
if(this.isPopup){
this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];
this.title.style.cursor="move";
hh("&#x00d7;",1,200).ttip=Calendar._TT["CLOSE"];
}
row=Calendar.createElement("tr",_1ce);
row.className="headrow";
this._nav_pm=hhi("",2,-1,"back_btn");
this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];
this._nav_now=_1d6("",this.weekNumbers?4:3);
this._nav_now.ttip="";
this._nav_nm=hhi("",2,1,"next_btn");
this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];
row=Calendar.createElement("tr",_1ce);
row.className="daynames";
if(this.weekNumbers){
cell=Calendar.createElement("td",row);
cell.className="name wn";
cell.innerHTML=Calendar._TT["WK"];
}
for(var i=7;i>0;--i){
cell=Calendar.createElement("td",row);
if(!i){
cell.navtype=100;
cell.calendar=this;
Calendar._add_evs(cell);
}
}
this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;
this._displayWeekdays();
var _1e0=Calendar.createElement("tbody",_1cc);
this.tbody=_1e0;
for(i=6;i>0;--i){
row=Calendar.createElement("tr",_1e0);
if(this.weekNumbers){
cell=Calendar.createElement("td",row);
}
for(var j=7;j>0;--j){
cell=Calendar.createElement("td",row);
cell.calendar=this;
Calendar._add_evs(cell);
}
}
if(this.showsTime){
row=Calendar.createElement("tr",_1e0);
row.className="time";
cell=Calendar.createElement("td",row);
cell.className="time";
cell.colSpan=2;
cell.innerHTML=Calendar._TT["TIME"]||"&nbsp;";
cell=Calendar.createElement("td",row);
cell.className="time";
cell.colSpan=this.weekNumbers?4:3;
(function(){
function _1e2(_1e3,init,_1e5,_1e6){
var part=Calendar.createElement("span",cell);
part.className=_1e3;
part.innerHTML=init;
part.calendar=cal;
part.ttip=Calendar._TT["TIME_PART"];
part.navtype=50;
part._range=[];
if(typeof _1e5!="number"){
part._range=_1e5;
}else{
for(var i=_1e5;i<=_1e6;++i){
var txt;
if(i<10&&_1e6>=10){
txt="0"+i;
}else{
txt=""+i;
}
part._range[part._range.length]=txt;
}
}
Calendar._add_evs(part);
return part;
};
var hrs=cal.date.getHours();
var mins=cal.date.getMinutes();
var t12=!cal.time24;
var pm=(hrs>12);
if(t12&&pm){
hrs-=12;
}
var H=_1e2("hour",hrs,t12?1:0,t12?12:23);
var span=Calendar.createElement("span",cell);
span.innerHTML=":";
span.className="colon";
var M=_1e2("minute",mins,0,59);
var AP=null;
cell=Calendar.createElement("td",row);
cell.className="time";
cell.colSpan=2;
if(t12){
AP=_1e2("ampm",pm?"pm":"am",["am","pm"]);
}else{
cell.innerHTML="&nbsp;";
}
cal.onSetTime=function(){
var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();
if(t12){
pm=(hrs>=12);
if(pm){
hrs-=12;
}
if(hrs==0){
hrs=12;
}
AP.innerHTML=pm?"pm":"am";
}
H.innerHTML=(hrs<10)?("0"+hrs):hrs;
M.innerHTML=(mins<10)?("0"+mins):mins;
};
cal.onUpdateTime=function(){
var date=this.date;
var h=parseInt(H.innerHTML,10);
if(t12){
if(/pm/i.test(AP.innerHTML)&&h<12){
h+=12;
}else{
if(/am/i.test(AP.innerHTML)&&h==12){
h=0;
}
}
}
var d=date.getDate();
var m=date.getMonth();
var y=date.getFullYear();
date.setHours(h);
date.setMinutes(parseInt(M.innerHTML,10));
date.setFullYear(y);
date.setMonth(m);
date.setDate(d);
this.dateClicked=false;
this.callHandler();
};
})();
}else{
this.onSetTime=this.onUpdateTime=function(){
};
}
var _1f8=Calendar.createElement("tfoot",_1cc);
row=Calendar.createElement("tr",_1f8);
row.className="footrow";
cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);
cell.className="ttip";
if(this.isPopup){
cell.ttip=Calendar._TT["DRAG_TO_MOVE"];
cell.style.cursor="move";
}
this.tooltips=cell;
div=Calendar.createElement("div",this.element);
this.monthsCombo=div;
div.className="combo";
for(i=0;i<Calendar._MN.length;++i){
var mn=Calendar.createElement("div");
mn.className=Calendar.is_ie?"label-IEfix":"label";
mn.month=i;
mn.innerHTML=Calendar._SMN[i];
div.appendChild(mn);
}
div=Calendar.createElement("div",this.element);
this.yearsCombo=div;
div.className="combo";
for(i=12;i>0;--i){
var yr=Calendar.createElement("div");
yr.className=Calendar.is_ie?"label-IEfix":"label";
div.appendChild(yr);
}
this._init(this.firstDayOfWeek,this.date);
_1cb.appendChild(this.element);
};
Calendar._keyEvent=function(ev){
var cal=window._dynarch_popupCalendar;
if(!cal||cal.multiple){
return false;
}
(Calendar.is_ie)&&(ev=window.event);
var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;
if(ev.ctrlKey){
switch(K){
case 37:
act&&Calendar.cellClick(cal._nav_pm);
break;
case 38:
act&&Calendar.cellClick(cal._nav_py);
break;
case 39:
act&&Calendar.cellClick(cal._nav_nm);
break;
case 40:
act&&Calendar.cellClick(cal._nav_ny);
break;
default:
return false;
}
}else{
switch(K){
case 32:
Calendar.cellClick(cal._nav_now);
break;
case 27:
act&&cal.callCloseHandler();
break;
case 37:
case 38:
case 39:
case 40:
if(act){
var prev,x,y,ne,el,step;
prev=K==37||K==38;
step=(K==37||K==39)?1:7;
function _205(){
el=cal.currentDateEl;
var p=el.pos;
x=p&15;
y=p>>4;
ne=cal.ar_days[y][x];
};
_205();
function _207(){
var date=new Date(cal.date);
date.setDate(date.getDate()-step);
cal.setDate(date);
};
function _209(){
var date=new Date(cal.date);
date.setDate(date.getDate()+step);
cal.setDate(date);
};
while(1){
switch(K){
case 37:
if(--x>=0){
ne=cal.ar_days[y][x];
}else{
x=6;
K=38;
continue;
}
break;
case 38:
if(--y>=0){
ne=cal.ar_days[y][x];
}else{
_207();
_205();
}
break;
case 39:
if(++x<7){
ne=cal.ar_days[y][x];
}else{
x=0;
K=40;
continue;
}
break;
case 40:
if(++y<cal.ar_days.length){
ne=cal.ar_days[y][x];
}else{
_209();
_205();
}
break;
}
break;
}
if(ne){
if(!ne.disabled){
Calendar.cellClick(ne);
}else{
if(prev){
_207();
}else{
_209();
}
}
}
}
break;
case 13:
if(act){
Calendar.cellClick(cal.currentDateEl,ev);
}
break;
default:
return false;
}
}
return Calendar.stopEvent(ev);
};
Calendar.prototype._init=function(_20b,date){
var _20d=new Date(),TY=_20d.getFullYear(),TM=_20d.getMonth(),TD=_20d.getDate();
this.table.style.visibility="hidden";
var year=date.getFullYear();
if(year<this.minYear){
year=this.minYear;
date.setFullYear(year);
}else{
if(year>this.maxYear){
year=this.maxYear;
date.setFullYear(year);
}
}
this.firstDayOfWeek=_20b;
this.date=new Date(date);
var _212=date.getMonth();
var mday=date.getDate();
var _214=date.getMonthDays();
date.setDate(1);
var day1=(date.getDay()-this.firstDayOfWeek)%7;
if(day1<0){
day1+=7;
}
date.setDate(-day1);
date.setDate(date.getDate()+1);
var row=this.tbody.firstChild;
var MN=Calendar._SMN[_212];
var _218=this.ar_days=new Array();
var _219=Calendar._TT["WEEKEND"];
var _21a=this.multiple?(this.datesCells={}):null;
for(var i=0;i<6;++i,row=row.nextSibling){
var cell=row.firstChild;
if(this.weekNumbers){
cell.className="day wn";
cell.innerHTML=date.getWeekNumber();
cell=cell.nextSibling;
}
row.className="daysrow";
var _21d=false,iday,dpos=_218[i]=[];
for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){
iday=date.getDate();
var wday=date.getDay();
cell.className="day";
cell.pos=i<<4|j;
dpos[j]=cell;
var _222=(date.getMonth()==_212);
if(!_222){
if(this.showsOtherMonths){
cell.className+=" othermonth";
cell.otherMonth=true;
}else{
cell.className="emptycell";
cell.innerHTML="&nbsp;";
cell.disabled=true;
continue;
}
}else{
cell.otherMonth=false;
_21d=true;
}
cell.disabled=false;
cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;
if(this.startDate!=null&&this.endDate!=null){
if(date<this.startDate||date>this.endDate){
cell.className="day outofrange";
}
}
if(_21a){
_21a[date.print("%Y%m%d")]=cell;
}
if(this.getDateStatus){
var _223=this.getDateStatus(date,year,_212,iday);
if(this.getDateToolTip){
var _224=this.getDateToolTip(date,year,_212,iday);
if(_224){
cell.title=_224;
}
}
if(_223===true){
cell.className+=" disabled";
cell.disabled=true;
}else{
if(/disabled/i.test(_223)){
cell.disabled=true;
}
cell.className+=" "+_223;
}
}
if(!cell.disabled){
cell.caldate=new Date(date);
cell.ttip="_";
if(!this.multiple&&_222&&iday==mday&&this.hiliteToday){
cell.className+=" selected";
this.currentDateEl=cell;
}
if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){
cell.className+=" today";
cell.ttip+=Calendar._TT["PART_TODAY"];
}
if(_219.indexOf(wday.toString())!=-1){
cell.className+=cell.otherMonth?" oweekend":" weekend";
}
}
}
if(!(_21d||this.showsOtherMonths)){
row.className="emptyrow";
}
}
this.title.innerHTML=Calendar._MN[_212]+", "+year;
this.onSetTime();
this.table.style.visibility="visible";
this._initMultipleDates();
};
Calendar.prototype._initMultipleDates=function(){
if(this.multiple){
for(var i in this.multiple){
var cell=this.datesCells[i];
var d=this.multiple[i];
if(!d){
continue;
}
if(cell){
cell.className+=" selected";
}
}
}
};
Calendar.prototype._toggleMultipleDate=function(date){
if(this.multiple){
var ds=date.print("%Y%m%d");
var cell=this.datesCells[ds];
if(cell){
var d=this.multiple[ds];
if(!d){
Calendar.addClass(cell,"selected");
this.multiple[ds]=date;
}else{
Calendar.removeClass(cell,"selected");
delete this.multiple[ds];
}
}
}
};
Calendar.prototype.setDateToolTipHandler=function(_22c){
this.getDateToolTip=_22c;
};
Calendar.prototype.setDate=function(date){
if(!date.equalsTo(this.date)){
this._init(this.firstDayOfWeek,date);
}
};
Calendar.prototype.refresh=function(){
this._init(this.firstDayOfWeek,this.date);
};
Calendar.prototype.setFirstDayOfWeek=function(_22e){
this._init(_22e,this.date);
this._displayWeekdays();
};
Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(_22f){
this.getDateStatus=_22f;
};
Calendar.prototype.setRange=function(a,z){
this.minYear=a;
this.maxYear=z;
};
Calendar.prototype.callHandler=function(){
if(this.onSelected){
this.onSelected(this,this.date.print(this.dateFormat));
}
};
Calendar.prototype.callCloseHandler=function(){
if(this.onClose){
this.onClose(this);
}
this.hideShowCovered();
};
Calendar.prototype.destroy=function(){
var el=this.element.parentNode;
el.removeChild(this.element);
Calendar._C=null;
window._dynarch_popupCalendar=null;
};
Calendar.prototype.reparent=function(_233){
var el=this.element;
el.parentNode.removeChild(el);
_233.appendChild(el);
};
Calendar._checkCalendar=function(ev){
var _236=window._dynarch_popupCalendar;
if(!_236){
return false;
}
var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);
for(;el!=null&&el!=_236.element;el=el.parentNode){
}
if(el==null){
window._dynarch_popupCalendar.callCloseHandler();
return Calendar.stopEvent(ev);
}
};
Calendar.prototype.show=function(){
var rows=this.table.getElementsByTagName("tr");
for(var i=rows.length;i>0;){
var row=rows[--i];
Calendar.removeClass(row,"rowhilite");
var _23b=row.getElementsByTagName("td");
for(var j=_23b.length;j>0;){
var cell=_23b[--j];
Calendar.removeClass(cell,"hilite");
Calendar.removeClass(cell,"active");
}
}
this.element.style.display="block";
this.hidden=false;
if(this.isPopup){
window._dynarch_popupCalendar=this;
Calendar.addEvent(document,"keydown",Calendar._keyEvent);
Calendar.addEvent(document,"keypress",Calendar._keyEvent);
Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);
}
this.hideShowCovered();
};
Calendar.prototype.hide=function(){
if(this.isPopup){
Calendar.removeEvent(document,"keydown",Calendar._keyEvent);
Calendar.removeEvent(document,"keypress",Calendar._keyEvent);
Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);
}
this.element.style.display="none";
this.hidden=true;
this.hideShowCovered();
};
Calendar.prototype.showAt=function(x,y){
var s=this.element.style;
s.left=x+"px";
s.top=y+"px";
this.show();
};
Calendar.prototype.showAtElement=function(el,opts){
var self=this;
var p=Calendar.getAbsolutePos(el);
if(!opts||typeof opts!="string"){
this.showAt(p.x,p.y+el.offsetHeight);
return true;
}
function _245(box){
if(box.x<0){
box.x=0;
}
if(box.y<0){
box.y=0;
}
var cp=document.createElement("div");
var s=cp.style;
s.position="absolute";
s.right=s.bottom=s.width=s.height="0px";
document.body.appendChild(cp);
var br=Calendar.getAbsolutePos(cp);
document.body.removeChild(cp);
if(Calendar.is_ie){
br.y+=document.body.scrollTop;
br.x+=document.body.scrollLeft;
}else{
br.y+=window.scrollY;
br.x+=window.scrollX;
}
var tmp=box.x+box.width-br.x;
if(tmp>0){
box.x-=tmp;
}
tmp=box.y+box.height-br.y;
if(tmp>0){
box.y-=tmp;
}
};
this.element.style.display="block";
Calendar.continuation_for_the_khtml_browser=function(){
var w=self.element.offsetWidth;
var h=self.element.offsetHeight;
self.element.style.display="none";
var _24d=opts.substr(0,1);
var _24e="l";
if(opts.length>1){
_24e=opts.substr(1,1);
}
switch(_24d){
case "T":
p.y-=h;
break;
case "B":
p.y+=el.offsetHeight;
break;
case "C":
p.y+=(el.offsetHeight-h)/2;
break;
case "t":
p.y+=el.offsetHeight-h;
break;
case "b":
break;
}
switch(_24e){
case "L":
p.x-=w;
break;
case "R":
p.x+=el.offsetWidth;
break;
case "C":
p.x+=(el.offsetWidth-w)/2;
break;
case "l":
p.x+=el.offsetWidth-w;
break;
case "r":
break;
}
p.width=w;
p.height=h+40;
self.monthsCombo.style.display="none";
_245(p);
self.showAt(p.x,p.y);
};
if(Calendar.is_khtml){
setTimeout("Calendar.continuation_for_the_khtml_browser()",10);
}else{
Calendar.continuation_for_the_khtml_browser();
}
};
Calendar.prototype.setDateFormat=function(str){
this.dateFormat=str;
};
Calendar.prototype.setTtDateFormat=function(str){
this.ttDateFormat=str;
};
Calendar.prototype.parseDate=function(str,fmt){
if(!fmt){
fmt=this.dateFormat;
}
this.setDate(Date.parseDate(str,fmt));
};
Calendar.prototype.hideShowCovered=function(){
if(!Calendar.is_ie&&!Calendar.is_opera){
return;
}
function _253(obj){
var _255=obj.style.visibility;
if(!_255){
if(document.defaultView&&typeof (document.defaultView.getComputedStyle)=="function"){
if(!Calendar.is_khtml){
_255=document.defaultView.getComputedStyle(obj,"").getPropertyValue("visibility");
}else{
_255="";
}
}else{
if(obj.currentStyle){
_255=obj.currentStyle.visibility;
}else{
_255="";
}
}
}
return _255;
};
var tags=new Array("applet","iframe","select");
var el=this.element;
var p=Calendar.getAbsolutePos(el);
var EX1=p.x;
var EX2=el.offsetWidth+EX1;
var EY1=p.y;
var EY2=el.offsetHeight+EY1;
for(var k=tags.length;k>0;){
var ar=document.getElementsByTagName(tags[--k]);
var cc=null;
for(var i=ar.length;i>0;){
cc=ar[--i];
p=Calendar.getAbsolutePos(cc);
var CX1=p.x;
var CX2=cc.offsetWidth+CX1;
var CY1=p.y;
var CY2=cc.offsetHeight+CY1;
if(this.hidden||(CX1>EX2)||(CX2<EX1)||(CY1>EY2)||(CY2<EY1)){
if(!cc.__msh_save_visibility){
cc.__msh_save_visibility=_253(cc);
}
cc.style.visibility=cc.__msh_save_visibility;
}else{
if(!cc.__msh_save_visibility){
cc.__msh_save_visibility=_253(cc);
}
cc.style.visibility="hidden";
}
}
}
};
Calendar.prototype._displayWeekdays=function(){
var fdow=this.firstDayOfWeek;
var cell=this.firstdayname;
var _267=Calendar._TT["WEEKEND"];
for(var i=0;i<7;++i){
cell.className="day name";
var _269=(i+fdow)%7;
if(i){
cell.ttip=Calendar._TT["DAY_FIRST"].replace("%s",Calendar._DN[_269]);
cell.navtype=100;
cell.calendar=this;
cell.fdow=_269;
Calendar._add_evs(cell);
}
if(_267.indexOf(_269.toString())!=-1){
Calendar.addClass(cell,"weekend");
}
cell.innerHTML=Calendar._SDN[(i+fdow)%7];
cell=cell.nextSibling;
}
};
Calendar.prototype._hideCombos=function(){
this.monthsCombo.style.display="none";
this.yearsCombo.style.display="none";
};
Calendar.prototype._dragStart=function(ev){
if(this.dragging){
return;
}
this.dragging=true;
var posX;
var posY;
if(Calendar.is_ie){
posY=window.event.clientY+document.body.scrollTop;
posX=window.event.clientX+document.body.scrollLeft;
}else{
posY=ev.clientY+window.scrollY;
posX=ev.clientX+window.scrollX;
}
var st=this.element.style;
this.xOffs=posX-parseInt(st.left);
this.yOffs=posY-parseInt(st.top);
with(Calendar){
addEvent(document,"mousemove",calDragIt);
addEvent(document,"mouseup",calDragEnd);
}
};
Date._MD=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
Date.SECOND=1000;
Date.MINUTE=60*Date.SECOND;
Date.HOUR=60*Date.MINUTE;
Date.DAY=24*Date.HOUR;
Date.WEEK=7*Date.DAY;
Date.parseDate=function(str,fmt){
var _270=new Date();
var y=0;
var m=-1;
var d=0;
var a=str.split(/\W+/);
var b=fmt.match(/%./g);
var i=0,j=0;
var hr=0;
var min=0;
for(i=0;i<a.length;++i){
if(!a[i]){
continue;
}
switch(b[i]){
case "%d":
case "%e":
d=parseInt(a[i],10);
break;
case "%m":
m=parseInt(a[i],10)-1;
break;
case "%Y":
case "%y":
y=parseInt(a[i],10);
(y<100)&&(y+=(y>29)?1900:2000);
break;
case "%b":
case "%B":
for(j=0;j<12;++j){
if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){
m=j;
break;
}
}
break;
case "%H":
case "%I":
case "%k":
case "%l":
hr=parseInt(a[i],10);
break;
case "%P":
case "%p":
if(/pm/i.test(a[i])&&hr<12){
hr+=12;
}else{
if(/am/i.test(a[i])&&hr>=12){
hr-=12;
}
}
break;
case "%M":
min=parseInt(a[i],10);
break;
}
}
if(isNaN(y)){
y=_270.getFullYear();
}
if(isNaN(m)){
m=_270.getMonth();
}
if(isNaN(d)){
d=_270.getDate();
}
if(isNaN(hr)){
hr=_270.getHours();
}
if(isNaN(min)){
min=_270.getMinutes();
}
if(y!=0&&m!=-1&&d!=0){
return new Date(y,m,d,hr,min,0);
}
y=0;
m=-1;
d=0;
for(i=0;i<a.length;++i){
if(a[i].search(/[a-zA-Z]+/)!=-1){
var t=-1;
for(j=0;j<12;++j){
if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){
t=j;
break;
}
}
if(t!=-1){
if(m!=-1){
d=m+1;
}
m=t;
}
}else{
if(parseInt(a[i],10)<=12&&m==-1){
m=a[i]-1;
}else{
if(parseInt(a[i],10)>31&&y==0){
y=parseInt(a[i],10);
(y<100)&&(y+=(y>29)?1900:2000);
}else{
if(d==0){
d=a[i];
}
}
}
}
}
if(y==0){
y=_270.getFullYear();
}
if(m!=-1&&d!=0){
return new Date(y,m,d,hr,min,0);
}
return _270;
};
Date.prototype.getMonthDays=function(_27b){
var year=this.getFullYear();
if(typeof _27b=="undefined"){
_27b=this.getMonth();
}
if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&_27b==1){
return 29;
}else{
return Date._MD[_27b];
}
};
Date.prototype.getDayOfYear=function(){
var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var then=new Date(this.getFullYear(),0,0,0,0,0);
var time=now-then;
return Math.floor(time/Date.DAY);
};
Date.prototype.getWeekNumber=function(){
var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);
var DoW=d.getDay();
d.setDate(d.getDate()-(DoW+6)%7+3);
var ms=d.valueOf();
d.setMonth(0);
d.setDate(4);
return Math.round((ms-d.valueOf())/(7*86400000))+1;
};
Date.prototype.equalsTo=function(date){
return ((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));
};
Date.prototype.setDateOnly=function(date){
var tmp=new Date(date);
this.setDate(1);
this.setFullYear(tmp.getFullYear());
this.setMonth(tmp.getMonth());
this.setDate(tmp.getDate());
};
Date.prototype.print=function(str){
var m=this.getMonth();
var d=this.getDate();
var y=this.getFullYear();
var wn=this.getWeekNumber();
var w=this.getDay();
var s={};
var hr=this.getHours();
var pm=(hr>=12);
var ir=(pm)?(hr-12):hr;
var dy=this.getDayOfYear();
if(ir==0){
ir=12;
}
var min=this.getMinutes();
var sec=this.getSeconds();
s["%a"]=Calendar._SDN[w];
s["%A"]=Calendar._DN[w];
s["%b"]=Calendar._SMN[m];
s["%B"]=Calendar._MN[m];
s["%C"]=1+Math.floor(y/100);
s["%d"]=(d<10)?("0"+d):d;
s["%e"]=d;
s["%H"]=(hr<10)?("0"+hr):hr;
s["%I"]=(ir<10)?("0"+ir):ir;
s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;
s["%k"]=hr;
s["%l"]=ir;
s["%m"]=(m<9)?("0"+(1+m)):(1+m);
s["%M"]=(min<10)?("0"+min):min;
s["%n"]="\n";
s["%p"]=pm?"PM":"AM";
s["%P"]=pm?"pm":"am";
s["%s"]=Math.floor(this.getTime()/1000);
s["%S"]=(sec<10)?("0"+sec):sec;
s["%t"]="\t";
s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;
s["%u"]=w+1;
s["%w"]=w;
s["%y"]=(""+y).substr(2,2);
s["%Y"]=y;
s["%%"]="%";
var re=/%./g;
if(!Calendar.is_ie5&&!Calendar.is_khtml){
return str.replace(re,function(par){
return s[par]||par;
});
}
var a=str.match(re);
for(var i=0;i<a.length;i++){
var tmp=s[a[i]];
if(tmp){
re=new RegExp(a[i],"g");
str=str.replace(re,tmp);
}
}
return str;
};
Date.prototype.__msh_oldSetFullYear=Date.prototype.setFullYear;
Date.prototype.setFullYear=function(y){
var d=new Date(this);
d.__msh_oldSetFullYear(y);
if(d.getMonth()!=this.getMonth()){
this.setDate(28);
}
this.__msh_oldSetFullYear(y);
};
window._dynarch_popupCalendar=null;
Calendar._DN=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
Calendar._SDN=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun");
Calendar._FD=0;
Calendar._MN=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
Calendar._SMN=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
Calendar._TT={};
Calendar._TT["INFO"]="About the calendar";
Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"For latest version visit: http://www.dynarch.com/projects/calendar/\n"+"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details."+"\n\n"+"Date selection:\n"+"- Use the ?, ? buttons to select year\n"+"- Use the "+String.fromCharCode(8249)+", "+String.fromCharCode(8250)+" buttons to select month\n"+"- Hold mouse button on any of the above buttons for faster selection.";
Calendar._TT["ABOUT_TIME"]="\n\n"+"Time selection:\n"+"- Click on any of the time parts to increase it\n"+"- or Shift-click to decrease it\n"+"- or click and drag for faster selection.";
Calendar._TT["PREV_YEAR"]="Prev. year (hold for menu)";
Calendar._TT["PREV_MONTH"]="Prev. month (hold for menu)";
Calendar._TT["GO_TODAY"]="Go Today";
Calendar._TT["NEXT_MONTH"]="Next month (hold for menu)";
Calendar._TT["NEXT_YEAR"]="Next year (hold for menu)";
Calendar._TT["SEL_DATE"]="Select date";
Calendar._TT["DRAG_TO_MOVE"]="Drag to move";
Calendar._TT["PART_TODAY"]=" (today)";
Calendar._TT["DAY_FIRST"]="Display %s first";
Calendar._TT["WEEKEND"]="0,6";
Calendar._TT["CLOSE"]="Close";
Calendar._TT["TODAY"]="Today";
Calendar._TT["TIME_PART"]="(Shift-)Click or drag to change value";
Calendar._TT["DEF_DATE_FORMAT"]="%Y-%m-%d";
Calendar._TT["TT_DATE_FORMAT"]="%a, %b %e";
Calendar._TT["WK"]="wk";
Calendar._TT["TIME"]="Time:";
Calendar.setup=function(_29a){
function _29b(_29c,def){
if(typeof _29a[_29c]=="undefined"){
_29a[_29c]=def;
}
};
_29b("inputField",null);
_29b("inputFields",null);
_29b("displayArea",null);
_29b("button",null);
_29b("eventName","click");
_29b("ifFormat","%Y/%m/%d");
_29b("daFormat","%Y/%m/%d");
_29b("singleClick",true);
_29b("disableFunc",null);
_29b("dateStatusFunc",_29a["disableFunc"]);
_29b("dateText",null);
_29b("firstDay",null);
_29b("align","Br");
_29b("range",[1900,2999]);
_29b("weekNumbers",false);
_29b("flat",null);
_29b("flatCallback",null);
_29b("onSelect",null);
_29b("onClose",null);
_29b("onUpdate",null);
_29b("date",null);
_29b("showsTime",false);
_29b("timeFormat","24");
_29b("electric",true);
_29b("step",1);
_29b("position",null);
_29b("cache",false);
_29b("showOthers",false);
_29b("multiple",null);
_29b("startDate",null);
_29b("endDate",null);
var tmp=["inputField","displayArea","button"];
for(var i in tmp){
if(typeof _29a[tmp[i]]=="string"){
_29a[tmp[i]]=document.getElementById(_29a[tmp[i]]);
}
}
function _2a0(cal){
var p=cal.params;
var _2a3=false;
var _2a4=(cal.dateClicked||p.electric);
if(_2a4&&p.inputField){
p.inputField.value=cal.date.print(p.ifFormat);
if(typeof p.inputField.onchange=="function"){
p.inputField.onchange();
}
}
if(_2a4&&p.displayArea){
p.displayArea.innerHTML=cal.date.print(p.daFormat);
}
if(_2a4&&typeof p.onUpdate=="function"&&cal.dateClicked){
_2a3=true;
}
if(_2a3){
p.onUpdate(cal);
}else{
return false;
}
if(_2a4&&p.flat){
if(typeof p.flatCallback=="function"){
p.flatCallback(cal);
}
}
if(_2a4&&p.singleClick&&cal.dateClicked){
cal.callCloseHandler();
}
};
if(_29a.flat!=null){
if(typeof _29a.flat=="string"){
_29a.flat=document.getElementById(_29a.flat);
}
if(!_29a.flat){
alert("Calendar.setup:\n  Flat specified but can't find parent.");
return false;
}
var cal=new Calendar(_29a.firstDay,_29a.date,_29a.onSelect||_2a0);
cal.showsOtherMonths=_29a.showOthers;
cal.showsTime=_29a.showsTime;
cal.time24=(_29a.timeFormat=="24");
cal.params=_29a;
cal.weekNumbers=_29a.weekNumbers;
cal.setRange(_29a.range[0],_29a.range[1]);
cal.setDateStatusHandler(_29a.dateStatusFunc);
cal.getDateText=_29a.dateText;
if(_29a.ifFormat){
cal.setDateFormat(_29a.ifFormat);
}
if(_29a.inputField&&typeof _29a.inputField.value=="string"){
cal.parseDate(_29a.inputField.value);
}
cal.create(_29a.flat);
cal.show();
return false;
}
var _2a6=_29a.button;
_2a6["on"+_29a.eventName]=function(){
var _2a7=_29a.inputField||_29a.displayArea;
var _2a8=_29a.inputField?_29a.ifFormat:_29a.daFormat;
var _2a9=false;
var cal=window.calendar;
if(_2a7){
_29a.date=Date.parseDate(_2a7.value||_2a7.innerHTML,_2a8);
}
if(!(cal&&_29a.cache)){
window.calendar=cal=new Calendar(_29a.firstDay,_29a.date,_29a.onSelect||_2a0,_29a.onClose||function(cal){
cal.hide();
});
cal.showsTime=_29a.showsTime;
cal.time24=(_29a.timeFormat=="24");
cal.weekNumbers=_29a.weekNumbers;
_2a9=true;
}else{
if(_29a.date){
cal.setDate(_29a.date);
}
cal.hide();
}
if(_29a.multiple){
cal.multiple={};
for(var i=_29a.multiple.length;--i>=0;){
var d=_29a.multiple[i];
var ds=d.print("%Y%m%d");
cal.multiple[ds]=d;
}
}
if(typeof _29a.custom=="object"){
cal.custom=_29a.custom;
}
cal.startDate=_29a.startDate;
cal.endDate=_29a.endDate;
cal.showsOtherMonths=_29a.showOthers;
cal.yearStep=_29a.step;
cal.setRange(_29a.range[0],_29a.range[1]);
cal.params=_29a;
cal.setDateStatusHandler(_29a.dateStatusFunc);
cal.getDateText=_29a.dateText;
cal.setDateFormat(_2a8);
if(_2a9){
cal.create();
}
cal.refresh();
if(!_29a.position){
cal.showAtElement(_29a.button||_29a.displayArea||_29a.inputField,_29a.align);
}else{
cal.showAt(_29a.position[0],_29a.position[1]);
}
return false;
};
return cal;
};
function validateComboFlightForm(fm){
var _2b0=new Date(now.getFullYear(),now.getMonth(),now.getDate());
var _2b1=fm.iDepDay.options[fm.iDepDay.selectedIndex].value;
var _2b2=fm.iRetDay.options[fm.iRetDay.selectedIndex].value;
var _2b3=fm.sDepMth.options[fm.sDepMth.selectedIndex].value;
var _2b4=fm.sRetMth.options[fm.sRetMth.selectedIndex].value;
var _2b5=_2b3.substring(0,4);
var _2b6=_2b3.substring((_2b3.length-2));
var _2b7=_2b3.substring((_2b3.length-2))-1;
var _2b8=_2b4.substring(0,4);
var _2b9=_2b4.substring((_2b4.length-2));
var _2ba=_2b4.substring((_2b4.length-2))-1;
if(_2b6<10){
_2b6=_2b6.substring((_2b6.length-1));
}
if(_2b9<10){
_2b9=_2b9.substring((_2b9.length-1));
}
if(fm.sDepart.selectedIndex==-1){
alert("Please select a departure airport.");
fm.sDepart.focus();
return false;
}
if(fm.sArrival.value==""){
alert("Please enter a destination city or airport code.");
fm.sArrival.focus();
return false;
}
if(fm.iDepDay.selectedIndex==-1){
alert("Please select a departure day.");
fm.iDepDay.focus();
return false;
}
if(fm.iRetDay.selectedIndex==-1){
alert("Please select a return day.");
fm.iRetDay.focus();
return false;
}
if(!DateOK(_2b5,_2b6,_2b1)){
alert("Please enter a valid departure date.");
fm.iDepDay.focus();
return false;
}
if(!DateOK(_2b8,_2b9,_2b2)){
alert("Please enter a valid return date.");
fm.iDepDay.focus();
return false;
}
var _2bb=new Date(_2b5,_2b7,_2b1);
var _2bc=timeDifference(_2bb,_2b0,"d");
if(_2bc<1){
alert("Your departure date must be after today.");
fm.iDepDay.focus();
return false;
}
var _2bd=new Date(_2b8,_2ba,_2b2);
var _2be=timeDifference(_2bd,_2bb,"d");
if(_2be<0){
alert("Your return date must be the same or a later date than your departure date.");
fm.iDepDay.focus();
return false;
}
processComboFlightForm(fm);
};
function processComboFlightForm(fm){
var _2c0="";
var _2c1=0;
if(typeof document.flightComboForm.partner!="undefined"){
if(typeof document.flightComboForm.partner.type=="hidden"){
_2c0=document.flightComboForm.partner.value;
_2c1=1;
}
}
if(_2c1==0){
for(i=0;i<fm.partner.length;i++){
if(fm.partner[i].checked){
_2c0=fm.partner[i].value;
break;
}
}
}
if(_2c0=="ebookers"){
fm.DEP.value=fm.sDepart.options[fm.sDepart.selectedIndex].value;
fm.LARR.value=fm.sArrival.value;
fm.DAY_DATE.value=fm.iDepDay.value;
fm.MONTH_DATE.value=fm.sDepMth.value;
fm.DAY_RDATE.value=fm.iRetDay.value;
fm.MONTH_RDATE.value=fm.sRetMth.value;
fm.PAX0.value=fm.iNoAdult.options[fm.iNoAdult.selectedIndex].value;
fm.PAX1.value=fm.iNoChild.options[fm.iNoChild.selectedIndex].value;
fm.PAX2.value=fm.iNoInfant.options[fm.iNoInfant.selectedIndex].value;
if(fm.bDirect.checked){
fm.DIRECT.value=1;
}
fm.method="POST";
fm.action="http://www.ebookers.com/afo/flights/wait1.html";
}else{
var _2c2=fm.iDepDay.options[fm.iDepDay.selectedIndex].value;
var _2c3=fm.iRetDay.options[fm.iRetDay.selectedIndex].value;
var _2c4=fm.sDepMth.options[fm.sDepMth.selectedIndex].value;
var _2c5=fm.sRetMth.options[fm.sRetMth.selectedIndex].value;
var _2c6=_2c4.substring(0,4);
var _2c7=_2c4.substring((_2c4.length-2));
var _2c8=_2c5.substring(0,4);
var _2c9=_2c5.substring((_2c5.length-2));
if(_2c7<10){
_2c7=_2c7.substring((_2c7.length-1));
}
if(_2c9<10){
_2c9=_2c9.substring((_2c9.length-1));
}
fm.TYPE.value="Round/Trip";
fm.departure.value=fm.sDepart.options[fm.sDepart.selectedIndex].value;
fm.partner.value="wanadoo";
fm.arrival.value=fm.sArrival.value;
fm.dday.value=_2c2;
fm.dmonth.value=_2c7;
fm.dyear.value=_2c6;
fm.rday.value=_2c3;
fm.rmonth.value=_2c9;
fm.ryear.value=_2c8;
fm.nbadults.value=fm.iNoAdult.options[fm.iNoAdult.selectedIndex].value;
fm.nbchilds.value=fm.iNoChild.options[fm.iNoChild.selectedIndex].value;
fm.nbbabies.value=fm.iNoInfant.options[fm.iNoInfant.selectedIndex].value;
fm.method="GET";
fm.action="http://wanadoo.kelkoo.co.uk/ctl/do/checkFlight";
}
return true;
};
monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
shortMonthNames=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
daysInMonth=new Array(31,28,31,30,31,30,31,31,30,31,30,31);
now=new Date();
dayInMS=24*60*60*1000;
weekInMS=7*24*60*60*1000;
yearInMS=365*24*60*60*1000;
startDate=new Date(Date.parse(now)+dayInMS);
endDate=new Date(Date.parse(startDate)+weekInMS);
finalDate=new Date(Date.parse(startDate)+yearInMS);
var Today=new Date();
function DateOK(Y,M,D){
var L=daysInMonth[M-1];
return D>0&&!!L&&(D<=L||D==29&&Y%4==0&&(Y%100!=0||Y%400==0));
};
function to2digits(no){
thestrNo=""+no;
return ((thestrNo.length==1)?"0":"")+thestrNo;
};
function generateMonthOptions(_2cf,_2d0){
for(monthNo=_2cf.getMonth();monthNo<12;monthNo++){
document.write("<OPTION value=\""+(_2cf.getFullYear())+to2digits(monthNo+1)+"\"");
if(monthNo==_2cf.getMonth()){
document.write(" SELECTED");
}
if(typeof _2d0!="undefined"&&_2d0=="short"){
document.write(">"+shortMonthNames[monthNo]+"&nbsp;"+to2digits((now.getFullYear())-2000)+"</OPTION>");
}else{
document.write(">"+monthNames[monthNo]+"&nbsp;"+to2digits((now.getFullYear())-2000)+"</OPTION>");
}
}
for(monthNo=0;monthNo<_2cf.getMonth();monthNo++){
document.write("<OPTION value=\""+(_2cf.getFullYear()+1)+to2digits(monthNo+1)+"\"");
if(monthNo==_2cf.getMonth()){
document.write(" SELECTED");
}
if(typeof _2d0!="undefined"&&_2d0=="short"){
document.write(">"+shortMonthNames[monthNo]+"&nbsp;"+to2digits((now.getFullYear()+1)-2000)+"</OPTION>");
}else{
document.write(">"+monthNames[monthNo]+"&nbsp;"+to2digits((now.getFullYear()+1)-2000)+"</OPTION>");
}
}
};
function generateDaysOptions(){
for(i=0;i<31;i++){
iVal=i+1;
document.write("<option value=\""+iVal+"\">"+to2digits(iVal)+"</option>");
}
};
function timeDifference(_2d1,_2d2,_2d3){
var _2d4=_2d1.getTime()-_2d2.getTime();
var _2d5=Math.floor(_2d4/1000/60/60/24);
_2d4-=_2d5*1000*60*60*24;
var _2d6=Math.floor(_2d4/1000/60/60);
_2d4-=_2d6*1000*60*60;
var _2d7=Math.floor(_2d4/1000/60);
_2d4-=_2d7*1000*60;
var _2d8=Math.floor(_2d4/1000);
if(_2d3=="d"){
return _2d5;
}
if(_2d3=="h"){
return _2d6;
}
if(_2d3=="m"){
return _2d7;
}
if(_2d3=="s"){
return _2d8;
}
};
function initValues(_2d9){
try{
document.forms[_2d9].iDepDay.selectedIndex=startDate.getDate()-1;
document.forms[_2d9].iRetDay.selectedIndex=endDate.getDate()-1;
var _2da=endDate.getMonth()-startDate.getMonth();
if(_2da<0&&endDate.getFullYear()>startDate.getFullYear()){
_2da=_2da+12;
}
document.forms[_2d9].sRetMth.selectedIndex=_2da;
}
catch(e){
}
};
function callbackCalendar(){
if(startDate<=calendar.date&&calendar.date<=finalDate){
var _2db=calendar.date.getDate()-1;
var _2dc=startDate.getMonth();
var _2dd=calendar.date.getMonth();
var _2de=_2dd-_2dc;
if(_2de<0&&calendar.date.getFullYear()>startDate.getFullYear()){
_2de=_2de+12;
}
var _2df=eval(calendar.custom.dayFld);
var _2e0=eval(calendar.custom.monFld);
_2df.selectedIndex=_2db;
_2e0.selectedIndex=_2de;
}else{
alert("Please select a date between "+displayCalendarDate(startDate)+" and "+displayCalendarDate(finalDate));
}
};
function callbackTPCalendar(){
if(startDate<=calendar.date&&calendar.date<=finalDate){
var _2e1=calendar.date.getDate()-1;
var _2e2=startDate.getMonth();
var _2e3=calendar.date.getMonth();
var _2e4=new String(calendar.date.getFullYear());
var _2e5=_2e3-_2e2;
if(_2e5<0&&calendar.date.getFullYear()>startDate.getFullYear()){
_2e5=_2e5+12;
}
var _2e6=eval(calendar.custom.dayFld);
var _2e7=eval(calendar.custom.monFld);
var _2e8=eval(calendar.custom.yrFld);
_2e6.value=_2e1+1;
_2e7.value=_2e3+1;
_2e8.value=_2e4.substring(2,4);
updateFlightDates();
}else{
alert("Please select a date between "+displayCalendarDate(startDate)+" and "+displayCalendarDate(finalDate));
}
};
function updateFlightDates(){
var _2e9=document.forms["tp_flighttool"]["iDepDay"];
var _2ea=document.forms["tp_flighttool"]["sDepMth"];
var _2eb=document.forms["tp_flighttool"]["sDepYr"];
if(_2e9.value!=""){
var _2ec=_2e9.value;
var _2ed=_2ea.value;
var _2ee=_2eb.value;
if(_2ec.length==1){
_2ec="0"+_2ec;
}
if(_2ed.length==1){
_2ed="0"+_2ed;
}
var _2ef=_2ec+"/"+_2ed+"/"+_2ee;
document.forms["tp_flighttool"]["ddate"].value=_2ef;
}
var _2f0=document.forms["tp_flighttool"]["iRetDay"];
var _2f1=document.forms["tp_flighttool"]["sRetMth"];
var _2f2=document.forms["tp_flighttool"]["sRetYr"];
if(_2f0.value!=""){
var _2f3=_2f0.value;
var _2f4=_2f1.value;
var _2f5=_2f2.value;
if(_2f3.length==1){
_2f3="0"+_2f3;
}
if(_2f4.length==1){
_2f4="0"+_2f4;
}
var _2f6=_2f3+"/"+_2f4+"/"+_2f5;
document.forms["tp_flighttool"]["rdate"].value=_2f6;
}
};
function displayCalendarDate(_2f7){
var str=padZeros(_2f7.getDate())+"/"+padZeros(_2f7.getMonth()+1)+"/"+_2f7.getFullYear();
return str;
};
function padZeros(num){
if(num<10){
return "0"+num;
}else{
return num;
}
};
if(typeof Hos=="undefined"){
Hos={};
}
if(typeof Hos.Banner=="undefined"){
Hos.Banner={};
}
Hos.Banner={loadDates:function(){
var _2fa=new Date();
var _2fb=_2fa.getMonth();
var _2fc=_2fa.getUTCFullYear();
var _2fd=[];
var _2fe=[];
var _2ff=[];
var _300=[];
var _301=[];
for(x=0;x<31;x++){
_2fe[x]=x+1;
}
if(document.getElementById("dayDDL").selectedIndex>=0){
Hos.Banner.popDays(_2fe,_2fe,document.searchForm.dayDDL.options[document.getElementById("dayDDL").selectedIndex].value);
}else{
Hos.Banner.popDays(_2fe,_2fe);
}
for(z=0;z<12;z++){
_2fd[z]=z<9?"0"+(z+1):z+1;
_2ff[z]=z+1;
}
Hos.Banner.popMonth(_2fd,_2ff);
for(i=0;i<2;i++){
_300[i]=_2fc+i;
_301[i]=_2fc+i;
}
Hos.Banner.popYear(_300,_301);
},monthDDL_onchange:function(year,_303){
var _304=new Date();
var _305=new Date(year,parseInt(_303)-1,1);
var _306=[];
var x=0;
while(_305.getMonth()==parseInt(_303)-1){
_306[x]=_305.getDate();
_305.setDate(_305.getDate()+1);
x++;
}
Hos.Banner.popDays(_306,_306,document.searchForm.dayDDL.options[document.getElementById("dayDDL").selectedIndex].value);
},popDays:function(_308,_309,_30a){
Hos.Banner.removeAllOptions(document.searchForm.dayDDL);
for(var i=0;i<_308.length;i++){
var _30c=false;
if(parseInt(_30a)==parseInt(_309[i])){
_30c=true;
}
Hos.Banner.addOption(document.searchForm.dayDDL,_308[i],_309[i],_30c);
}
},popMonth:function(_30d,_30e){
Hos.Banner.removeAllOptions(document.searchForm.monthDDL);
for(var i=0;i<_30d.length;++i){
Hos.Banner.addOption(document.searchForm.monthDDL,_30d[i],_30e[i]);
}
},popYear:function(_310,_311){
Hos.Banner.removeAllOptions(document.searchForm.yearDDL);
for(var i=0;i<_310.length;++i){
Hos.Banner.addOption(document.searchForm.yearDDL,_310[i],_311[i]);
}
},addOption:function(_313,text,_315,_316){
var optn=document.createElement("OPTION");
optn.text=text;
optn.value=_315;
if(_316){
optn.selected=true;
}
_313.options.add(optn);
},removeAllOptions:function(_318){
var i;
for(i=_318.options.length-1;i>=0;i--){
_318.remove(i);
}
},validateSelections:function(){
var _31a=new Array("","","");
var _31b=false;
if(document.getElementById("hos_region").selectedIndex==0){
_31a[0]="- Holiday area";
_31b=true;
}
if(_31b){
alert("Please Select the following: "+"\n"+"\n"+_31a[0]+"\n"+_31a[1]+"\n"+_31a[2]);
return false;
}else{
return true;
}
},submitSearch:function(){
Hos.Banner.setHiddenSearchValues();
document.getElementById("hos_hiddenSearchForm").submit();
},setHiddenSearchValues:function(){
document.getElementById("hos_hiddenSearchForm_SDATE").value=document.searchForm.yearDDL.options[document.getElementById("yearDDL").selectedIndex].value+"-"+document.searchForm.monthDDL.options[document.getElementById("monthDDL").selectedIndex].value+"-"+document.searchForm.dayDDL.options[document.getElementById("dayDDL").selectedIndex].value;
document.getElementById("hos_hiddenSearchForm_RCODE").value=document.getElementById("hos_region").options[document.getElementById("hos_region").selectedIndex].value;
document.getElementById("hos_hiddenSearchForm_DURTN").value=document.getElementById("hos_nights").options[document.getElementById("hos_nights").selectedIndex].value;
}};
function LargeGalleryView(id,_31d,_31e){
this.current_image_order_id=parseInt(_31d);
this.image_array=new Array();
this.current_image_order_id=_31d;
this.id=id;
this.total_images=_31e;
};
LargeGalleryView.prototype.addImageToArray=function(_31f,_320,_321,_322){
this.image_array[_31f]=new Array();
this.image_array[_31f]["image_description"]=_322;
this.image_array[_31f]["image_src"]=_320;
this.image_array[_31f]["image_alt"]=_321;
};
LargeGalleryView.prototype.init=function(){
this.image_dom_node=document.getElementById("image_"+this.id);
this.description_dom_node=document.getElementById("description_"+this.id);
this.image_no_dom_node=document.getElementById("image_no_"+this.id);
this.prev_button_dom_node=document.getElementById("prev_button_"+this.id);
this.next_button_dom_node=document.getElementById("next_button_"+this.id);
};
LargeGalleryView.prototype.selectImage=function(diff){
if(!this.image_dom_node||!this.description_dom_node){
this.init();
}
var _324=parseInt(this.current_image_order_id)+diff;
if(this.image_array[_324]){
this.image_dom_node.alt=this.image_array[_324]["image_alt"];
this.image_dom_node.src=this.image_array[_324]["image_src"];
this.description_dom_node.innerHTML=this.image_array[_324]["image_description"];
this.image_no_dom_node.innerHTML=_324;
this.current_image_order_id=_324;
if(this.current_image_order_id==this.total_images){
this.next_button_dom_node.style.display="none";
}else{
if(this.next_button_dom_node.style.display!="inline"){
this.next_button_dom_node.style.display="inline";
}
}
if(this.current_image_order_id==1){
this.prev_button_dom_node.style.display="none";
}else{
if(this.prev_button_dom_node.style.display!="inline"){
this.prev_button_dom_node.style.display="inline";
}
}
}
};
function LinkList(id){
this.id=id;
this.togglestate=0;
this.limit=5;
this.component=document.getElementById(this.id);
this.morelink=document.getElementById("morelink_"+this.id);
};
LinkList.prototype.toggle=function(){
if(this.component){
var list=this.component.getElementsByTagName("li");
if(list){
if(this.togglestate==1){
var _327="none";
this.togglestate=0;
this.morelink.innerHTML="more";
}else{
var _327="block";
this.togglestate=1;
this.morelink.innerHTML="less";
}
for(var i=this.limit;i<list.length;i++){
list[i].style.display=_327;
}
}
}
return false;
};
function monkeyMusic_playMonkeyDemo(_329,_32a){
console.log("Playing monkey demo");
OpenWindow=window.open("","MonkeyDemo",config="status=no, statusbar=no, menubar=no, scrollbars=no, toolbar=no, location=no, locationbar=no, directories=no, personalbar=no, titlebar=no, resizable=no, width=530, height=350");
OpenWindow.document.write("<html>");
OpenWindow.document.write("<title>Monkey Demo</title>");
OpenWindow.document.write("<body bgcolor=\"black\">");
OpenWindow.document.write("<object id=\"flashObj\" width=\"512\" height=\"334\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,47,0\">");
OpenWindow.document.write("<param name=\"movie\" value=\"http://c.brightcove.com/services/viewer/federated_f9/"+_32a+"?isVid=1&publisherID=1815805388\" />");
OpenWindow.document.write("<param name=\"bgcolor\" value=\"#FFFFFF\" />");
OpenWindow.document.write("<param name=\"flashVars\" value=\"@videoPlayer="+_329+"&playerID="+_32a+"&domain=embed&\" />");
OpenWindow.document.write("<param name=\"base\" value=\"http://admin.brightcove.com\" />");
OpenWindow.document.write("<param name=\"seamlesstabbing\" value=\"false\" />");
OpenWindow.document.write("<param name=\"allowFullScreen\" value=\"true\" />");
OpenWindow.document.write("<param name=\"swLiveConnect\" value=\"true\" />");
OpenWindow.document.write("<param name=\"allowScriptAccess\" value=\"always\" />");
OpenWindow.document.write("<embed src=\"http://c.brightcove.com/services/viewer/federated_f9/"+_32a+"?isVid=1&publisherID=181505388\" bgcolor=\"#FFFFFF\" flashVars=\"@videoPlayer="+_329+"&playerID="+_32a+"&domain=embed&\" base=\"http://admin.brightcove.com\" name=\"flashObj\" width=\"512\" height=\"334\" seamlesstabbing=\"false\" type=\"application/x-shockwave-flash\" allowFullScreen=\"true\" swLiveConnect=\"true\" allowScriptAccess=\"always\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\">");
OpenWindow.document.write("</embed>");
OpenWindow.document.write("</object>");
OpenWindow.document.write("</body>");
OpenWindow.document.write("</html>");
OpenWindow.document.close();
return;
};
function monkeyMusic_playMonkeyDemoLB(id,_32c,_32d){
console.log("In lightbox: "+id);
var _32e="lightbox_"+id;
var _32f=dijit.byId(_32e);
if(_32f){
_32f.duration=1;
_32e="#"+_32e;
if(dojo.isIE){
dojo.query(_32e)[0].style.display="block";
}
_32f.show();
console.log("showing dialog ",_32f);
var _330=document.getElementById("TrackingTag");
_330.appendChild(addTrackingTag("Orange_monkey","monkey_intro","Monkey_site"));
}
};
function addTrackingTag(_331,_332,_333){
console.log("Adding tracking tag. Campaign: "+_331+", Creative: "+_332+", Flight: "+_333);
var _334=document.createElement("img");
_334.style.display="none";
_334.width="0";
_334.height="0";
_334.src="http://adtracker.valuedopinions.co.uk/track.aspx?Campaign="+_331+"&Creative="+_332+"&Flight="+_333;
return _334;
};
function MonkeyForm(id){
this.id=id;
this.component=document.getElementById(this.id);
};
MonkeyForm.prototype.addExtraField=function(name){
if(this.component){
var _337=document.createElement("input");
if(_337){
_337.setAttribute("type","hidden");
_337.setAttribute("value","1");
_337.setAttribute("name",name);
this.component.appendChild(_337);
}
}
return;
};
function validateMonkeyJoinForm(_338,_339){
var _33a=document.getElementById(_339);
var _33b=false;
var _33c=[_338.firstName,_338.surname,_338.emailAddress,_338.human_confirm_em,_338.address1,_338.address2,_338.address4,_338.postcode];
for(var i=0;i<_33c.length;i++){
if(!_validateNonBlankField(_33c[i])){
_33b=true;
}
}
if(_338.human_confirm_em.value!=_338.emailAddress.value){
_markError(_338.human_confirm_em);
_33b=true;
}
if(_33b){
_33a.style.display="block";
return false;
}
return true;
};
function _validateNonBlankField(_33e){
if(_33e.value==""){
_markError(_33e);
return false;
}else{
_clearError(_33e);
return true;
}
};
function _markError(_33f){
var n=_33f.parentNode;
if(!n.className.match("error")){
n.className+=n.className?" error":"error";
}
};
function _clearError(_341){
var n=_341.parentNode;
n.className=n.className.replace(/\s?error/,"");
};
var popUpWindow=null;
function openPopup(url,name,top,left,_347,_348,_349){
popUpWindow=window.open(url,name,"top="+top+", left="+left+", width="+_347+", height="+_348+", "+_349);
};
function closePopupAndOpenNewWindows(x){
popUpWindow.close();
window.open(x);
};
var popUpWindow=null;
var MonkeyLaunchParams=null;
var MonkeySSO={clicked:function(id,_34c){
console.log("In lightbox: "+id);
console.log("params: ",_34c);
MonkeyLaunchParams=_34c;
var _34d="lightbox_"+id;
var _34e=dijit.byId(_34d);
if(_34e){
_34e.duration=1;
_34d="#"+_34d;
if(dojo.isIE){
dojo.query(_34d)[0].style.display="block";
}
_34e.show();
console.log("showing dialog ",_34e);
}
}};
function closeLightbox(id){
var _350="lightbox_"+id;
var _351=dijit.byId(_350);
_351.hide();
};
function numbersOnly(evt){
var key;
if(window.event){
key=window.event.keyCode;
}else{
if(evt.which){
key=evt.which;
}else{
return true;
}
}
keychar=String.fromCharCode(key);
numcheck=/\d/;
return numcheck.test(keychar)||(key==8);
};
function checkMonkeyLogin(id,_355){
var _356=document.getElementById(id+"_msisdn").value;
var _357=document.getElementById(id+"_password").value;
var _358=document.getElementById("monkey_"+id+"_errors");
var _359=document.getElementById("monkey_"+id+"_extrainfotitle");
var _35a=document.getElementById("monkey_"+id+"_extrainfo");
if(!_356||_356==""||!_357||_357==""){
_358.innerHTML="Sorry, that's the wrong mobile number or password. Please try again.";
return false;
}
if(_356.length<10||_356.length>12){
_358.innerHTML="Sorry, that's the wrong mobile number or password. Please try again.";
return false;
}
var _35b=null;
_358.innerHTML="Checking details, please wait...";
var _35c={feedbacknode:_358,wn_support:browserSupportsWindowNameXhr(),url:"https://web.orange.co.uk/monkey/index.html?rm=login",content:{msisdn:_356,password:_357},sync:false,callbackParamName:"callback",load:function(_35d,_35e){
var _35f;
var _360=this.feedbacknode;
if(this.wn_support){
_35f=_35d;
}else{
_35f=_35d.result;
}
console.log(_35f);
switch(_35f){
case "1":
if(_355){
console.log("Launching full player: "+_355);
monkeyMusic_launchMonkeyPlayer(id,false);
}
location.reload(true);
break;
case "-1":
console.log("Unknown error");
_360.innerHTML="Sorry, we're having some problems - we're fixing them right now.";
break;
case "-2":
console.log("Invalid MSISDN");
_360.innerHTML="Sorry, that's the wrong mobile number or password. Please try again.";
break;
case "-3":
console.log("Not PAYG");
_360.innerHTML="Sorry, only pay as you go customers on Monkey can log in.";
break;
case "-4":
console.log("Invalid login. Not PAYG?");
_360.innerHTML="Sorry, we're having some problems - we're fixing them right now.";
break;
case "-5":
console.log("Timeout");
_360.innerHTML="Sorry, we're having some problems. Could you try again?";
break;
case "-6":
console.log("Not eligible");
_360.innerHTML="Sorry, you need to top up by 10+ pounds this month before you can log in.";
break;
case "-7":
console.log("Bundle check error");
_360.innerHTML="Sorry, we're having some problems. Could you try again?";
break;
case "-8":
console.log("Not on Monkey bundle");
_360.innerHTML="If you've already signed up to Monkey you need to top up by &pound;10 to login. If you aren't, join on the right.";
_359.innerHTML="* Already topped up by &pound;10?";
_35a.innerHTML="Please note it can take upto 24hrs for your reward to be actioned. Sorry for the delay!";
break;
default:
console.log("Unknown response");
_360.innerHTML="Sorry, we're having some problems - we're fixing them right now.";
break;
}
},error:function(_361,_362){
console.log("error: "+_361);
}};
if(browserSupportsWindowNameXhr()){
dojox.io.windowName.send("POST",_35c);
}else{
dojo.io.script.get(_35c);
}
return false;
};
function browserSupportsWindowNameXhr(){
if(dojo.isOpera){
return (false);
}else{
return (true);
}
};
function monkeyMusic_launchMonkeyPlayer(id,demo,_365,_366,_367){
if(_365===undefined&&MonkeyLaunchParams){
_365=MonkeyLaunchParams.channelID;
}
if(_366===undefined&&MonkeyLaunchParams){
_366=MonkeyLaunchParams.buddyID;
}
if(_367===undefined&&MonkeyLaunchParams){
_367=MonkeyLaunchParams.keyWord;
}
if(!_365){
_365=0;
}
if(!_366){
_366=0;
}
if(!_367){
var _367=0;
}
var _368=g_GetCookie("monkeysignedin");
console.log("Called launching player (msisdn ["+_368+"]: channelID="+_365+", buddyID="+_366+", keyWord="+_367);
if(_368||demo){
if(!_368&&demo){
_368=0;
_369=0;
}else{
var _369=g_GetCookie("monkeypid");
if(!_369){
_369=0;
}
}
var _36a="channelID="+_365+"&buddyID="+_366+"&keyWord="+_367;
var _36b=_368?"/monkey/player.html":"http://ouk-web.snowite.fr/monkey/index.php";
console.log("Launching player: "+_36b+" with channelID="+_365+", buddyID="+_366+", keyWord="+_367);
if(popUpWindow&&!popUpWindow.closed){
popUpWindow.location=_36b+"?"+_36a;
}else{
openPopup(_36b+"?"+_36a,"monkeyPlayer",10,10,962,573,"menubar=no,scrollbars=no,statusbar=no");
}
window.setTimeout("popUpWindow.focus()",500);
if(demo){
closeLightbox(id);
}
return;
}else{
console.log("Opening lightbox: "+id);
var _36c={channelID:_365,buddyID:_366,keyWord:_367};
MonkeySSO.clicked(id,_36c);
}
};
function monkeyMusic_signOut(id){
g_DeleteCookie("monkeysignedin","/");
g_DeleteCookie("monkeywelcome","/");
g_DeleteCookie("monkeypid","/");
location.reload(true);
};
function monkeyMusic_showWelcomeLB(id){
console.log("In lightbox: "+id);
var _36f="lightbox_"+id;
var _370=dijit.byId(_36f);
if(_370){
_370.duration=1;
_36f="#"+_36f;
if(dojo.isIE){
dojo.query(_36f)[0].style.display="block";
}
_370.show();
console.log("showing dialog ",_370);
}
};
var MovieCommentList_visible=false;
function MovieCommentForm_toggleDisplay(){
if(document.getElementById("MovieCommentFormErrors")){
document.getElementById("MovieCommentFormErrors").style.display="none";
}
if(MovieCommentForm_visible){
document.getElementById("MovieCommentFormClose").style.display="none";
document.getElementById("MovieCommentFormLeaveComment").style.display="block";
document.getElementById("MovieCommentForm").style.display="none";
MovieCommentForm_visible=false;
}else{
document.getElementById("MovieCommentFormClose").style.display="block";
document.getElementById("MovieCommentFormLeaveComment").style.display="none";
document.getElementById("MovieCommentForm").style.display="block";
MovieCommentForm_visible=true;
}
return (false);
};
function MovieCommentForm_submitForm(){
var _371=document.getElementById("name");
var _372=document.getElementById("posterem");
if(_371.value=="your name"){
_371.value="";
}
if(_372.value=="your email"){
_372.value="";
}
return (true);
};
function MovieCommentList_showAll(){
if(!MovieCommentList_visible){
document.getElementById("MovieCommentListOpenAll").style.display="none";
document.getElementById("MovieCommentListInitiallyHidden").style.display="block";
MovieCommentList_visible=true;
}
return (false);
};
var movieInvites={recaptchaInitialized:false,number:false,movieId:false,venueId:false,toggleTextDetails:function(_373){
this.setRecaptchaVisibility(false);
dojo.query("div#movie_"+_373+" .actions").removeClass("actions_invite");
dojo.toggleClass(dojo.query("div#movie_"+_373+" .actions")[0],"actions_text_details");
if(!this.recaptchaInitialized){
OrangeRecaptcha.create("recaptcha");
this.recaptchaInitialized=true;
}
},setRecaptchaVisibility:function(_374,_375){
dojo.query("div.movie .actions .text_details_initial").style("display","block");
dojo.query("div.movie .actions .text_details_recaptcha").style("display","none");
if(_375){
dojo.query("div#movie_"+_375+" .actions .text_details_initial").style("display",(_374?"none":"block"));
dojo.query("div#movie_"+_375+" .actions .text_details_recaptcha").style("display",(_374?"block":"none"));
if(_374){
var _376=dojo.query("#recaptcha")[0];
dojo.query("div#movie_"+_375+" .text_details_recaptcha .recaptcha_area")[0].appendChild(_376);
}
}
},preSendTextDetails:function(_377){
var _378=dojo.query("div#movie_"+_377+" .text_details input[name='phone_number']")[0].value;
var _379=dojo.query("input#venue_id_input")[0].value;
if(_378!=""&&_378!="enter your number here"){
this.number=_378;
this.venueId=_379;
this.movieId=_377;
this.setRecaptchaVisibility(true,_377);
}else{
dojo.query("div#movie_"+_377+" .text_details .header .errortext")[0].innerHTML="<span class=\"error\">Please re-enter the correct number.</span>";
}
},sendTextDetails:function(){
var _37a=dojo.query("#movie_"+this.movieId+" .orange_recaptcha_challenge_response")[0].value;
if(!_37a||_37a=="enter the two words shown here"){
dojo.query("div#movie_"+this.movieId+" .text_details_recaptcha .header")[0].innerHTML="<span class=\"error\">Please enter the two words shown below before clicking Send."+"</span>";
return false;
}
dojo.xhrPost({url:"/movies/ajax.php?rm=sendMovieDetailsSms",timeout:15000,handleAs:"json",content:{to:this.number,movie_id:this.movieId,cinema_id:this.venueId,recaptcha_challenge:dojo.query("#recaptcha_challenge_field")[0].value,recaptcha_response:dojo.query("#movie_"+this.movieId+" .orange_recaptcha_challenge_response")[0].value},load:dojo.hitch(this,movieInvites.handleTextDetailsResponse)});
},handleTextDetailsResponse:function(_37b,_37c){
OrangeRecaptcha.reload("recaptcha");
if(_37b.success=="1"){
this.setRecaptchaVisibility(false);
dojo.query("div#movie_"+_37b.movieId+" .text_details .form").style("display","none");
dojo.query("div#movie_"+_37b.movieId+" .text_details .header").style("display","none");
dojo.query("div#movie_"+_37b.movieId+" .text_details .thanks").style("display","block");
}else{
if(_37b.captchaError=="1"){
dojo.query("div#movie_"+_37b.movieId+" .text_details_recaptcha .header")[0].innerHTML="<span class=\"error\">"+_37b.error+"</span>";
}else{
this.setRecaptchaVisibility(false);
dojo.query("div#movie_"+_37b.movieId+" .text_details div.header .errortext")[0].innerHTML="<span class=\"error\">"+_37b.error+"</span>";
}
}
dojo.query("div#movie_"+_37b.movieId+" .text_details input")[0].value="enter your number here";
dojo.query("div#movie_"+_37b.movieId+" .text_details input")[0].style.color="#989898";
dojo.query("div#movie_"+_37b.movieId+" input.orange_recaptcha_challenge_response")[0].value="enter the two words shown here";
dojo.query("div#movie_"+_37b.movieId+" input.orange_recaptcha_challenge_response")[0].style.color="#989898";
},toggleInviteFriend:function(_37d){
dojo.query("div#movie_"+_37d+" .actions").removeClass("actions_text_details");
dojo.toggleClass(dojo.query("div#movie_"+_37d+" .actions")[0],"actions_invite");
},pokeInviteReady:function(){
dojo.query("div.movie .email").style("display","block");
}};
function openMapPopup(_37e){
window.open("http://search.orange.co.uk/ouk/portal/cinemalocator.html?p=portal&pt=film&venueid="+_37e,"mapPopup","menubar=0,resizable=1,width=510,height=591,scrollbars=0");
};
function o_hasPackage(id){
var obj={url:"http://ofilm.i6a.co.uk/film/has_package.json?edi="+id,handleAs:"json",callbackParamName:"callback"};
dojo.require("dojo.io.script");
return dojo.io.script.get(obj);
};
function setupVideoOverlay(edi,id){
if(edi){
var io=o_hasPackage(edi);
io.addCallback(makeVideoOverlayCallback(id));
}
};
function makeVideoOverlayCallback(id){
return function(data){
var _386=data.package_id;
if(_386){
var elt=document.getElementById(id);
elt._openFunction=function(){
loadOverlay(_386);
};
dojo.query("#"+id+" a.more_clips")[0].style.display="block";
var _388=dojo.query("#"+id+" a.trailer")[0];
var _389=dojo.query("#"+id+" div.trailer img")[0];
if(_389){
_388.appendChild(_389);
}
}else{
var _38a=dojo.query("#"+id+" a.more_clips")[0];
if(_38a){
_38a.parentNode.removeChild(_38a);
}
var _388=dojo.query("#"+id+" a.trailer")[0];
if(_388){
_388.parentNode.removeChild(_388);
}
}
};
};
function openVideoOverlayForId(id){
var elt=document.getElementById(id);
if(elt._openFunction&&dojo.isFunction(elt._openFunction)){
elt._openFunction();
}
};
function openIMPVideo(_38d){
var _38e=document.createElement("a");
_38e.rel="#filmOverlay";
_38e.onclick=function(){
loadOverlay(_38d);
};
document.body.appendChild(_38e);
$(_38e).overlay({onLoad:function(_38f,link){
loadOverlay(link[0].href.split("/").pop());
},onBeforeLoad:function(){
$(".advert object, .advert embed").hide();
this.expose({zIndex:3,speed:1});
},onClose:function(_391){
jQuery.unexpose();
$(".advert object, .advert embed").show();
jQuery("#filmOverlay").html("<div class=\"filmOverlayContent\"></div>");
},top:0,speed:1});
$(_38e).trigger("click");
document.body.removeChild(_38e);
};
function openIMPVideoByEdi(edi){
getIMPVideoByEdi(edi,true);
};
function getIMPVideoByEdi(edi,open,id){
if(edi){
var io=o_hasPackage(edi);
io.addCallback(getIMPVideoByEdiCallback(edi,open,id));
}
};
function getIMPVideoByEdiCallback(edi,open,id){
return function(data){
if(data.package_id){
if(open){
openIMPVideo(data.package_id);
}
}else{
disableTrailerButton(edi,id);
}
};
};
function disableTrailerButton(edi,id){
dojo.query("#trailer-"+id+"-"+edi)[0].style.backgroundPosition="-73px 0";
dojo.query("#trailer-"+id+"-"+edi)[0].title="Sorry, no trailer is available for this film yet.";
dojo.query("#trailer-"+id+"-"+edi)[0].href="javascript:void(0)";
dojo.query("#trailer-"+id+"-"+edi)[0].style.cursor="default";
};
function initMoviesByCinemaTrailers(){
var _39d=dojo.query("div.movie a.trailer");
for(var i=0;i<_39d.length;i++){
var _39f=_39d[i].id.split("-");
var edi=_39f.pop();
var id=_39f.pop();
getIMPVideoByEdi(edi,false,id);
}
};
var MoviesPoll={pollArray:[],pollCallback:function(id){
dojo.query("p#loading_text_"+id)[0].style.display="none";
dojo.query("div#poll_text_area_"+id)[0].style.display="block";
dojo.xhrGet({url:"/movies/ajax.php?rm=getPoll&poll_id="+id+"&nocache="+Math.random(),timeout:5000,handleAs:"json",load:dojo.hitch(this,function(_3a3,_3a4){
this.pollArray[id]=_3a3;
document.getElementById("poll_"+id).initializePoll(_3a3);
})});
},mouseOverCallback:function(id,_3a6){
var _3a7=this.getPollObject(id,_3a6);
var text="<strong>"+_3a7.percentage+"</strong>% of Orange film fans agree with this";
this.getTextDiv(id).originalText=this.getTextDiv(id).innerHTML;
this.getTextDiv(id).innerHTML=text;
},mouseOutCallback:function(id,_3aa){
if(this.getTextDiv(id).originalText!="undefined"&&this.getTextDiv(id).originalText!=undefined){
this.getTextDiv(id).innerHTML=this.getTextDiv(id).originalText;
}
},voteCallback:function(id,_3ac){
dojo.xhrGet({url:"/movies/ajax.php?rm=registerVote&poll_id="+id+"&vote="+_3ac,timeout:1000,load:dojo.hitch(this,function(_3ad,_3ae){
this.getTextDiv(id).innerHTML=this.getTextDiv(id).originalText="Thanks for voting";
this.pollCallback(id);
}),error:dojo.hitch(this,function(_3af,_3b0){
this.getTextDiv(id).innerHTML="Sorry, your vote could not be recorded";
})});
},resizedCallback:function(id,_3b2){
dojo.query("#poll_"+id)[0].style.height=_3b2+"px";
dojo.query("#loading_container_"+id)[0].style.height=_3b2+"px";
},getTextDiv:function(id){
return dojo.query("#poll_text_area_"+id)[0];
},getPollObject:function(id,_3b5){
var _3b6=this.pollArray[id];
for(var i=0;i<_3b6.length;i++){
if(_3b6[i].answerId==_3b5){
return _3b6[i];
}
}
return false;
}};
function moviesTrailerPopupDetect(){
var _3b8=document.location.search;
if(_3b8.indexOf("package")>-1){
_3b8=_3b8.substr(1);
getParamsArray=_3b8.split("&");
var _3b9=0;
var _3ba=0;
var _3bb;
while((_3b9==0)&&(_3ba<getParamsArray.length)){
getParamSplit=getParamsArray[_3ba].split("=");
if(getParamSplit[0]=="package"){
_3b9=parseInt(getParamSplit[1]);
}
_3ba++;
}
if(_3b9>0){
openIMPVideo(_3b9);
}
}
};
function MusicCommentForm(id){
this.id=id;
this.component=document.getElementById(this.id);
};
MusicCommentForm.prototype.addExtraField=function(name){
if(this.component){
var _3be=document.createElement("input");
if(_3be){
_3be.setAttribute("type","hidden");
_3be.setAttribute("value","1");
_3be.setAttribute("name",name);
this.component.appendChild(_3be);
}
}
return;
};
function CountingTextArea(id){
this.id=id;
this.component=document.getElementById(this.id);
this.countstatus=document.getElementById(this.id+"-countstatus");
this.limit=parseInt(this.countstatus.innerHTML);
};
CountingTextArea.prototype.setLimit=function(_3c0){
this.limit=_3c0;
};
CountingTextArea.prototype.updateCount=function(){
_3c1=0;
if(this.component&&this.countstatus){
var _3c1=this.limit-this.component.value.length;
if(_3c1<0){
_3c1=0;
this.component.value=this.component.value.substr(0,this.limit);
}
this.countstatus.innerHTML=_3c1+" ";
}
return;
};
CountingTextArea.prototype.resetField=function(){
this.component.value="";
this.updateCount();
return;
};
function showMusicMobileFeatureImage(_3c2,id){
var _3c4=getElementsByClassName("target_image","img",document.getElementById("target_image_area_"+id));
for(el in _3c4){
_3c4[el].style.visibility="hidden";
}
var _3c5=getElementsByClassName("target_associated_copy","div",document.getElementById("target_associated_copy_area_"+id));
for(el in _3c5){
_3c5[el].style.visibility="hidden";
}
document.getElementById("target_image_"+id+"_"+_3c2).style.visibility="visible";
document.getElementById("target_associated_copy_"+id+"_"+_3c2).style.visibility="visible";
};
function MusicStore_PlayPreview(base,_3c7,_3c8){
var _3c9={url:encodeURIComponent(base+"player.php?a=15&cdev=179&cp="+_3c7)};
var so=swfobject.embedSWF("/images/furniture/musicstore/player.swf",_3c8,"35","22","9.0.0",false,{url:encodeURIComponent(base+"player.php?a=15&cdev=179&cp="+_3c7)},{wmode:"transparent"});
};
function NewsCommentForm(id){
this.id=id;
this.component=document.getElementById(this.id);
};
NewsCommentForm.prototype.addExtraField=function(name){
if(this.component){
var _3cd=document.createElement("input");
if(_3cd){
_3cd.setAttribute("type","hidden");
_3cd.setAttribute("value","1");
_3cd.setAttribute("name",name);
this.component.appendChild(_3cd);
}
}
return;
};
function toggleDisplayForm(_3ce,_3cf){
var _3d0=document.getElementById(_3ce);
var _3d1=document.getElementById("firstToComment");
if(_3d0.style.display=="block"){
_3d0.style.display="none";
if(_3d1){
_3d1.style.display="block";
}
_3cf.style.display="block";
}else{
if(_3d1){
_3d1.style.display="none";
}
_3d0.style.display="block";
_3d0.name.focus();
_3cf.style.display="none";
}
return (true);
};
document.NewsSearchBarClicked=false;
function NewsSearchBar_onclick(){
if(!document.NewsSearchBarClicked){
document.forms.newsSearchForm.q.value="";
document.NewsSearchBarClicked=true;
}
};
function NewsTicker(id){
this.id=id;
this.component=document.getElementById(this.id);
this.current_xpos=0;
this.max_xpos=0;
this.interval=30;
this.timer;
this.totalwidth=0;
this.offset=0;
this.events_attached=false;
this.width;
};
NewsTicker.prototype.setWidth=function(_3d3){
this.width=_3d3;
};
NewsTicker.prototype.setOffset=function(_3d4){
this.offset=_3d4;
};
NewsTicker.prototype.init=function(){
if(this.component){
var len=this.component.childNodes.length;
if(len>0){
while(this.totalwidth<this.width){
for(var i=0;i<len;i++){
child=this.component.childNodes[i];
if(child.tagName=="LI"){
if(!this.events_attached){
this.attachEvent(child.firstChild,"onmouseover","pause");
this.attachEvent(child.firstChild,"onmouseout","start");
}
this.component.appendChild(child.cloneNode(true));
width=this.getComputedWidth(child);
if(window.getComputedStyle){
width+=12;
}
this.totalwidth+=parseInt(width);
}
}
this.events_attached=true;
if(this.max_xpos==0){
this.max_xpos=this.totalwidth;
}
}
}
}
this.start();
return;
};
NewsTicker.prototype.getComputedWidth=function(node){
if(window.getComputedStyle){
return parseInt(document.defaultView.getComputedStyle(node,null).getPropertyValue("width"));
}else{
return node.clientWidth;
}
};
NewsTicker.prototype.start=function(){
this.startTimer(this.interval,"scroll");
};
NewsTicker.prototype.pause=function(){
if(this.timer){
window.clearInterval(this.timer);
}
return;
};
NewsTicker.prototype.scroll=function(){
if(this.component){
this.component.style.clip="rect(0px "+(this.width+this.current_xpos)+"px 24px "+(0+this.current_xpos)+"px)";
this.component.style.left=(this.offset-this.current_xpos)+"px";
this.current_xpos++;
if(this.current_xpos>this.max_xpos){
this.current_xpos=0;
}
}
};
NewsTicker.prototype.attachEvent=function(node,_3d9,_3da){
var _3db=null;
var that=this;
var args=Array.prototype.slice.apply(arguments,[2]);
if(typeof _3da==="string"){
_3db=that[_3da];
}else{
_3db=_3da;
}
if(node.attachEvent){
node.attachEvent(_3d9,function(){
_3db.apply(that,args);
});
}else{
node.setAttribute(_3d9,this.id+"."+_3da+"();");
}
return that;
};
NewsTicker.prototype.startTimer=function(_3de,_3df){
if(_3de>0){
var that=this;
var args=Array.prototype.slice.apply(arguments,[2]);
if(typeof _3df==="string"){
_3df=that[_3df];
}
this.timer=window.setInterval(function(){
_3df.apply(that,args);
},_3de);
return that;
}
return;
};
function g_GetCookie(_3e2){
var _3e3=document.cookie.match("(^|;) ?"+_3e2+"=([^;]*)(;|$)");
if(_3e3){
var _3e4=unescape(_3e3[2]);
return (unescape(_3e3[2]));
}else{
return null;
}
};
function g_GetCookieArray(_3e5){
var i=0;
var tmp="";
var _3e8=new Array();
while(tmp=g_GetCookie(""+_3e5+i)){
i++;
_3e8.push(tmp);
}
if(_3e8.length<1){
return null;
}else{
return _3e8;
}
};
function g_SetCookie(_3e9,_3ea,exp,path,_3ed,_3ee){
var _3ef=_3e9+"="+escape(_3ea);
if(exp){
_3ef+="; expires="+exp.toGMTString();
}
if(path){
_3ef+="; path="+escape(path);
}
if(_3ed){
_3ef+="; domain="+escape(_3ed);
}
if(_3ee){
_3ef+="; secure";
}
document.cookie=_3ef;
};
function g_SetCookieArray(_3f0,_3f1,exp,path,_3f4,_3f5){
if(!_3f1||_3f1.length<1){
return null;
}
for(var i=0;i<_3f1.length;i++){
g_SetCookie(""+_3f0+i,_3f1[i],exp,path,_3f4,_3f5);
}
};
function g_DeleteCookie(_3f7,path){
var _3f9=new Date();
_3f9.setTime(_3f9.getTime()-5);
if(document.domain.match("portaldev2.local")!==null){
domain="portaldev2.local";
}else{
domain="orange.co.uk";
}
g_SetCookie(_3f7,"",_3f9,path,domain);
};
function g_DeleteCookieArray(_3fa,path){
var i=0;
var tmp="";
while(tmp=g_GetCookie(""+_3fa+i)){
g_DeleteCookie(""+_3fa+i,path);
i++;
}
};
function home_openSetAsHomepage(dest){
window.open(dest,"setashomepage","menubar=0,resizable=1,width=500,height=400,scrollbars=1");
return (false);
};
var revSci_segJs="<scr"+"ipt type=\"text/javascript\" src=\""+location.protocol+"//js.revsci.net/gateway/gw.js?csid=E05517\" charset=\"ISO-8859-1\"></sc"+"ript>";
var bSegIncluded=false;
function revSciProcess(){
segQS="";
};
function revSciInit(){
rsinetsegs=g_GetCookieArray("rsinetsegs");
if(!rsinetsegs){
document.write(revSci_segJs);
bSegIncluded=true;
}
};
function revSciCookie(){
var _3ff=new Date();
_3ff.setMonth(_3ff.getMonth()+1);
g_DeleteCookieArray("rsinetsegs","/");
g_SetCookieArray("rsinetsegs",rsinetsegs,_3ff,"/");
};
function revSciRegisterMeta(){
if(!_MetaRegister||_MetaRegister.length<1){
return;
}
for(var i=0;i<_MetaRegister.length;i++){
var _401=_MetaRegister[i];
if(_401.meta_value&&_401.meta_value.length>0){
DM_addToLoc("revsci_"+_401.meta_name,_401.meta_value);
}
}
};
function revSciSegment(){
segQS="";
if(typeof rsinetsegs!="undefined"){
segQS+=rsinetsegs.length>0?"seg0="+rsinetsegs[0]+";":"";
for(var i=1;i<rsinetsegs.length&&i<=6;i++){
segQS+=("seg"+i+"="+rsinetsegs[i]+";");
}
}
};
function revSciTag(){
if(!bSegIncluded){
document.write(revSci_segJs);
}
DM_tag();
};
var DM_CSID="E05517";
var DM_UIDS=3;
var DM_CHN=document.location.hostname;
var DM_PIX="pix01.revsci.net";
var DM_BPIX="pix01.revsci.net";
var DM_UIDD=document.location.hostname;
var DM_UIDP="/";
var DM_UIDC="";
var DM_UIDN="";
var DM_UIDE=0;
var DM_ADMG=1;
var DM_ANLY=1;
var DM_RTRY=0;
var DM_DREF=0;
var DM_LOAD_TIME=0;
var DM_TOUT_PIX_PATH="";
var DM_CSES=0;
var DM_CTST=0;
var DM_MULT=0;
var DM_FRAG=0;
var DM_RCRC=0;
var DM_BOOM_ON=0;
var DM_BOOM_DMN="";
var DM_BOOM_SRC="";
var DM_BOOM_DCN="";
var thisfsurl=new String(document.location);
var DM_TEST=0;
var DM_REQS=0;
var _DTE=new Date();
var _UNV=navigator;
var _UDC=document;
var _CHR=null;
var _sImg=new Array();
var _evts=new Array();
var _hexc=new Array("0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F");
var _BCL1="?&=%.()";
var _GCL2="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var _TGID="a"+_hexc[(DM_TEST<<3|DM_REQS<<2|DM_ADMG<<1|DM_ANLY)];
var _name=_UDC.title;
for(_CHR="",i=0;i<256;i++){
_CHR+=String.fromCharCode(i);
}
var _CRCTbl=new Array(0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117);
var _UID=0;
var _UTZ=(-1*_DTE.getTimezoneOffset())+720;
var _UCS=((DM_CTST)?(_gc(_sc("TC0",1,DM_CHN,"/",0,0))==1?1:0)+(_gc(_sc("TC1",1,DM_CHN,"/",1,0))==1?2:0):0);
var _USID=((DM_CSES)?_sessID():0);
var _CNV="";
var _LOC=_UDC.location.toString();
var _REF=_UDC.referrer.toString();
var _CLD=0;
function DM_tag(){
if(thisfsurl.indexOf("revenuesciencetest=1")!=-1){
document.write("rs ok");
}
if(_CLD==0||DM_MULT==1){
_CLD=1;
switch(DM_UIDS){
case 1:
case 2:
case 5:
var cke=_gc(DM_UIDC);
if(cke==null){
_UID=-1;
}else{
if(cke.indexOf("/")>=0||cke.indexOf("?")>=0){
_UID=-1;
}else{
_UID="DMID"+DM_UIDS+"="+escape(cke);
}
}
break;
case 4:
if((_UID=_gc(DM_UIDN))==null){
_UID=_genID();
_sc(DM_UIDN,_UID,DM_UIDD,DM_UIDP,DM_UIDE,0);
}
_UID="DMID4="+_UID;
break;
}
for(var i=0;i<_evts.length;i++){
_addNV("DM_EVT."+_evts[i].name,_evts[i].props);
}
if(DM_DREF==1){
_addNV("DM_LOC",_encd(_REF,_BCL1,0));
}else{
_addNV("DM_LOC",_encd(_LOC,_BCL1,0));
}
_addNV("DM_REF",_encd(_REF,_BCL1,0));
(_UID!=0&&_UID!=-1?_addNV("DM_HID",_encd(_UID,_BCL1,0)):0);
_addNV("DM_TIT",_encd(_UDC.title.toString(),_BCL1,0));
_CNV+="&DM_EOM=1";
if(_pack(_CNV)){
if(DM_BOOM_ON){
_checkBoom();
}
}
_rstReq();
}
};
function _pack(d){
var rdte=new Date();
var rid=_toHex(Math.floor(rdte));
var bse="",hdr="",dat="",seq=1;
var prt=location.protocol+"//";
var msl=(DM_PIX.length>DM_BPIX.length?DM_PIX.length:DM_BPIX.length);
var mrl=2000,usd=0;
d=_encd(d,_GCL2,1);
for(var shpd=0,f=1;((DM_FRAG)?(shpd<d.length):(f==1));shpd+=dat.length,f++){
hdr="/"+DM_CSID+"/"+_TGID+"/"+_UCS+"/"+DM_UIDS+"/"+_UTZ+"/"+seq+"/"+_USID+"/"+rid+"/"+_UID+"/";
bse="/"+Math.floor(Math.random()*Math.pow(10,9))+".gif?D=";
lst=(shpd+(mrl-msl-(prt+hdr+bse).length-10)>d.length?1:0);
if(!DM_FRAG){
sts=0;
}else{
if(f==1&&lst==0){
sts=1;
}else{
if(f>1&&lst==0){
sts=2;
}else{
if(f>1&&lst==1){
sts=3;
}else{
sts=0;
}
}
}
}
hdr+=sts+"/";
usd=(prt+hdr+bse).length+msl+8;
dat=d.substr(shpd,(mrl-usd-(d.charAt(shpd+(mrl-usd-1))=="%"?1:(d.charAt(shpd+(mrl-usd-2))=="%"?2:0))));
hdr+=_pad(((DM_RCRC)?_toHex(_crc32(dat)):0),8);
_ship(_toHex(Math.floor(Math.random()*Math.pow(10,9))),prt,DM_PIX,DM_BPIX,hdr+bse+dat,0);
seq++;
}
return 1;
};
function _ship(srl,p,s1,s2,u,t){
if(_sImg[srl]==null){
_sImg[srl]=new Image(2,3);
}
if(t<2){
_sImg[srl].src=p+s1+u;
}else{
if(t<4){
_sImg[srl].src=p+s2+u;
}
}
if(DM_LOAD_TIME>0){
setTimeout("isPixLoaded(_sImg['"+srl+"']);",parseInt(DM_LOAD_TIME)*1000);
}
if(DM_RTRY==1&&DM_LOAD_TIME==0){
_sImg[srl].onerror=function(){
setTimeout("_ship('"+srl+"','"+p+"','"+s1+"','"+s2+"','"+u+"',"+(t+1)+")",5000);
};
}
};
function isPixLoaded(pix){
var _419=new Image();
if(pix.complete){
return pix;
}else{
return pix.src=DM_TOUT_PIX_PATH;
}
};
function _addNV(n,v){
_CNV+=(_CNV?"&":"")+n+"="+v;
};
function _genID(){
return _toHex(Math.floor(_DTE))+"-"+_toHex(Math.floor(Math.random()*Math.pow(10,16)))+"-"+_toHex(_crc32("".concat(_UDC.referrer,_UDC.cookie,_UNV.userAgent,_UTZ,screen.width,screen.height)));
};
function _sessID(){
var sID=_gc("DMSID");
if(sID==null){
sID=_gc(_sc("DMSID",_genID(),DM_UIDD,DM_UIDP,0,0));
}
return (sID);
};
function _sc(n,v,d,p,e,o){
var _423=new Date();
if((n!=""&&v!="")&&(_gc(n)==null||o==1)){
_423.setDate(_DTE.getDate()+e);
_UDC.cookie=n+"="+v+(p!=""?";path="+p:"")+(d!=""?";domain="+d:"")+(e>0?";expires="+_423.toGMTString():"");
}
return n;
};
function _gc(n){
var co=_UDC.cookie;
var pos=co.indexOf(n+"=");
return pos!=-1?co.substring(pos+n.length+1,(co.indexOf("; ",pos)!=-1?co.indexOf("; ",pos):co.length)):null;
};
function _encd(s,chrs,b){
for(var i=0,ns="",c="";i<s.length;i++){
if((b==1?chrs.indexOf(s.charAt(i))>=0:chrs.indexOf(s.charAt(i))<0)){
ns+=s.charAt(i);
}else{
if((c=_CHR.indexOf(s.charAt(i)))>0){
ns+="%"+_pad(_toHex(c),2);
}
}
}
return ns;
};
function _crc32(buf){
i=0;
cnt=buf.length;
crc=4294967295;
while(cnt--!=0){
crc=_CRCTbl[(crc^_CHR.indexOf(buf.charAt(i++)))&255]^(crc>>>8);
}
crc^=4294967295;
crc=(crc&2147483647)+((crc<0)?2147483648:0);
return crc;
};
function _appendToUrl(u,n,v){
return u+((u.indexOf("?")==-1)?"?":"&")+n+"="+v;
};
function _toHex(n){
var rmd=0,quo=0,hex="";
if(n<16){
return _hexc[n];
}else{
rmd=(n%16);
quo=Math.floor((n-rmd)/16);
return (_toHex(quo)+_toHex(rmd));
}
};
function _pad(d,p){
d+="";
while(d.length<p){
d="0"+d;
}
return d;
};
function _checkBoom(){
var segC="",bomc="",scrc=0,bcrc=0;
if((segC=_gc("DMSEG"))!=null){
if((bomc=_gc("DMBOM"))!=null){
scrc=_pad(_toHex(_crc32(segC)),8);
bcrc=bomc.substr(0,bomc.indexOf("&"));
if(scrc!=bcrc){
_sendBoom(segC,scrc,DM_BOOM_DMN,DM_BOOM_SRC,DM_BOOM_DCN);
}
}else{
_sendBoom(segC,_pad(_toHex(_crc32(segC)),8),DM_BOOM_DMN,DM_BOOM_SRC,DM_BOOM_DCN);
}
}
};
function _sendBoom(segC,crc,dmn,src,dcn){
var aTok,segs,rid=0,i=0,bl="",u="";
segC=unescape(segC);
aTok=segC.split("&");
if(aTok.length>=6){
if(aTok[5].length>0){
segs=aTok[5].split(",");
while(i<segs.length){
bl+="boom="+segs[i]+";";
i++;
}
rid=Math.floor(Math.random()*Math.pow(10,9));
u="/src="+src+";dcnet="+dcn+";"+bl+"sz=1x1;ord="+rid+"?";
_ship(rid,location.protocol+"//",dmn,dmn,u,0);
_setBoom(crc,1);
}else{
_setBoom(crc,0);
}
}else{
_setBoom(crc,0);
}
};
function _setBoom(crc,snt){
_sc("DMBOM",crc+"&"+_toHex(Math.floor(_DTE))+"&"+snt,DM_CHN,"/",0,1);
};
function _rstReq(){
_CNV="";
_LOC=_UDC.location.toString();
_REF=_UDC.referrer.toString();
_UID=0;
};
function DM_event(e,n,v){
for(var i=0;i<_evts.length;i++){
if(_evts[i].name==e){
if(_evts[i].props.indexOf("("+_encd(n,_BCL1,0)+".")<0){
_evts[i].props+="("+_encd(n,_BCL1,0)+"."+_encd(v,_BCL1,0)+")";
return 1;
}else{
return 0;
}
}
}
_evts[_evts.length]={name:_encd(e,_BCL1,0),props:"("+_encd(n,_BCL1,0)+"."+_encd(v,_BCL1,0)+")"};
return 1;
};
function DM_cat(cat){
_addNV("DM_CAT",_encd(cat,_BCL1,0));
};
function DM_name(f){
_addNV("DM_NAM",_encd(f,_BCL1,0));
};
function DM_keywords(k){
_addNV("DM_KYW",_encd(k,_BCL1,0));
};
function DM_segments(s){
_addNV("DM_SEG",_encd(s,_BCL1,0));
};
function DM_addToLoc(n,v){
_LOC=_appendToUrl(_LOC,n,v);
if(DM_DREF==1){
_REF=_appendToUrl(_REF,n,v);
}
};
function displayDate(){
var _452=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var _453=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var _454=new Date();
document.write(_452[_454.getDay()]+" "+_454.getDate()+" "+_453[_454.getMonth()]+" "+_454.getFullYear());
};
function brighttopups_embedFlash(_455,bReg){
var _457="/brighttopups/flash/po_login.swf";
if(_455==true){
_457="/brighttopups/flash/po_prize.swf";
}
if(window.swfobject!=undefined){
if(swfobject.hasFlashPlayerVersion("9.0.115")){
var sReg=bReg?"true":"false";
var vars={registered:sReg};
var test=swfobject.embedSWF(_457,"brighttopups_flash_container","960","379","9.0.124.0","expressInstall.swf",vars);
}else{
brighttopups_fallback();
}
}else{
brighttopups_fallback();
}
};
function brighttopups_embedTacticalFlash(draw){
var _45c="/brighttopups/flash/entry.swf";
if(window.swfobject!=undefined){
if(swfobject.hasFlashPlayerVersion("9.0.0")){
var vars={drawid:draw};
var test=swfobject.embedSWF(_45c,"brighttopups_flash_container","550","400","9.0.0","expressInstall.swf",vars);
}else{
}
}else{
}
};
function brighttopups_fallback(){
document.location="html.php";
};
function brighttopups_logout(){
document.location="/brighttopups/index.php?rm=logout";
return false;
};
function osborne_reload(){
brighttopups_reload();
};
function brighttopups_reload(){
window.location.reload(true);
};
function brighttopups_trackVoucherDownload(url){
brighttopups_track(url);
};
function brighttopups_track(url){
if(pageTracker!=undefined){
pageTracker._trackPageview(url);
}
};
var OrangeRecaptcha={publicKey:"",create:function(id){
Recaptcha.create(this.publicKey,id,{theme:"custom"});
},reload:function(id){
Recaptcha.destroy();
this.create(id);
},destroy:function(){
Recaptcha.destroy();
}};
var RelatedVideosCarousel_width;
var RelatedVideosCarousel_stepsRemaining=0;
var RelatedVideosCarousel_movementPerStep;
var RelatedVideosCarousel_xpos=0;
function RelatedVideosCarousel_init(){
var el=document.getElementById("RelatedVideosCarousel");
var _464=el.childNodes.length;
var _465=0;
for(var _466=0;_466<_464;_466++){
child=el.childNodes[_466];
if(child.tagName=="LI"){
if(window.getComputedStyle){
width=parseInt(document.defaultView.getComputedStyle(child,null).getPropertyValue("width"));
}else{
width=child.clientWidth;
}
_465+=parseInt(width);
}
}
alert(_465);
RelatedVideosCarousel_width=_465;
RelatedVideosCarousel_setButtons();
};
function RelatedVideosCarousel_startScrollLeft(){
if((RelatedVideosCarousel_stepsRemaining==0)&&(RelatedVideosCarousel_xpos>0)){
RelatedVideosCarousel_movementPerStep=-5;
RelatedVideosCarousel_stepsRemaining=22;
setTimeout("RelatedVideosCarousel_doScroll()",10);
}
return (false);
};
function RelatedVideosCarousel_startScrollRight(){
if((RelatedVideosCarousel_stepsRemaining==0)&&((RelatedVideosCarousel_xpos+749)<RelatedVideosCarousel_width)){
RelatedVideosCarousel_movementPerStep=5;
RelatedVideosCarousel_stepsRemaining=22;
setTimeout("RelatedVideosCarousel_doScroll()",10);
}
return (false);
};
function RelatedVideosCarousel_doScroll(){
if(RelatedVideosCarousel_stepsRemaining>0){
if(RelatedVideosCarousel_stepsRemaining==1){
RelatedVideosCarousel_movementPerStep=RelatedVideosCarousel_movementPerStep*2/5;
}
RelatedVideosCarousel_xpos+=RelatedVideosCarousel_movementPerStep;
document.getElementById("RelatedVideosCarousel").style.clip="rect(0px "+(740+RelatedVideosCarousel_xpos)+"px 107px "+(0+RelatedVideosCarousel_xpos)+"px)";
document.getElementById("RelatedVideosCarousel").style.left=(33-RelatedVideosCarousel_xpos)+"px";
RelatedVideosCarousel_stepsRemaining--;
setTimeout("RelatedVideosCarousel_doScroll()",10);
}else{
RelatedVideosCarousel_setButtons();
}
};
function RelatedVideosCarousel_setButtons(){
var _467="pointer";
var _468="pointer";
var _469="leftscroll.gif";
var _46a="rightscroll.gif";
if(RelatedVideosCarousel_xpos==0){
_467="default";
_469="leftscroll_disabled.gif";
}
if((RelatedVideosCarousel_xpos+749)>=RelatedVideosCarousel_width){
_468="default";
_46a="rightscroll_disabled.gif";
}
document.getElementById("RelatedVideosCarouselLeftScroller").style.cursor=_467;
document.getElementById("RelatedVideosCarouselLeftScroller").firstChild.src="/images/furniture/video/relatedvideoscarousel/"+_469;
document.getElementById("RelatedVideosCarouselRightScroller").style.cursor=_468;
document.getElementById("RelatedVideosCarouselRightScroller").firstChild.src="/images/furniture/video/relatedvideoscarousel/"+_46a;
};
function rugbylChangeSelectedCompetition(){
var _46b=document.location.href.split("?");
var _46c=_46b[0]+"?competition="+escape(document.getElementById("competition_select").value);
if(document.getElementById("month_select").value){
_46c+="&month="+escape(document.getElementById("month_select").value);
}
document.location=_46c;
};
function rugbylChangeSelectedMonth(){
rugbylChangeSelectedCompetition();
};
function selectRad(_46d){
var _46e="radio";
document.getElementById("search_pt").value=_46e+_46d;
};
function validateSearch(){
if(trim(document.getElementById("search_q").value)==""){
alert("Please type in one or more search terms before searching");
return false;
}else{
if(document.getElementById("search_pt").value=="x"){
selectRad("web");
}
return true;
}
};
var ShareEquities={currentAjaxCall:null,init:function(){
dojo.connect(dojo.byId("ShareEquities_find_button"),"onclick",ShareEquities,"findButtonClicked");
dojo.connect(dojo.byId("ShareEquities_go"),"onclick",ShareEquities,"goButtonClicked");
},ajaxXhrGet:function(_46f){
if(ShareEquities.currentAjaxCall){
ShareEquities.currentAjaxCall.cancel();
}
ShareEquities.currentAjaxCall=dojo.xhrGet({url:"/shares/ajax.php?rm="+_46f.runmode+"&"+_46f.parameter+"="+_46f.value,handleAs:"json",timeout:2000,load:_46f.loadFunction,error:_46f.errorFunction});
},populateSelectBox:function(_470){
var _471=dojo.byId("ShareEquities_equity_result");
_471.options.length=0;
newOption=dojo.doc.createElement("option");
newOption.setAttribute("value","");
newOption.appendChild(dojo.doc.createTextNode(_470.length+" equit"+(_470.length>1?"ies":"y")+" found..."));
_471.appendChild(newOption);
for(key in _470){
share=_470[key];
newOption=dojo.doc.createElement("option");
newOption.setAttribute("value",share.code);
newOption.appendChild(dojo.doc.createTextNode(share.name));
_471.appendChild(newOption);
}
if(_470.length==1){
setTimeout("dojo.byId('ShareEquities_equity_result').selectedIndex=1",1);
}
},populateShareInfo:function(info){
var _473={0:"sell",1:"mid",2:"dayhigh",3:"previousclose",4:"buy",5:"change",6:"daylow"};
ddNodes=new Array();
dojo.query("div.ShareEquities dd").forEach(function(n){
ddNodes[ddNodes.length]=n;
});
for(var _475=0;_475<ddNodes.length;_475++){
ddNodes[_475].innerHTML=info[_473[_475]];
}
summary=dojo.byId("ShareEquities_summary");
summary.innerHTML=info.name+" "+info.mid;
},goButtonClicked:function(){
var _476=dojo.byId("ShareEquities_equity_result");
if(_476.selectedIndex>0){
var code=_476.value;
ShareEquities.ajaxXhrGet({runmode:"EquityByCode",parameter:"code",value:code,loadFunction:function(_478,_479){
if(_478.length==1){
ShareEquities.populateShareInfo(_478[0]);
}
},errorFunction:function(){
}});
}
},findButtonClicked:function(){
var name=dojo.trim(dojo.byId("ShareEquities_name").value);
var code=dojo.trim(dojo.byId("ShareEquities_code").value);
var _47c=dojo.byId("ShareEquities_equity_result");
_47c.options.length=0;
dojo.query("div.ShareEquities dd").forEach(function(n){
n.innerHTML="";
});
dojo.byId("ShareEquities_summary").innerHTML="";
if(name!=""){
if(name.length>2){
dojo.xhrGet({url:"/shares/ajax.php?rm=EquitiesByName&name="+name,handleAs:"json",timeout:2000,load:function(_47e,_47f){
if(_47e.length>0){
_47c.disabled=false;
ShareEquities.populateSelectBox(_47e);
if(_47e.length==1){
var code=_47e[0].code;
ShareEquities.ajaxXhrGet({runmode:"EquityByCode",parameter:"code",value:code,loadFunction:function(_481,_482){
ShareEquities.populateShareInfo(_481[0]);
},errorFunction:function(){
}});
}
}
},error:function(_483,_484){
}});
}else{
alert("Please enter a share name of at least 3 characters.");
}
}else{
if(code!=""){
ShareEquities.ajaxXhrGet({runmode:"EquityByCode",parameter:"code",value:code,loadFunction:function(_485,_486){
ShareEquities.populateSelectBox(_485);
if(_485.length==1){
ShareEquities.populateShareInfo(_485[0]);
}
},errorFunction:function(){
}});
}
}
}};
var ShareIndicesList={currentlySelectedRow:0,currentlySelectedTimePeriodIndex:2,timePeriodLookup:{0:{timeP:"1d",spanP:"0",graphType:"1",startTime:"8:00",endTime:"17:00"},1:{timeP:"5d",spanP:"4",graphType:"2",startTime:"",endTime:""},2:{timeP:"1y",spanP:"12",graphType:"3",startTime:"",endTime:""},3:{timeP:"5y",spanP:"60",graphType:"3",startTime:"",endTime:""}},updateGraph:function(_487,_488){
var _489=ShareIndicesList.indexLookup[_487];
var _48a=ShareIndicesList.timePeriodLookup[_488];
dojo.byId("ShareIndicesList_indexgraph").src="http://webfund5.finexprestel.com/orange/gifchart.asp?code=N"+_489+"&span="+_48a.spanP+"&gphtype="+_48a.graphType+"&startTime="+_48a.startTime+"&endTime="+_48a.endTime+"&wd=264&ht=140&gpcolour=HFF6600&ftcolour=333333&bgcolour=HFFFFFF&gdcolour=HDEDFEF&bdcolour=FFFFFF&axcolour=H001410&ShowDate=0&chartbgcolour=HFFFFFF&gf=0&hdg=1&hdgpos=1&fg=3&fontsize=8&fontname=Arial";
},selectRow:function(_48b){
idComponents=_48b.currentTarget.id.split("_");
var _48c=idComponents[2];
dojo.stopEvent(_48b);
if(ShareIndicesList.currentlySelectedRow!=_48c){
dojo.byId("ShareIndicesList_row_"+ShareIndicesList.currentlySelectedRow).className="";
dojo.byId("ShareIndicesList_row_"+_48c).className="selected";
ShareIndicesList.updateGraph(_48c,ShareIndicesList.currentlySelectedTimePeriodIndex);
ShareIndicesList.currentlySelectedRow=_48c;
}
},selectTimePeriod:function(_48d){
var _48e=_48d.currentTarget.id.split("_");
var _48f=_48e[2];
dojo.stopEvent(_48d);
if(ShareIndicesList.currentlySelectedTimePeriodIndex!=_48f){
dojo.byId("ShareIndicesList_timeperiod_"+ShareIndicesList.currentlySelectedTimePeriodIndex).className="";
var _490=dojo.byId("ShareIndicesList_timeperiod_"+_48f);
_490.className="selected";
_490.blur();
ShareIndicesList.updateGraph(ShareIndicesList.currentlySelectedRow,_48f);
ShareIndicesList.currentlySelectedTimePeriodIndex=_48f;
}
},init:function(){
ShareIndicesList.indexLookup=new Array();
var _491=0;
var _492;
dojo.query("div.ShareIndicesList tr").forEach(function(n){
if(_491==(ShareIndicesList.currentlySelectedRow+1)){
n.className="selected";
}
if(_491!=0){
_492=n.getAttribute("id").split("_");
ShareIndicesList.indexLookup[ShareIndicesList.indexLookup.length]=_492[2];
n.setAttribute("id","ShareIndicesList_row_"+(_491-1));
dojo.connect(n,"onmouseover",ShareIndicesList,"selectRow");
}
_491++;
});
var _494;
_491=0;
dojo.query("div.ShareIndicesList li").forEach(function(n){
_494=n.firstChild;
if(_491==ShareIndicesList.currentlySelectedTimePeriodIndex){
_494.className="selected";
}
_494.setAttribute("id","ShareIndicesList_timeperiod_"+_491);
dojo.connect(_494,"onclick",ShareIndicesList,"selectTimePeriod");
_491++;
});
ShareIndicesList.updateGraph(ShareIndicesList.currentlySelectedRow,ShareIndicesList.currentlySelectedTimePeriodIndex);
}};
function TabContainer(id){
this.id=id;
this.tab_no;
this.number_of_tabs;
this.component=document.getElementById(this.id);
this.timerstopped;
this.initial_tab;
this.timer;
this.useCssDisplay=false;
this.parentTabContainer=false;
this.parentTabHeightOffset=0;
};
TabContainer.prototype.select=function(_497){
this.pause;
this.timerstopped=true;
this.switchto(_497);
};
TabContainer.prototype.switchToInitialTab=function(){
var uri=window.location.href;
var re=new RegExp("#([0-9])");
var _49a=re.exec(uri);
if(_49a){
var idx=_49a[1];
this.switchto(idx);
}else{
this.switchto(1);
}
};
TabContainer.prototype.switchto=function(_49c){
if(this.component){
var _49d=document.getElementById(this.id+"-"+this.tab_no);
if(_49d){
if(this.useCssDisplay){
_49d.style.display="none";
}else{
_49d.style.visibility="hidden";
}
}
var _49e=document.getElementById(this.id+"-"+_49c);
if(_49e){
if(this.useCssDisplay){
_49e.style.display="block";
}else{
_49e.style.visibility="visible";
}
}
var _49f=document.getElementById(this.id+"-"+this.tab_no+"-tab");
if(_49f){
_49f.parentNode.className=_49f.parentNode.className.replace(" current","");
_49f.className="tab"+this.tab_no;
}
var _4a0=document.getElementById(this.id+"-"+_49c+"-tab");
if(_4a0){
_4a0.parentNode.className=_4a0.parentNode.className+" current";
_4a0.className=_4a0.className+" current "+_4a0.className+"-current";
if(_49c==this.number_of_tabs){
_4a0.className=_4a0.className+" last";
}
}
if(this.component&&_4a0&&_49e){
this.setContainerHeight(_4a0.offsetHeight+_49e.offsetHeight);
}
this.tab_no=_49c;
}
return false;
};
TabContainer.prototype.setContainerHeight=function(_4a1){
if(!_4a1){
var _4a2=document.getElementById(this.id+"-"+this.initial_tab+"-tab");
var _4a3=document.getElementById(this.id+"-"+this.initial_tab);
if(_4a2&&_4a3){
_4a1=_4a2.offsetHeight+_4a3.offsetHeight;
}
}
var _4a4=document.getElementById(this.id+"-h3");
if(_4a4){
_4a1+=_4a4.offsetHeight;
}
this.component.style.height=_4a1+"px";
if(this.parentTabContainer){
this.component.style.height=(_4a1+this.parentTabHeightOffset)+"px";
this.parentTabContainer.switchto(this.parentTabContainer.tab_no);
}
return;
};
TabContainer.prototype.nextTab=function(){
if(this.tab_no<this.number_of_tabs){
return this.switchto(this.tab_no+1);
}else{
return this.switchto(1);
}
};
TabContainer.prototype.startTimer=function(_4a5,_4a6){
if(_4a5>0){
var that=this;
var args=Array.prototype.slice.apply(arguments,[2]);
if(typeof _4a6==="string"){
_4a6=that[_4a6];
}
this.timer=setInterval(function(){
_4a6.apply(that,args);
},_4a5);
return that;
}
return;
};
TabContainer.prototype.pause=function(){
if(this.timer){
clearInterval(this.timer);
}
return;
};
TabContainer.prototype.start=function(){
if(!this.timerstopped){
this.startTimer(this.interval*1000,"nextTab");
}
return;
};
TabContainer.prototype.initialise=function(_4a9,_4aa,_4ab){
this.number_of_tabs=_4a9;
this.interval=_4aa;
if(_4ab){
this.initial_tab=_4ab;
}else{
this.initial_tab=1;
}
this.tab_no=this.initial_tab;
this.setContainerHeight();
this.start();
return;
};
function tennisChangeSelectedTournament(){
var _4ac=document.location.href.split("?");
var _4ad=_4ac[0]+"?tournament="+(document.getElementById("tournament_select").value);
document.location=_4ad;
};
function orangeTrack(_4ae,mode,_4b0){
switch(_4ae){
case "webtrends":
orangeTrackWebtrends(mode,_4b0);
break;
case "spotlight":
orangeTrackSpotlight(_4b0);
break;
}
};
function orangeTrackWebtrends(mode,_4b2){
var _4b3=location.href.replace(/\?.*$/,"");
var _4b4=_4b3.replace(/http:\/\/[^\/]*/,"");
switch(mode){
case "partner":
var _4b5=_4b2.targetUrl.replace(/http:\/\//ig,"").split("/");
_4b5=_4b5[0];
dcsMultiTrack("DCS.dcsuri","/OC/partner/"+_4b5,"DCS.dcsref",_4b3,"WT.ti","Partner:"+_4b2.partnerId,"WT.cg_n","Partner:"+_4b5,"WT.cg_s","","WT.pi","","WT.mc_id","","WT.ac","","WT.srch","","WT.svl",_4b2.trackingRef);
break;
case "lightbox_gallery":
dcsMultiTrack("DCS.dcsuri",_4b4+"/lightbox_gallery/"+_4b2.galleryId,"WT.ti","lightbox: "+_4b2.title,"WT.cg_n",_4b2.contentGroup,"WT.cg_s","lightbox_gallery","DCSext.cg_3",_4b2.galleryId,"DCSext.pic_count",_4b2.imagePosition);
break;
case "binary_document":
dcsMultiTrack("DCS.dcsuri",_4b2.targetUrl,"WT.ti",_4b2.wtTitle,"WT.cg_n",_4b2.wtSection,"WT.cg_s",_4b2.wtSubSection);
break;
}
};
function orangeTrackSpotlight(_4b6){
var axel=Math.random()+"";
var a=axel*1000000000000000000;
var _4b9=new Image();
_4b9.onload=function(){
document.location=_4b6.targetUrl;
};
_4b9.src="http://ad.uk.doubleclick.net/activity;src=2145760;type="+_4b6.spotlightType+";cat="+_4b6.spotlightCat+";ord=1;num="+a+"?";
return false;
};
var TwoDayResultsByCompetition_currentTab="";
function TwoDayResultsByCompetition_showCompetition(_4ba){
if(_4ba!=TwoDayResultsByCompetition_currentTab){
var el=document.getElementById(_4ba);
el.style.display="block";
var _4bc;
for(var _4bd=0;_4bd<el.childNodes.length;_4bd++){
outerChild=el.childNodes[_4bd];
if(outerChild.tagName=="UL"){
for(var _4be=0;_4be<outerChild.childNodes.length;_4be++){
innerChild=outerChild.childNodes[_4be];
if(window.getComputedStyle){
_4bc=parseInt(document.defaultView.getComputedStyle(innerChild,null).getPropertyValue("height"));
}else{
_4bc=innerChild.clientHeight-7;
}
if((_4be&1)==1){
if(_4bc>lastInnerChildHeight){
lastInnerChild.style.height=_4bc+"px";
}else{
if(lastInnerChildHeight>_4bc){
innerChild.style.height=lastInnerChildHeight+"px";
}
}
if((_4bc<28)&&(lastInnerChildHeight<28)){
innerChild.style.height="28px";
lastInnerChild.style.height="28px";
}
}
if(((_4be&1)==0)&&(_4be==(outerChild.childNodes.length-1))){
if(_4bc<28){
innerChild.style.height="28px";
}
}
lastInnerChild=innerChild;
lastInnerChildHeight=_4bc;
}
}
}
if(document.getElementById(TwoDayResultsByCompetition_currentTab)){
document.getElementById(TwoDayResultsByCompetition_currentTab).style.display="none";
}
TwoDayResultsByCompetition_currentTab=_4ba;
}
};
function outputWeatherOverview(){
};
function getWeatherDescription(){
};
function writeWeather(){
for(index=0;index<=1;index++){
currentForecast=forcasts[index];
document.write("<div>");
document.write("<img width=\"35\" src=\"http://www.orange.co.uk/images/news/weather/icons/small/"+currentForecast.dayicon+".gif\"/>");
document.write("<h3>"+currentForecast.dayname+"</h3>");
document.write("<ul>");
document.write("<li><strong>L:</strong> "+currentForecast.low+"C</li>");
document.write("<li><strong>H:</strong> "+currentForecast.high+"C</li>");
document.write("</ul>");
document.write("</div>");
}
};
function syncRoadBlock(_4bf){
a=_4bf.split(";");
if(a.length>0){
for(x=0;x<=a.length-1;x++){
if(a[x].indexOf("sz=")==0){
size=a[x].substring(3);
dims=size.split("x");
height=dims[0];
width=dims[1];
loadRBs("lcBannerDiv",height,width,_4bf);
}
}
}
};
function loadRBs(s,w,h,_4c3){
document.getElementById(s).innerHTML="<iframe src=\""+_4c3+"\" id=\"ifr_companion\" width=\""+w+"\" height=\""+h+"\" marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no>"+"</iframe>";
};
function loadBanner(_4c4,href){
var _4c6=_4c4;
var _4c7=href;
var _4c8=_4c6.toLowerCase();
var _4c9=_4c6;
if(""==_4c7||"DHTML"==_4c7||"null"==_4c7||0<_4c8.indexOf(".swf")){
_4c9="<HTML><IFRAME src=\""+_4c6+"\" frameborder=\"0\" scrolling=\"no\" width=\"100%\" height=\"100%\" marginwidth=\"0\" marginheight=\"0\"/></HTML>";
}else{
if(0==_4c9.indexOf("http")){
_4c9="<HTML><CENTER><A HREF=\""+_4c7+"\" target=\"_blank\"><IMG SRC=\""+_4c6+"\" border=\"0\"></A></CENTER></HTML>";
}else{
_4c9="<HTML>"+_4c6+"</HTML>";
}
}
var oDiv=document.getElementById("lcBannerDiv");
oDiv.innerHTML=_4c9;
};
function displayBannerIMG(_4cb,_4cc){
var oDiv=document.getElementById("lcBannerDiv");
if(oDiv.hasChildNodes()==true){
var _4ce=oDiv.removeChild(oDiv.firstChild);
}
var _4cf=document.createElement("a");
var oImg=document.createElement("img");
_4cf.setAttribute("href",_4cc);
_4cf.setAttribute("target","_blank");
oImg.setAttribute("src",_4cb);
oImg.setAttribute("border",0);
_4cf.appendChild(oImg);
oDiv.appendChild(_4cf);
};
function displayBannerHTML(_4d1){
var oDiv=document.getElementById("lcBannerDiv");
oDiv.innerHTML="";
str="<iframe width=\"300\" height=\"250\" frameborder=\"0\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" src=\""+_4d1+"\"></iframe>";
oDiv.innerHTML=str;
};
function displayBannerSWF(_4d3){
var oDiv=document.getElementById("lcBannerDiv");
oDiv.innerHTML="";
str="<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"300\" height=\"250\" id=\"bannerSWF\" align=\"middle\"> ";
str+="<param name=\"allowScriptAccess\" value=\"sameDomain\" />";
str+="  <param name=\"movie\" value=\""+_4d3+"\" />";
str+="  <param name=\"quality\" value=\"high\" />";
str+="  <param name=\"bgcolor\" value=\"#ffffff\" />";
str+="  <embed src=\""+_4d3+" \" quality=\"high\" bgcolor=\"#ffffff\" width=\"300\" height=\"250\" name=\"bannerSWF\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
str+="</object>";
oDiv.innerHTML=str;
};
var getElementsByClassName=function(_4d5,tag,elm){
if(document.getElementsByClassName){
getElementsByClassName=function(_4d8,tag,elm){
tag=tag||"*";
elm=elm||document;
var _4db=elm.getElementsByClassName(_4d8),_4dc=new RegExp("\\b"+((tag!=="*")?tag:"[a-z]+")+"\\b","i"),_4dd=[],_4de;
for(var i=0,il=_4db.length;i<il;i+=1){
_4de=_4db[i];
if(_4dc.test(_4de.nodeName)){
_4dd.push(_4de);
}
}
return _4dd;
};
}else{
if(document.evaluate){
getElementsByClassName=function(_4e1,tag,elm){
tag=tag||"*";
elm=elm||document;
var _4e4=_4e1.split(" "),_4e5="",_4e6="http://www.w3.org/1999/xhtml",_4e7=(document.documentElement.namespaceURI===_4e6)?_4e6:null,_4e8=[],_4e9,node;
for(var j=0,jl=_4e4.length;j<jl;j+=1){
_4e5+="[contains(concat(' ', @class, ' '), ' "+_4e4[j]+" ')]";
}
try{
_4e9=document.evaluate(".//"+tag+_4e5,elm,_4e7,0,null);
}
catch(e){
_4e9=document.evaluate(".//"+tag+_4e5,elm,null,0,null);
}
while((node=_4e9.iterateNext())){
_4e8.push(node);
}
return _4e8;
};
}else{
getElementsByClassName=function(_4ed,tag,elm){
tag=tag||"*";
elm=elm||document;
var _4f0=_4ed.split(" "),_4f1=[],_4f2=(tag==="*"&&elm.all)?elm.all:elm.getElementsByTagName(tag),_4f3,_4f4=[],_4f5;
for(var k=0,kl=_4f0.length;k<kl;k+=1){
_4f1.push(new RegExp("(^|\\s)"+_4f0[k]+"(\\s|$)"));
}
for(var l=0,ll=_4f2.length;l<ll;l+=1){
_4f3=_4f2[l];
_4f5=false;
for(var m=0,ml=_4f1.length;m<ml;m+=1){
_4f5=_4f1[m].test(_4f3.className);
if(!_4f5){
break;
}
}
if(_4f5){
_4f4.push(_4f3);
}
}
return _4f4;
};
}
}
return getElementsByClassName(_4d5,tag,elm);
};
function VideoInformationBoxBlogCopyOpen_setPosition(){
var left=0;
var top=0;
if(document.all){
var el=document.getElementById("VideoInformationBoxBlogCopyClosed");
while(el!=null){
offsetLeft=parseInt(el.offsetLeft);
offsetTop=parseInt(el.offsetTop);
if(el.id!="maincontainer"){
if(offsetLeft>0){
left+=offsetLeft;
}
if(offsetTop>0){
top+=offsetTop;
}
}
el=el.offsetParent;
}
}else{
left=document.getElementById("VideoInformationBoxBlogCopyClosed").offsetLeft;
top=document.getElementById("VideoInformationBoxBlogCopyClosed").offsetTop;
}
document.getElementById("VideoInformationBoxBlogCopyOpen").style.left=(left-5)+"px";
document.getElementById("VideoInformationBoxBlogCopyOpen").style.top=(top-7)+"px";
};
function VideoInformationBoxBlogCopyOpen_show(){
VideoInformationBoxBlogCopyOpen_setPosition();
document.getElementById("VideoInformationBoxBlogCopyOpen").style.visibility="visible";
return (false);
};
function VideoInformationBoxBlogCopyOpen_hide(){
document.getElementById("VideoInformationBoxBlogCopyOpen").style.visibility="hidden";
return (false);
};
function VideoInformationBoxBlogCopyOpen_DisplayCodeBox(_4ff){
var _500=new Array("WebsiteLink","ForumLink","EmailLink");
var _501;
for(box in _500){
if(_500[box]==_4ff){
_501="block";
}else{
_501="none";
}
document.getElementById("VideoInformationBoxBlogCopyOpen_"+_500[box]).style.display=_501;
}
return (false);
};
var VideoSectionsCarousel_width;
var VideoSectionsCarousel_stepsRemaining=0;
var VideoSectionsCarousel_movementPerStep;
var VideoSectionsCarousel_xpos=0;
function VideoSectionsCarousel_init(){
var el=document.getElementById("VideoSectionsCarousel");
var _503=el.childNodes.length;
var _504=0;
for(var _505=0;_505<_503;_505++){
child=el.childNodes[_505];
if(child.tagName=="LI"){
if(window.getComputedStyle){
width=parseInt(document.defaultView.getComputedStyle(child,null).getPropertyValue("width"));
}else{
width=child.clientWidth;
}
_504+=parseInt(width);
}
}
VideoSectionsCarousel_width=_504;
VideoSectionsCarousel_setButtons();
};
function VideoSectionsCarousel_startScrollLeft(){
if((VideoSectionsCarousel_stepsRemaining==0)&&(VideoSectionsCarousel_xpos>0)){
VideoSectionsCarousel_movementPerStep=-5;
VideoSectionsCarousel_stepsRemaining=15;
setTimeout("VideoSectionsCarousel_doScroll()",10);
}
return (false);
};
function VideoSectionsCarousel_startScrollRight(){
if((VideoSectionsCarousel_stepsRemaining==0)&&((VideoSectionsCarousel_xpos+437)<VideoSectionsCarousel_width)){
VideoSectionsCarousel_movementPerStep=5;
VideoSectionsCarousel_stepsRemaining=15;
setTimeout("VideoSectionsCarousel_doScroll()",10);
}
return (false);
};
function VideoSectionsCarousel_doScroll(){
if(VideoSectionsCarousel_stepsRemaining>0){
if(VideoSectionsCarousel_stepsRemaining==1){
VideoSectionsCarousel_movementPerStep=VideoSectionsCarousel_movementPerStep*2/5;
}
VideoSectionsCarousel_xpos+=VideoSectionsCarousel_movementPerStep;
document.getElementById("VideoSectionsCarousel").style.clip="rect(0px "+(431+VideoSectionsCarousel_xpos)+"px 58px "+(0+VideoSectionsCarousel_xpos)+"px)";
document.getElementById("VideoSectionsCarousel").style.left=(27-VideoSectionsCarousel_xpos)+"px";
VideoSectionsCarousel_stepsRemaining--;
setTimeout("VideoSectionsCarousel_doScroll()",10);
}else{
VideoSectionsCarousel_setButtons();
}
};
function VideoSectionsCarousel_setButtons(){
var _506="pointer";
var _507="pointer";
var _508="leftscroll.gif";
var _509="rightscroll.gif";
if(VideoSectionsCarousel_xpos==0){
_506="default";
_508="leftscroll_disabled.gif";
}
if((VideoSectionsCarousel_xpos+437)>=VideoSectionsCarousel_width){
_507="default";
_509="rightscroll_disabled.gif";
}
document.getElementById("VideoSectionsCarouselLeftScroller").style.cursor=_506;
document.getElementById("VideoSectionsCarouselLeftScroller").firstChild.src="/images/furniture/video/videosectionscarousel/"+_508;
document.getElementById("VideoSectionsCarouselRightScroller").style.cursor=_507;
document.getElementById("VideoSectionsCarouselRightScroller").firstChild.src="/images/furniture/video/videosectionscarousel/"+_509;
};
var WeatherThreeDayForecast={cookieDelimiter:";",currentCityCode:[],currentCityLabel:[],searchTimer:false,searchDelay:230,cookieName:"weather_location",defaultLocation:"London",init:function(id){
dojo.require("dojo.cookie");
var _50b=dojo.cookie(WeatherThreeDayForecast.cookieName);
if(_50b){
var _50c=_50b.split(WeatherThreeDayForecast.cookieDelimiter);
WeatherThreeDayForecast.setCurrentCityCode(id,_50c[0]);
WeatherThreeDayForecast.setCurrentCityLabel(id,_50c[1]);
}
},populateForm:function(id){
dojo.require("dojo.cookie");
dojo.connect(dojo.byId("form_"+id),"onsubmit",this,"formSubmitted");
dojo.connect(dojo.byId("search_"+id),"onfocus",this,function(){
WeatherThreeDayForecast.clearLocationDefault(id);
});
dojo.connect(dojo.byId("saveLocation_"+id),"onclick",this,"formSubmitted");
dojo.connect(dojo.byId("changeLocation_"+id),"onclick",this,function(){
WeatherThreeDayForecast.showSearchLocation(id);
});
var _50e=dojo.cookie(WeatherThreeDayForecast.cookieName);
if(_50e){
WeatherThreeDayForecast.showDisplayLocation(id);
}else{
WeatherThreeDayForecast.showSearchLocation(id);
}
},getCurrentCityCode:function(id){
return WeatherThreeDayForecast.currentCityCode[id];
},setCurrentCityCode:function(id,_511){
WeatherThreeDayForecast.currentCityCode[id]=_511;
},getCurrentCityLabel:function(id){
return WeatherThreeDayForecast.currentCityLabel[id];
},setCurrentCityLabel:function(id,_514){
WeatherThreeDayForecast.currentCityLabel[id]=_514;
},getLocationCookie:function(){
var _515=dojo.cookie(WeatherThreeDayForecast.cookieName);
if(_515){
return _515;
}
return false;
},setLocationCookie:function(_516){
var _517;
if(window.location.hostname.indexOf(".orange.co.uk")!=-1){
_517="orange.co.uk";
}else{
_517=window.location.hostname;
}
dojo.cookie(WeatherThreeDayForecast.cookieName,_516,{domain:"."+_517,expires:830,path:"/"});
},formSubmitted:function(_518){
_518.stopPropagation();
dojo.stopEvent(_518);
var _519=_518.currentTarget.id.split("_");
var _51a=dojo.byId("search_"+_519[_519.length-1]);
WeatherThreeDayForecast.setCurrentCityCodeFromLocation(_519[_519.length-1],_51a.value);
},setCurrentCityCodeFromLocation:function(id,_51c){
if(_51c.length>=2){
var _51d={url:"/weather/ajax.php",content:{location:_51c,townmatch:"on"},preventCache:true,timeout:2000,handleAs:"json",load:dojo.hitch(this,function(data){
if(data.gotStations&&data.stations[0]){
WeatherThreeDayForecast.setCurrentCityCode(id,data.stations[0].station_id);
WeatherThreeDayForecast.setCurrentCityLabel(id,_51c);
WeatherThreeDayForecast.updateThreeDayForecast(id);
WeatherThreeDayForecast.showDisplayLocation(id);
}else{
WeatherThreeDayForecast.showLocationError(id);
}
}),error:dojo.hitch(this,function(_51f){
WeatherThreeDayForecast.showLocationError(id);
})};
dojo.xhrGet(_51d);
}
},updateThreeDayForecast:function(id){
if(!WeatherThreeDayForecast.getCurrentCityCode(id)){
return false;
}
WeatherThreeDayForecast.setLocationCookie(WeatherThreeDayForecast.getCurrentCityCode(id)+WeatherThreeDayForecast.cookieDelimiter+WeatherThreeDayForecast.getCurrentCityLabel(id));
var _521={url:"/weather/content.php",content:{rm:"forecast",json:"true",location:WeatherThreeDayForecast.getCurrentCityCode(id)},preventCache:true,timeout:1000,handleAs:"json",load:function(_522){
var _523=dojo.query("#WeatherThreeDayForecast_"+id+" .WeatherForecastDay");
_523.forEach(function(node,_525,_526){
for(var key in _522[_525]){
var _528=dojo.query("."+key,node);
if(_528[0]){
var _529=_528[0];
if(_529.tagName.toLowerCase()!="img"){
_529.innerHTML=_522[_525][key];
}else{
_529.src="/images/furniture/news/weather/"+_522[_525][key]+".gif";
_529.alt=_522[_525]["summary"];
_529.title=_522[_525]["summary"];
}
}
}
});
},error:dojo.hitch(this,function(_52a){
WeatherThreeDayForecast.showLocationError(id);
})};
dojo.xhrGet(_521);
},updateDisplayLocation:function(id){
var _52c=WeatherThreeDayForecast.getLocationCookie();
var _52d=dojo.query("#displayLocation_"+id+" p.location");
if(!_52d[0]){
return false;
}
if(_52c){
var _52e=_52c.split(WeatherThreeDayForecast.cookieDelimiter);
_52d[0].innerHTML=_52e[_52e.length-1];
}else{
if(WeatherThreeDayForecast.getCurrentCityLabel(id)){
_52d[0].innerHTML=WeatherThreeDayForecast.getCurrentCityLabel(id);
}
}
},showDisplayLocation:function(id){
WeatherThreeDayForecast.updateDisplayLocation(id);
dojo.style(dojo.byId("searchLocation_"+id),"display","none");
dojo.style(dojo.byId("displayLocation_"+id),"display","block");
},showSearchLocation:function(id){
WeatherThreeDayForecast.setLocationDefault(id);
dojo.style(dojo.byId("displayLocation_"+id),"display","none");
dojo.style(dojo.byId("searchLocation_"+id),"display","block");
},fiveDayForecast:function(id){
if(WeatherThreeDayForecast.getCurrentCityCode(id)){
document.location="http://orangeuk.accuweather.com/orange/forecast.asp?location="+WeatherThreeDayForecast.getCurrentCityCode(id);
}else{
document.location="http://orangeuk.accuweather.com/orange/forecast.asp?location="+WeatherThreeDayForecast.defaultLocation;
}
},weatherHomepage:function(id){
if(WeatherThreeDayForecast.getCurrentCityCode(id)){
document.location="http://orangeuk.accuweather.com/orange/index.asp?location="+WeatherThreeDayForecast.getCurrentCityCode(id);
}else{
document.location="http://orangeuk.accuweather.com/orange/index.asp?location="+WeatherThreeDayForecast.defaultLocation;
}
},clearLocationDefault:function(id){
var _534=dojo.byId("search_"+id);
if(!_534){
return false;
}
if(_534.value=="enter postcode or town"||_534.value=="location not found"){
_534.value="";
}
},setLocationDefault:function(id){
var _536=dojo.byId("search_"+id);
if(!_536){
return false;
}
_536.value="enter postcode or town";
},showLocationError:function(id){
var _538=dojo.byId("search_"+id);
if(!_538){
return false;
}
_538.value="location not found";
}};
function parseLayout(){
cnt=document.getElementById("maincontainer");
return new PillParser(cnt);
};
function fixLayout(_539){
for(var i=0;i<_539.length;i++){
_539[i].setHeight();
}
};
function printLayout(_53b){
for(var i=0;i<_53b.length;i++){
var _53d=_53b[i].debug();
document.write(_53d);
}
};
PillParser=function(_53e){
this.dom_node=_53e;
return this.parse();
};
PillParser.prototype.isPlaceholder=function(node){
var _540=new RegExp("\\bwpm_ph\\b");
return _540.test(node.className);
};
PillParser.prototype.isPill=function(node){
var _542=new RegExp("\\bpill_row\\b|\\bpill_col\\b");
return _542.test(node.className);
};
PillParser.prototype.isCol=function(node){
var _544=new RegExp("\\bcol\\b");
return _544.test(node.className);
};
PillParser.prototype.isRow=function(node){
var _546=new RegExp("\\brow\\b");
return _546.test(node.className);
};
PillParser.prototype.parse=function(){
var _547=new Array();
var _548=new Array();
for(var i=0;i<this.dom_node.childNodes.length;i++){
var node=this.dom_node.childNodes[i];
if(this.isPlaceholder(node)){
for(var j=0;j<node.childNodes.length;j++){
_548.push(node.childNodes[j]);
}
}else{
_548.push(node);
}
}
for(var i=0;i<_548.length;i++){
var node=_548[i];
var _54c=false;
if(this.isPill(node)){
_54c=new PillModel(node);
}else{
if(this.isCol(node)){
_54c=new ColModel(node);
}else{
if(this.isRow(node)){
_54c=new RowModel(node);
}
}
}
if(_54c){
_54c.parse();
_547.push(_54c);
}
}
return _547;
};
PillModel=function(_54d){
this.dom_node=_54d;
this.Pill=1;
};
PillModel.prototype.parse=function(){
};
PillModel.prototype.getHeight=function(){
return this.dom_node.offsetHeight;
};
PillModel.prototype.getExtra=function(_54e){
var _54f=[["border-bottom-width","borderBottomWidth"],["border-top-width","borderTopWidth"],["padding-top","paddingTop"],["padding-bottom","paddingBottom"],["margin-top","marginTop"],["margin-bottom","marginBottom"]];
var _550=0;
for(var i=0;i<_54f.length;i++){
var prop=_54f[i];
var _553=null;
if(_54e.currentStyle){
_553=_54e.currentStyle[prop[1]];
}else{
if(window.getComputedStyle){
_553=document.defaultView.getComputedStyle(_54e,null).getPropertyValue(prop[0]);
}
}
var _554=parseInt(_553,10);
if(!isNaN(_554)){
_550+=_554;
}
}
return _550;
};
PillModel.prototype.reveal=function(){
};
PillModel.prototype.setHeight=function(_555){
if(!_555){
this.reveal();
return;
}
var _556=_555-this.getHeight();
var _557=_555-this.getExtra(this.dom_node);
this.dom_node.style.height=_557+"px";
var _558=new RegExp("\\bexpandable\\b");
var _559=this.dom_node.getElementsByTagName("div");
for(var i=0;i<_559.length;i++){
var _55b=_559[i];
if(_558.test(_55b.className)){
var _55c=this.getExtra(_55b);
_55c=isNaN(_55c)?0:_55c;
var _55d=_55b.offsetHeight;
var _55e=_55d+_556-_55c;
_55b.style.height=_55e+"px";
}
}
this.reveal();
};
PillModel.prototype.isFixedHeight=function(){
var _55f=new RegExp("\\bfixed_height\\b");
return _55f.test(this.dom_node.className);
};
PillModel.prototype.debug=function(){
return "<div style=\"border:2px solid red;padding:4px\">Pill: "+this.getHeight()+"</div>";
};
ColModel=function(_560){
this.dom_node=_560;
this.Col=1;
};
ColModel.prototype.parse=function(){
this.children=new PillParser(this.dom_node);
};
ColModel.prototype.getHeight=function(){
if(this.calcedHeight){
return this.calcedHeight;
}
var _561=0;
for(var i=0;i<this.children.length;i++){
_561+=this.children[i].getHeight();
}
this.calcedHeight=_561;
return _561;
};
ColModel.prototype.setHeight=function(_563){
var _564=this.getHeight();
var _565=_563-_564;
var _566=0;
var _567=this.children.length;
for(var i=0;i<_567;i++){
var _569=this.children[i];
if(_569.isFixedHeight&&!_569.isFixedHeight()){
_566++;
}
}
var _56a=0;
var _56b=0;
for(var i=0;i<_567;i++){
var _56c=Math.floor(_565/_566);
if(_56b>=(_566-1)){
_56c=_565-_56a;
}
var _569=this.children[i];
if(_569.isFixedHeight&&_569.isFixedHeight()){
_569.setHeight();
continue;
}
if(_563){
_569.setHeight(_569.getHeight()+_56c);
_56a+=_56c;
_56b++;
}else{
_569.setHeight();
}
}
};
ColModel.prototype.debug=function(){
var str="<div style=\"border:2px solid green;padding:4px\">Col: "+this.getHeight();
for(var i=0;i<this.children.length;i++){
str+=this.children[i].debug();
}
str+="</div>";
return str;
};
ColModel.prototype.isFixedHeight=function(){
for(var i=0;i<this.children.length;i++){
if(!this.children[i].isFixedHeight()){
return false;
}
}
return true;
};
RowModel=function(_570){
this.dom_node=_570;
this.Row=1;
};
RowModel.prototype.parse=function(){
this.children=new PillParser(this.dom_node);
};
RowModel.prototype.setHeight=function(_571){
var _572=_571;
if(!_571){
_572=this.getHeight();
}
for(var i=0;i<this.children.length;i++){
var _574=this.children[i];
var _575=null;
if(this.isJustified()&&_574.getHeight()<_572||_571){
_575=_572;
}
_574.setHeight(_575);
}
};
RowModel.prototype.getHeight=function(){
if(this.calcedHeight){
return this.calcedHeight;
}
var _576=0;
for(var i=0;i<this.children.length;i++){
var _578=this.children[i].getHeight();
if(_578>_576){
_576=_578;
}
}
this.calcedHeight=_576;
return _576;
};
RowModel.prototype.isJustified=function(){
var _579=new RegExp("\\justified\\b");
return _579.test(this.dom_node.className);
};
RowModel.prototype.debug=function(){
var str="<div style=\"border:2px solid blue;padding:4px\">Row: "+this.getHeight();
for(var i=0;i<this.children.length;i++){
str+=this.children[i].debug();
}
str+="</div>";
return str;
};
RowModel.prototype.isFixedHeight=function(){
for(var i=0;i<this.children.length;i++){
if(this.children[i].isFixedHeight()){
return true;
}
}
return false;
};
_MetaRegister=new Array();
function RegisterMeta(name,_57e){
var tmp=new Object();
tmp.meta_name=name;
tmp.meta_value=_57e;
_MetaRegister.push(tmp);
};
function widgetFeedbackSubmit(_580){
var _581=document.getElementById("feedback_"+_580).value;
if(!_581||_581==""){
alert("Please enter your feedback before you click send");
return false;
}
return true;
};
function widgetFeedbackForm(id){
this.id=id;
this.component=document.getElementById(this.id);
};
widgetFeedbackForm.prototype.addExtraField=function(name){
if(this.component){
var _584=document.createElement("input");
if(_584){
_584.setAttribute("type","hidden");
_584.setAttribute("value","1");
_584.setAttribute("name",name);
this.component.appendChild(_584);
}
}
return;
};

