function Base(aa){this.opt=aa;this.aLoadEvents=[];this.aResizeEvents=[];this.iDPILevel=null;this.init();}
Base.prototype.init=function(){this.ua={sUserAgent:navigator.userAgent.toLowerCase()};this.ua.bIsOpera=this.ua.sUserAgent.indexOf('opera')>-1;this.ua.bIsSafari=this.ua.sUserAgent.indexOf('safari')>-1;this.ua.bIsGecko=!this.ua.bIsOpera&&!this.ua.bIsSafari&&this.ua.sUserAgent.indexOf('gecko')>-1;this.ua.bIsIE=!this.ua.bIsOpera&&this.ua.sUserAgent.indexOf('msie')>-1;this.ua.bIsIE6=this.ua.bIsIE&&(this.ua.sUserAgent.indexOf('msie 5')>-1||this.ua.sUserAgent.indexOf('msie 6')>-1);this.ua.bIsIE7=this.ua.bIsIE&&this.ua.sUserAgent.indexOf('msie 7')>-1;if(!window.XMLHttpRequest&&window.ActiveXObject)window.XMLHttpRequest=function(){return new ActiveXObject(oBase.ua.sUserAgent.indexOf('MSIE 5')>-1?'Microsoft.XMLHTTP':'MSXML2.XMLHTTP');};EventClass.addEventHandler(window,'load',function(){window.oBase.handleWindowLoad();});EventClass.addEventHandler(window,'resize',function(){window.oBase.handleWindowResize();});};Base.prototype.getPos=function(ba){if(ba.parentNode==null||ba.offsetParent==null||oBase.getStyle(ba,'display')=='none')return false;var ca=null;var da={x:0,y:0};var ea;if(ba.getBoundingClientRect){ea=ba.getBoundingClientRect();var fa=document;if(!oBase.isAncestor(document.documentElement,ba)&&parent.document!=document){fa=parent.document;if(!oBase.isAncestor(fa.documentElement,ba))return false;}
var ga=Math.max(fa.documentElement.scrollTop,fa.body.scrollTop);var ha=Math.max(fa.documentElement.scrollLeft,fa.body.scrollLeft);da.x=Math.ceil(ea.left)+ha;da.y=Math.ceil(ea.top)+ga;return da;}
else{da.x=ba.offsetLeft;da.y=ba.offsetTop;ca=ba.offsetParent;if(ca!=ba){while(ca){da.x+=ca.offsetLeft;da.y+=ca.offsetTop;ca=ca.offsetParent;}}
if(oBase.ua.bIsSafari&&oBase.getStyle(ba,'position')=='absolute'){da.x-=document.body.offsetLeft;da.y-=document.body.offsetTop;}}
if(ba.parentNode)ca=ba.parentNode;else ca=null;while(ca&&ca.tagName.toUpperCase()!='BODY'&&ca.tagName.toUpperCase()!='HTML'){if(oBase.getStyle(ca,'display')!='inline'){da.x-=ca.scrollLeft;da.y-=ca.scrollTop;}
if(ca.parentNode)ca=ca.parentNode;else ca=null;}
return da;};Base.prototype.setPos=function(ia,ja){var ka=oBase.getStyle(ia,'position');if(ka=='static'){this.setStyle(ia,'position','relative');ka='relative';}
var la=oBase.getPos(ia);if(la==false)return false;var ma={x:parseInt(oBase.getStyle(ia,'left'),10),y:parseInt(oBase.getStyle(ia,'top'),10)};if(isNaN(ma.x))ma.x=(ka=='relative')?0:ia.offsetLeft;if(isNaN(ma.y))ma.y=(ka=='relative')?0:ia.offsetTop;if(ja.x!==null)ia.style.left=(ja.x-la.x+ma.x)+'px';if(ja.y!==null)ia.style.top=(ja.y-la.y+ma.y)+'px';return true;};Base.prototype.getStyle=function(na,oa){if(document.defaultView&&document.defaultView.getComputedStyle){var pa=null;var qa=document.defaultView.getComputedStyle(na,'');if(qa)pa=qa[oa];return na.style[oa]||pa;}
else if(document.documentElement.currentStyle&&oBase.ua.bIsIE){if(oa=='opacity'){var ra=100;try{ra=na.filters['DXImageTransform.Microsoft.Alpha'].opacity;}
catch(e){try{ra=na.filters('alpha').opacity;}
catch(e){}}
return ra/100;}
else{var sa=na.currentStyle?na.currentStyle[oa]:null;return na.style[oa]||sa;}}
else return na.style[oa];};Base.prototype.setStyle=function(ta,va,wa){if(oBase.ua.bIsIE){if(va=='opacity'){if('filter' in ta.style){ta.style.filter='alpha(opacity='+wa*100+')';if(!ta.currentStyle||!ta.currentStyle.hasLayout)ta.style.zoom=1;}}
else ta.style[va]=wa;}
else ta.style[va]=wa;};Base.prototype.isAncestor=function(xa,ya){if(xa.contains&&!oBase.ua.bIsSafari)return xa.contains(ya);else if(xa.compareDocumentPosition)return!!(xa.compareDocumentPosition(ya)&16);else{var za=ya.parentNode;while(za){if(za==xa)return true;else if(!za.tagName||za.tagName.toUpperCase()=='HTML')return false;za=za.parentNode;}
return false;}};Base.prototype.handleWindowLoad=function(){for(var i=0,n=this.aLoadEvents.length;i<n;i++)eval(this.aLoadEvents[i].sMethod+'(this.aLoadEvents[i].oParams)');};Base.prototype.addLoadEvent=function(Aa,Ba){this.aLoadEvents[this.aLoadEvents.length]={sMethod:Aa,oParams:typeof(Ba)=='undefined'?null:Ba};};Base.prototype.handleWindowResize=function(){for(var i=0,n=this.aResizeEvents.length;i<n;i++)eval(this.aResizeEvents[i].sMethod+'(this.aResizeEvents[i].oParams)');};Base.prototype.addResizeEvent=function(Ca,Da){this.aResizeEvents[this.aResizeEvents.length]={sMethod:Ca,oParams:typeof(Da)=='undefined'?null:Da};if(this.aResizeEvents.length==1&&this.ua.bIsIE&&!this.ua.bIsIE6){this.iDPILevel=window.screen.deviceYDPI;setInterval('oBase.checkZoom();',500);}};Base.prototype.checkZoom=function(){if(window.screen.deviceYDPI!=this.iDPILevel)this.handleWindowResize();this.iDPILevel=window.screen.deviceYDPI;};Base.prototype.getXMLDocument=function(Ea,Fa){if(!window.XMLHttpRequest)return null;var Ga=new XMLHttpRequest();var Ha=typeof(Fa)!='undefined';var Ia=this;if(Ha){Ga.onreadystatechange=function(){if(Ga.readyState!=4)return;if(Fa.call){Fa.call(Ia,Ga.responseXML!=null&&Ga.status==200?Ga.responseXML:false);}
else{Ia.tmpMethod=Fa;Ia.tmpMethod(Ga.responseXML!=null&&Ga.status==200?Ga.responseXML:false);delete Ia.tmpMethod;}};}
Ga.open('GET',Ea+'&rand='+parseInt(Math.random()*99999999),Ha);Ga.send(null);return Ga;};Base.prototype.sendXMLDocument=function(Ja,Ka,La,Ma){if(!window.XMLHttpRequest)return false;var Na=new window.XMLHttpRequest();if(typeof(La)!='undefined'&&La!=null){Na.onreadystatechange=function(){if(Na.readyState!=4)return;if(Na.responseXML!=null&&Na.status==200)La(Na.responseXML);else La(false);};}
Na.open('POST',Ja,typeof(Ma)=='undefined'?true:Ma);if('setRequestHeader' in Na)Na.setRequestHeader('Content-Type','application/x-www-form-urlencoded');Na.send(Ka);return true;};Base.prototype.setInnerHTML=function(Oa,Pa){if(typeof(Oa.innerHTML)!='undefined')Oa.innerHTML=Pa;else{var Qa=document.createRange();Qa.selectNodeContents(Oa);Qa.deleteContents();element.appendChild(Qa.createContextualFragment(Pa));}};String.prototype.htmlspecialchars=function(){return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;');};Number.prototype.intDiv=function(Ra){if(this>=0)return Math.floor(this/Ra);else return Math.ceil(this/Ra);}
var EventClass=new function(){};EventClass.addEventHandler=function(Sa,Ta,Ua){if(Sa.addEventListener)Sa.addEventListener(Ta,Ua,false);else if(Sa.attachEvent)Sa.attachEvent('on'+Ta,Ua);else Sa['on'+Ta]=Ua;};EventClass.removeEventHandler=function(Va,Wa,Xa){if(Va.removeEventListener)Va.removeEventListener(Wa,Xa,false);else if(Va.detachEvent)Va.detachEvent('on'+Wa,Xa);else Va['on'+Wa]=null;};function Menu(Ya){this.opt=Ya;this.oArrow=null;this.oSelectedItem=null;this.oCurHoverItem=null;this.oRealtimeHoverItem=null;this.iTimeoutHandle=null;this.init();}
Menu.prototype.init=function(){oBase.addLoadEvent(this.opt.sSelf+'.handleDocumentLoad');};Menu.prototype.handleDocumentLoad=function(){this.oArrow=document.createElement('img');this.oArrow.src=oBase.ua.bIsIE6?this.opt.sMenuPointer8bitSrc:this.opt.sMenuPointerSrc;this.oArrow.style.position='absolute';this.oArrow.style.zIndex=100;document.body.appendChild(this.oArrow);var Za=document.getElementById(this.opt.sId);Za.style.zIndex=0;var $a=Za.getElementsByTagName('div');for(var i=0,n=$a.length;i<n;i++){if('className' in $a[i]&&this.opt.reMenuItemClass.test($a[i].className)){$a[i].myPos=oBase.getPos($a[i]);if(this.opt.reMenuItemSelectedClass.test($a[i].className)){this.oSelectedItem=$a[i];this.hover(this.oSelectedItem);}
else{$a[i].instanceRef=this;$a[i].onmouseover=function(){this.instanceRef.handleMouseOver(this);};$a[i].onmouseout=function(){this.instanceRef.handleMouseOut(this);};$a[i].onclick=function(){this.instanceRef.handleClick(this);};if(oBase.ua.bIsIE){var ab=$a[i].getElementsByTagName('a')[0];ab.instanceRef=this;ab.onmouseover=function(){this.instanceRef.handleMouseOver(this.parentNode);};ab.onmouseout=function(){this.instanceRef.handleMouseOut(this.parentNode);};}}}}
oBase.addResizeEvent(this.opt.sSelf+'.handleWindowResize');};Menu.prototype.overlayItems=function(){window.menuInstanceRef=this;if(oBase.ua.bIsIE)return;var bb=document.getElementById(this.opt.sId);var cb=document.getElementById(this.opt.sContainerId);cb.style.position='absolute';cb.style.width=cb.clientWidth.toString()+'px';cb.style.zIndex=3;cb.style.backgroundColor='transparent';if(cb in bb){bb.removeChild(cb);document.body.appendChild(cb);}
this.handleWindowResize();this.handleWindowResize();if(oBase.ua.bIsGecko){window.addEventListener('pageshow',function(){window.menuInstanceRef.handlePageShow();},false);}};Menu.prototype.handleWindowResize=function(){if(!oBase.ua.bIsIE){var db=document.getElementById(this.opt.sId);var eb=document.getElementById(this.opt.sContainerId);var fb=oBase.getPos(db);eb.style.left=fb.x.toString()+'px';eb.style.top=fb.y.toString()+'px';}
this.oCurHoverItem=null;if(this.oRealtimeHoverItem!=null||this.oSelectedItem!=null)this.hover(this.oRealtimeHoverItem==null?this.oSelectedItem:this.oRealtimeHoverItem);};Menu.prototype.handlePageShow=function(){document.getElementById(this.opt.sContainerId).style.zIndex=1;this.overlayItems();};Menu.prototype.handleMouseOver=function(gb){this.oRealtimeHoverItem=gb;if(this.iTimeoutHandle!=null){clearTimeout(this.iTimeoutHandle);this.iTimeoutHandle=null;}
this.hover(gb);};Menu.prototype.handleMouseOut=function(hb){this.oRealtimeHoverItem=null;this.iTimeoutHandle=setTimeout(this.opt.sSelf+'.handleMouseOutDelayed();',20);};Menu.prototype.handleMouseOutDelayed=function(){this.hover(this.oRealtimeHoverItem==null?this.oSelectedItem:this.oRealtimeHoverItem);this.iTimeoutHandle=null;};Menu.prototype.hover=function(ib){if(this.oCurHoverItem!=null&&ib.id==this.oCurHoverItem.id)return;if(this.oCurHoverItem!=null)this.oCurHoverItem.className=this.oCurHoverItem.className.replace(/mouseover/,'mouseout');ib.className=ib.className.replace(/mouseout/,'mouseover');var jb=oBase.getPos(ib);oBase.setPos(this.oArrow,{x:jb.x+(ib.clientWidth-this.oArrow.clientWidth).intDiv(2),y:jb.y+ib.clientHeight});this.oCurHoverItem=ib;};Menu.prototype.handleClick=function(kb){kb.getElementsByTagName('a')[0].style.outline='none';};function MenuDropDown(lb){this.oParams=lb;this.oSelectedItem=null;this.oCurHoverItem=null;this.iTimeoutHandle=null;this.init();}
MenuDropDown.prototype.init=function(){for(className in this.oParams['oMenuItems']){var mb=document.getElementById(className);mb.instanceRef=this;mb.params=this.oParams['oMenuItems'][className];var nb=oBase.getPos(mb);mb.originalClassName=mb.className;mb.originalPos=nb;var ob=document.getElementById(mb.params.sContainerId);mb.oDropDownContainer=ob;ob.oDropDownContainer=document.getElementById(mb.params.sDropDownContent);ob.oDropDownTrigger=mb;ob.instanceRef=this;mb.isExpanded=false;ob.onmouseover=function(){this.instanceRef.handleMouseOverMenuDropDownLink(this);};ob.onmouseout=function(){this.instanceRef.handleMouseOutDropDownContainer(this);};for(var i=0;i<ob.childNodes.length;i++){ob.childNodes[i].oContainerDiv=ob;ob.childNodes[i].instanceRef=this;ob.childNodes[i].onmouseover=function(){this.instanceRef.handleMouseOverContainerChildElement(this);};}
return false;}}
MenuDropDown.prototype.handleMouseOverMenuDropDownLink=function(pb){var qb=pb.oDropDownTrigger;var rb=document.getElementById(qb.params.sDropDownContent);if(typeof(qb.isExpanded)!=''&&qb.isExpanded==true)return false;oBase.setStyle(pb,'position','absolute');oBase.setStyle(pb,'top',qb.originalPos.y+'px');oBase.setStyle(pb,'left',qb.originalPos.x+'px');qb.className=qb.params.sActiveTriggerClass;oBase.setStyle(rb,'display','block');qb.isExpanded=true;if('oAnimationParams' in pb.oDropDownTrigger.params){var sb=pb.oDropDownTrigger.params.oAnimationParams;var tb=parseInt(oBase.getStyle(rb,'height'));var ub=Math.round(tb/sb.iNumSteps);oBase.setStyle(rb,'height','0px');for(var i=0;i<sb.iNumSteps;i++){var vb=parseInt(oBase.getStyle(rb,'height'));if(vb>=tb)break;if(i==sb.iNumSteps)var wb=(tb-vb);else var wb=(ub*i)>tb?tb:(ub*i);setTimeout(this.oParams.sSelf+'.modifyElementStyle(\''+rb.id+'\', \'height\', \''+wb+'px\');',sb.iSpeed);}}}
MenuDropDown.prototype.modifyElementStyle=function(xb,yb,zb){oBase.setStyle(document.getElementById(xb),yb,zb);}
MenuDropDown.prototype.handleMouseOverContainerChildElement=function(Ab){var Bb=Ab.oContainerDiv;if('iTimeOutTimer' in Bb.oDropDownTrigger)clearTimeout(Bb.oDropDownTrigger.iTimeOutTimer);}
MenuDropDown.prototype.handleMouseOutDropDownContainer=function(Cb){Cb.oDropDownTrigger.iTimeOutTimer=setTimeout(this.oParams.sSelf+'.clearDropDown(\''+Cb.oDropDownTrigger.id+'\');',Cb.oDropDownTrigger.params.iNumTimeOut);}
MenuDropDown.prototype.clearDropDown=function(Db){var Eb=this.oParams['oMenuItems'][Db];var Fb=document.getElementById(Eb.sContainerId);Fb.oDropDownTrigger.className=Fb.oDropDownTrigger.originalClassName;if(Fb.oDropDownTrigger.bRestoreStyle){oBase.setStyle(Fb,'position','absolute');}
oBase.setStyle(Fb.oDropDownContainer,'display','none');Fb.oDropDownTrigger.isExpanded=false;clearTimeout(Fb.oDropDownTrigger.iTimeOutTimer);}
function FormFields(Gb){this.opt=Gb;this.aOnTopControls=[];this.init();}
FormFields.prototype.init=function(){for(var Hb in this.opt.oForms){var Ib=document.getElementById(Hb);for(var Jb in this.opt.oForms[Hb].oControls){var Kb=document.getElementById(Jb);Kb.instanceRef=this;var Lb=false;if('sAlternativeColor' in this.opt.oForms[Hb].oControls[Jb]){Kb.style.color=this.opt.oForms[Hb].oControls[Jb].sAlternativeColor;Kb.value=this.opt.oForms[Hb].oControls[Jb].sAlternativeText;Kb.onfocus=Kb.onclick=Kb.keydown=function(){this.instanceRef.handleFocus(this);}
Kb.onblur=function(){this.instanceRef.handleBlur(this);}}
if('bOnTop' in this.opt.oForms[Hb].oControls[Jb]&&this.opt.oForms[Hb].oControls[Jb].bOnTop)this.aOnTopControls[this.aOnTopControls.length]=Kb;if(Kb.type=='submit'){var Mb=document.createElement('div');Mb.className='submit-button';if('iWidth' in this.opt.oForms[Hb].oControls[Jb])Mb.style.width=this.opt.oForms[Hb].oControls[Jb].iWidth.toString()+'px';var Nb=[{sClassName:'button-large red-button',sElement:'a',sContents:Kb.value}];for(var i=0,n=Nb.length;i<n;i++){var Ob=document.createElement(Nb[i].sElement);if('iWidth' in this.opt.oForms[Hb].oControls[Jb])Ob.style.width=(this.opt.oForms[Hb].oControls[Jb].iWidth-9).toString()+'px';if(Nb[i].sElement=='a'){Ob.href='#';if('sContents' in Nb[i]){if('sTitle' in this.opt.oForms[Hb].oControls[Jb])Ob.setAttribute('title',this.opt.oForms[Hb].oControls[Jb].sTitle);oBase.setInnerHTML(Ob,'<span>'+Nb[i].sContents+'</span>');}}
else if('sContents' in Nb[i])oBase.setInnerHTML(Ob,Nb[i].sContents);if('sClassName' in Nb[i])Ob.className=Nb[i].sClassName;Mb.appendChild(Ob);}
Mb.instanceRef=this;Mb.oForm=Ib;Mb.onclick=function(){this.instanceRef.handleSubmitClick(this.oForm);};Kb.parentNode.insertBefore(Mb,Kb);Kb.style.display='none';}
if('sIsRequired' in this.opt.oForms[Hb].oControls[Jb])Lb=true;}
if(Lb){Ib.instanceRef=this;if('onsubmit' in Ib)this.opt.fnOriginalOnSubmit=Ib.onsubmit;Ib.onsubmit=function(){return this.instanceRef.handleSubmit(this)&&(!('onsubmit2' in Ib)||Ib.onsubmit2());}}}
if(this.aOnTopControls.length>0&&!oBase.ua.isIE)oBase.addLoadEvent(this.opt.sSelf+'.handleWindowLoad');};FormFields.prototype.handleSubmitClick=function(Pb){if('onsubmit' in Pb&&typeof(Pb.onsubmit)=='function'&&Pb.onsubmit!=null){var Qb=Pb.onsubmit();if(typeof(Qb)=='boolean'&&Qb==false)return;}
Pb.submit();};FormFields.prototype.handleWindowLoad=function(Rb){for(var i=0,n=this.aOnTopControls.length;i<n;i++){this.aOnTopControls[i].style.position='relative';this.aOnTopControls[i].style.zIndex=3;}};FormFields.prototype.handleFocus=function(Sb){var Tb=this.opt.oForms[Sb.form.id].oControls[Sb.id];Sb.style.color=Tb.sRegularColor;if('sAlternativeText' in Tb&&Sb.value==Tb.sAlternativeText)Sb.value='';};FormFields.prototype.handleBlur=function(Ub){var Vb=this.opt.oForms[Ub.form.id].oControls[Ub.id];if('sAlternativeText' in Vb&&Ub.value==''){Ub.style.color=Vb.sAlternativeColor;Ub.value=Vb.sAlternativeText;}};FormFields.prototype.handleSubmit=function(Wb){for(var Xb in this.opt.oForms[Wb.id].oControls){var Yb=this.opt.oForms[Wb.id].oControls[Xb];var Zb=document.getElementById(Xb);if('sAlternativeText' in Yb&&Zb.value==Yb.sAlternativeText)Zb.value='';if('sIsRequired' in Yb&&Zb.value.replace(/^\s+|\s+$/g,'')==''){alert(Yb.sIsRequired);return false;}}
return 'fnOriginalOnSubmit' in this.opt?this.opt.fnOriginalOnSubmit:true;};function IncentiveLabel($b){this.opt=$b;this.oFlash=null;this.init();}
IncentiveLabel.prototype.init=function(){document.getElementById(this.opt.sCodeBoxId).style.visibility='hidden';document.getElementById(this.opt.sStringContainerId).style.background=this.opt.sStringContainerBackground;var ac=document.getElementById(this.opt.sRelativeToDivId);var bc=oBase.getPos(ac);var cc=bc.x+this.opt.iLeft;this.oCookie=new smc_Cookie({});var dc=this.oCookie.get('incentiveShown');if(dc==null)this.oCookie.set('incentiveShown','1');else{if(!('oFlashVars' in this.opt.oFlashOptions))this.opt.oFlashOptions.oFlashVars={};this.opt.oFlashOptions.oFlashVars.hasPlayed='1';}
if(!oBase.ua.bIsIE){if(!('oFlashVars' in this.opt.oFlashOptions))this.opt.oFlashOptions.oFlashVars={};this.opt.oFlashOptions.oFlashVars.triggerOnLoad='1';}
document.write('<div style="position: absolute; z-index: 1; top: 0px; left: '+cc.toString()+'px;" id="incentive-flash-div">');this.oFlash=new Flash(this.opt.oFlashOptions);document.write('</div>');this.oFlash.oFlashObject.style.outline='none';oBase.addResizeEvent(this.opt.sSelf+'.handleWindowResize');};IncentiveLabel.prototype.handleWindowResize=function(){var ec=document.getElementById(this.opt.sRelativeToDivId);var fc=oBase.getPos(ec);var gc=document.getElementById('incentive-flash-div');var hc=fc.x+this.opt.iLeft;gc.style.left=hc.toString()+'px';};function Flash(ic){this.opt=ic;this.oFlashObject=null;this.init();};Flash.prototype.init=function(){if('oFlashVars' in this.opt){var jc=[];for(var kc in this.opt.oFlashVars)jc[jc.length]=escape(kc)+'='+escape(this.opt.oFlashVars[kc]);this.opt.sFlashVars=jc.join('&');}
document.write(this.getHTML());this.oFlashObject=document.getElementById(this.opt.sId);if('bHandleResize' in this.opt&&this.opt.bHandleResize)oBase.addResizeEvent(this.opt.sSelf+'.handleWindowResize');this.oFlashObject.style.outlineWidth='0';};Flash.prototype.getHTML=function(){var lc='';lc+='<object type="application/x-shockwave-flash" data="'+this.opt.sFile.htmlspecialchars()+'" width="'+this.opt.sWidth+'" height="'+this.opt.sHeight+'" id="'+this.opt.sId.htmlspecialchars()+'">';lc+='<param name="movie" value="'+this.opt.sFile+'" />';if('sFlashVars' in this.opt)lc+='<param name="flashvars" value="'+this.opt.sFlashVars.htmlspecialchars()+'" />';if('oParams' in this.opt)for(var mc in this.opt.oParams)lc+='<param name="'+mc.htmlspecialchars()+'" value="'+this.opt.oParams[mc].htmlspecialchars()+'" />';if(!('oParams' in this.opt)||!('wmode' in this.opt.oParams))lc+='<param name="wmode" value="transparent" />';if(!('oParams' in this.opt)||!('scale' in this.opt.oParams))lc+='<param name="scale" value="noscale" />';if(!('oParams' in this.opt)||!('loop' in this.opt.oParams))lc+='<param name="loop" value="false" />';lc+='<param name="quality" value="high" />';lc+='<param name="menu" value="false" />';lc+='<param name="allowScriptAccess" value="sameDomain" />';if('sAltImage' in this.opt)lc+='<img src="'+this.opt.sAltImage.htmlspecialchars()+'" alt="" />';lc+='</object>';return lc;};Flash.prototype.handleWindowResize=function(){oBase.setInnerHTML(this.oFlashObject.parentNode,this.getHTML());this.oFlashObject=document.getElementById(this.opt.sId);};function Overlay(nc){this.oOverlay=null;this.opt=nc;this.fnResizeEvent=null;this.init();}
Overlay.prototype.init=function(){this.oOverlay=document.createElement('div');this.oOverlay.style.display='none';this.oOverlay.style.backgroundColor='black';this.oOverlay.style.left='0px';this.oOverlay.style.top='0px';if(oBase.ua.bIsIE6){this.oOverlay.style.position='absolute';this.oOverlay.style.width=document.body.scrollWidth+'px';this.oOverlay.style.height=document.body.scrollHeight+'px';}
else{this.oOverlay.style.position='fixed';this.oOverlay.style.width='100%';this.oOverlay.style.height='100%';}
this.oOverlay.style.zIndex=200;document.body.appendChild(this.oOverlay);};Overlay.prototype.show=function(oc){oBase.setStyle(this.oOverlay,'opacity',oc);this.oOverlay.style.display='inline';if(oBase.ua.bIsIE6)oBase.addResizeEvent(this.opt.sSelf+'.handleWindowResize');};Overlay.prototype.handleWindowResize=function(){this.oOverlay.style.position='absolute';this.oOverlay.style.width=document.body.scrollWidth+'px';this.oOverlay.style.height=document.body.scrollHeight+'px';};Overlay.prototype.moveTo=function(pc,qc,rc){var sc=oBase.getStyle(this.oOverlay,'opacity');if(Math.abs(sc-pc)>=qc){oBase.setStyle(this.oOverlay,'opacity',sc>pc?parseFloat(sc)-parseFloat(qc):parseFloat(sc)+parseFloat(qc));setTimeout(this.opt.sSelf+'.moveTo('+pc+', '+qc+', '+rc+');',rc);}};Overlay.prototype.hide=function(){this.oOverlay.style.display='none';};Overlay.prototype.destroy=function(){if(oBase.ua.bIsIE6)EventClass.removeEventHandler(window,'resize',this.fnResizeEvent);this.oOverlay.parentNode.removeChild(this.oOverlay);};function Dialog(tc){this.opt=tc;this.oOverlay=null;this.oDialogDiv=null;this.oHeaderDiv=null;this.oBodyDiv=null;this.iRelMouseTop=0;this.iRelMouseLeft=0;this.oKeyEventObject=null;this.init();}
Dialog.prototype.init=function(){this.oKeyEventObject=oBase.ua.bIsIE||oBase.ua.bIsOpera?document.body:window;this.oKeyEventObject.dialogRef=this;};Dialog.prototype.show=function(){document.body.shownDialog=this;if(oBase.ua.bIsIE6){var uc=document.getElementsByTagName('select');for(i=0,n=uc.length;i<n;i++)uc[i].style.visibility='hidden';}
this.oOverlay=new Overlay({sSelf:this.opt.sSelf+'.oOverlay'});this.oOverlay.show(0.75);this.oDialogDiv=document.createElement('div');this.oDialogDiv.className='dialog';this.oDialogDiv.ondrag=function(){return false;};if('sId' in this.opt)this.oDialogDiv.id=this.opt.sId;this.oDialogDiv.instanceRef=this;oBase.setInnerHTML(this.oDialogDiv,'<div class="dialog-header" id="dialog-header"><div class="button"><div class="close" onclick="'+this.opt.sSelf+'.close();" onmouseover="this.className=\'close-hover\';" onmouseout="this.className=\'close\';"></div></div>'+this.opt.sTitle.htmlspecialchars()+'</div><div class="dialog-content" id="dialog-content">'+this.opt.sContent+'</div><div class="dialog-buttons" id="dialog-buttons">'+this.opt.sButtons+'</div><div class="dialog-footer"></div>');document.body.appendChild(this.oDialogDiv);this.oDialogDiv.style.zIndex=201;this.setPosition();this.oHeaderDiv=document.getElementById('dialog-header');this.oBodyDiv=document.getElementById('dialog-content');this.oBodyDiv.ondrag=function(){return false;};this.oHeaderDiv.style.cursor=this.oBodyDiv.style.cursor='move';this.oHeaderDiv.onmousedown=this.oBodyDiv.onmousedown=function(e){var vc='event' in window?window.event:e;var wc=this.parentNode.instanceRef;if('focus' in wc.oDialogDiv)wc.oDialogDiv.focus();document.onselectstart=new Function('return false');if(!('draggedDialog' in document.body)||document.body.draggedDialog==null){document.body.draggedDialog=wc;EventClass.addEventHandler(document.body,'mousemove',eval(wc.opt.sSelf+'.handleMouseMove'));EventClass.addEventHandler(document.body,'mouseup',eval(wc.opt.sSelf+'.handleMouseUp'));}
var xc=oBase.getPos(wc.oDialogDiv);wc.iRelMouseTop=vc.clientY-xc.y;wc.iRelMouseLeft=vc.clientX-xc.x;}
this.oKeyEventObject.onkeydown=function(e){var yc='event' in window?window.event:e;return this.dialogRef.handleKey(yc);}
EventClass.addEventHandler(document.body,'mousedown',eval(this.opt.sSelf+'.handleWindowClick'));var zc=document.getElementById('dialog-buttons').getElementsByTagName('input');if(zc.length>0)zc[0].focus();};Dialog.prototype.setPosition=function(){var Ac=0,iCurHeight=0,iOffsetX=0,iOffsetY=0;if('innerWidth' in window){Ac=window.innerWidth;iCurHeight=window.innerHeight;}
else if('documentElement' in document&&('clientWidth' in document.documentElement||'clientHeight' in document.documentElement)){Ac=document.documentElement.clientWidth;iCurHeight=document.documentElement.clientHeight;}
else if('body' in document&&('clientWidth' in document.body||'clientHeight' in document.body)){Ac=document.body.clientWidth;iCurHeight=document.body.clientHeight;}
if('pageXOffset' in window){iOffsetX=window.pageXOffset;iOffsetY=window.pageYOffset;}
else if('documentElement' in document&&'scrollLeft' in document.documentElement){iOffsetX=document.documentElement.scrollLeft;iOffsetY=document.documentElement.scrollTop;}
else if('body' in document&&'scrollLeft' in document.body){iOffsetX=document.body.scrollLeft;iOffsetY=document.body.scrollTop;}
oBase.setPos(this.oDialogDiv,{x:(Ac-this.oDialogDiv.clientWidth).intDiv(2),y:(iCurHeight-this.oDialogDiv.clientHeight+47).intDiv(2)+('bFixedPosition' in this.opt&&this.opt.bFixedPosition?0:iOffsetY)});};Dialog.prototype.handleMouseMove=function(e){var Bc='event' in window?window.event:e;var Cc=document.body.draggedDialog;Cc.oDialogDiv.style.left=(Bc.clientX-Cc.iRelMouseLeft)+'px';Cc.oDialogDiv.style.top=(Bc.clientY-Cc.iRelMouseTop)+'px';if('focus' in Cc.oDialogDiv)Cc.oDialogDiv.focus();};Dialog.prototype.handleMouseUp=function(e){var Dc='event' in window?window.event:e;if('draggedDialog' in document.body&&document.body.draggedDialog!=null){EventClass.removeEventHandler(document.body,'mousemove',eval(document.body.draggedDialog.opt.sSelf+'.handleMouseMove'));EventClass.removeEventHandler(document.body,'mouseup',eval(document.body.draggedDialog.opt.sSelf+'.handleMouseUp'));document.body.draggedDialog=null;Dc.cancelBubble=true;}
document.onselectstart=null;};Dialog.prototype.handleKey=function(Ec){var Fc=Ec.keyCode;if('fOnEnter' in this.opt&&Fc==13)eval(this.opt.fOnEnter+'();');if(Fc==27)this.destroy();};Dialog.prototype.handleWindowClick=function(Gc){if(!('draggedDialog' in document.body)||document.body.draggedDialog==null)document.body.shownDialog.destroy();};Dialog.prototype.hide=function(){this.oOverlay.hide();};Dialog.prototype.destroy=function(){if(oBase.ua.bIsIE6){var Hc=document.getElementsByTagName('select');for(i=0,n=Hc.length;i<n;i++)Hc[i].style.visibility='visible';}
this.oKeyEventObject.onkeydown=null;EventClass.removeEventHandler(document.body,'mousedown',eval(this.opt.sSelf+'.handleWindowClick'));document.body.removeChild(this.oDialogDiv);this.oOverlay.destroy();this.oOverlay=null;if('fOnDestroy' in this.opt)eval(this.opt.fOnDestroy+'();');document.body.shownDialog=null;};Dialog.prototype.close=function(){this.destroy();};function PopupGroup(Ic){this.opt=Ic;this.oOverlay=null;this.oPreviousContainerImage=null;this.oNextContainerImage=null;this.bInitialized=false;this.iCurLinkIndex=0;this.init();}
PopupGroup.prototype.init=function(){var Jc=new Image();Jc.src='/public/images/loader.gif';for(var i=0,n=this.opt.aLinks.length;i<n;i++){var Kc=document.getElementById(this.opt.aLinks[i]);if(Kc!=null){Kc.instanceRef=this;Kc.iLinkIndex=i;Kc.onclick=function(){return this.instanceRef.handleClick(this);};if('sPreviewContainerId' in this.opt){Kc.onmouseover=function(){this.instanceRef.handleMouseOver(this.iLinkIndex);};Kc.getElementsByTagName('img')[0].onmouseover=function(){this.parentNode.instanceRef.handleMouseOver(this.parentNode.iLinkIndex);};}}}
if('sPreviewContainerId' in this.opt){var Lc=document.getElementById(this.opt.sPreviewContainerId);Lc.instanceRef=this;Lc.style.cursor='pointer';Lc.onclick=function(){return this.instanceRef.handleClick(document.getElementById(this.instanceRef.opt.aLinks[this.instanceRef.iCurLinkIndex]));}
if(this.opt.aLinks.length==0)this.opt.aLinks[0]=this.opt.sPreviewContainerId;}};PopupGroup.prototype.handleMouseOver=function(Mc){var Nc=document.getElementById(this.opt.sPreviewContainerId);var Oc=document.getElementById(this.opt.aLinks[Mc]);this.iCurLinkIndex=Mc;Nc.getElementsByTagName('img')[0].src=Oc.getElementsByTagName('img')[0].src;};PopupGroup.prototype.handleClick=function(Pc){this.oDialog=new Dialog({sSelf:this.opt.sSelf+'.oDialog',sTitle:'',sId:'popup-dialog',sContent:'<img src="/public/images/loader.gif" alt="" width="50" height="50" />',sButtons:'',fOnEnter:null,fOnDestroy:this.opt.sSelf+'.handleCloseDialog',bFixedPosition:false});this.oDialog.show();this.oDialog.oDialogDiv.style.position='absolute';if('iLinkIndex' in Pc)this.iCurLinkIndex=Pc.iLinkIndex;this.oCurImage=new Image();this.oCurImage.instanceRef=this;this.oCurImage.onload=function(){this.instanceRef.handleImageLoaded(this);};this.oCurImage.src=Pc.getElementsByTagName('img')[0].src;this.oCurImage.onmousedown=function(){return false;};return false;};PopupGroup.prototype.handleCloseDialog=function(){this.bInitialized=false;this.handleMouseOver(this.iCurLinkIndex);};PopupGroup.prototype.handleImageLoaded=function(Qc){if(oBase.ua.bIsIE)this.oDialog.oDialogDiv.style.width=(Qc.width+20)+'px';if(this.bInitialized){this.oDialog.setPosition();this.refreshNavImages();}
else{oBase.setInnerHTML(this.oDialog.oBodyDiv,'');this.oDialog.oBodyDiv.appendChild(Qc);this.oDialog.setPosition();this.initNavImages();this.refreshNavImages();this.bInitialized=true;}};PopupGroup.prototype.initNavImages=function(){var Rc={oPreviousContainerImage:{sSource:'/public/images/template/backgrounds/shared/dialogue-previous-background.png',sAlt:'Previous',sOnClick:'previous',sHoverImage:'oPreviousContainerImage'},oNextContainerImage:{sSource:'/public/images/template/backgrounds/shared/dialogue-next-background.png',sAlt:'Next',sOnClick:'next',sHoverImage:'oNextContainerImage'},oPreviousImage:{sSource:'/public/images/template/buttons/dialogue-previous.png',sAlt:'Previous',sOnClick:'previous',sHoverImage:'oPreviousContainerImage'},oNextImage:{sSource:'/public/images/template/buttons/dialogue-next.png',sAlt:'Next',sOnClick:'next',sHoverImage:'oNextContainerImage'}};for(var Sc in Rc){this[Sc]=document.createElement('img');this[Sc].src=Rc[Sc].sSource;this[Sc].alt=Rc[Sc].sAlt;this[Sc].style.position='absolute';this[Sc].style.zIndex=260;this[Sc].style.backgroundColor='transparent';this[Sc].style.cursor='pointer';this[Sc].instanceRef=this;this[Sc].oHoverImage=this[Rc[Sc].sHoverImage];this[Sc].onmouseover=function(){return this.instanceRef.handleMouseOverButton(this.oHoverImage);}
this[Sc].onmouseout=function(){return this.instanceRef.handleMouseOutButton(this.oHoverImage);}
switch(Rc[Sc].sOnClick){case 'previous':this[Sc].onclick=function(){return this.instanceRef.handleClickPrevious();};break;case 'next':this[Sc].onclick=function(){return this.instanceRef.handleClickNext();};break;}
this.oDialog.oBodyDiv.appendChild(this[Sc]);}};PopupGroup.prototype.refreshNavImages=function(){var Tc={iContainerWidth:39,iContainerHeight:32,iImageWidth:20,iImageHeight:17,iPadding:10,iNavImagePadding:8};var Uc=oBase.ua.bIsIE6?this.oDialog.oBodyDiv.getElementsByTagName('img')[0].width+2*Tc.iPadding:this.oDialog.oBodyDiv.clientWidth;var Vc=oBase.ua.bIsIE6?this.oDialog.oBodyDiv.getElementsByTagName('img')[0].height+2*Tc.iPadding:this.oDialog.oBodyDiv.clientHeight;var Wc={oPreviousContainerImage:{sTop:(this.oDialog.oHeaderDiv.clientHeight+(Vc-Tc.iContainerHeight).intDiv(2)).toString()+'px',sLeft:(this.oDialog.oBodyDiv.offsetLeft+Tc.iPadding)+'px',fTransparency:.65,bShow:this.iCurLinkIndex!=0&&this.opt.aLinks.length>1},oNextContainerImage:{sTop:(this.oDialog.oHeaderDiv.clientHeight+(Vc-Tc.iContainerHeight).intDiv(2)).toString()+'px',sLeft:(this.oDialog.oBodyDiv.offsetLeft+Uc-Tc.iContainerWidth-Tc.iPadding)+'px',fTransparency:.65,bShow:this.iCurLinkIndex!=this.opt.aLinks.length-1&&this.opt.aLinks.length>1},oPreviousImage:{sTop:(this.oDialog.oHeaderDiv.clientHeight+(Tc.iImageHeight+Vc-32).intDiv(2)).toString()+'px',sLeft:(this.oDialog.oBodyDiv.offsetLeft+Tc.iPadding+Tc.iNavImagePadding)+'px',bShow:this.iCurLinkIndex!=0&&this.opt.aLinks.length>1},oNextImage:{sTop:(this.oDialog.oHeaderDiv.clientHeight+(Tc.iImageHeight+Vc-32).intDiv(2)).toString()+'px',sLeft:(this.oDialog.oBodyDiv.offsetLeft+Uc-Tc.iImageWidth-Tc.iPadding-Tc.iNavImagePadding)+'px',bShow:this.iCurLinkIndex!=this.opt.aLinks.length-1&&this.opt.aLinks.length>1}};for(var Xc in Wc){this[Xc].style.top=Wc[Xc].sTop;this[Xc].style.left=Wc[Xc].sLeft;this[Xc].style.visibility=Wc[Xc].bShow?'visible':'hidden';this[Xc].style.zIndex=10000;this[Xc].style.position='absolute';if('fTransparency' in Wc[Xc])oBase.setStyle(this[Xc],'opacity',Wc[Xc].fTransparency);}};PopupGroup.prototype.handleMouseOverButton=function(Yc){oBase.setStyle(Yc,'opacity',.75);return true;};PopupGroup.prototype.handleMouseOutButton=function(Zc){oBase.setStyle(Zc,'opacity',.65);return true;};PopupGroup.prototype.handleClickPrevious=function(){if(this.iCurLinkIndex!=0){this.iCurLinkIndex--;this.updateImage();}
return false;};PopupGroup.prototype.handleClickNext=function(){if(this.iCurLinkIndex!=this.opt.aLinks.length-1){this.iCurLinkIndex++;this.updateImage();}
return false;};PopupGroup.prototype.updateImage=function(){var $c=document.getElementById(this.opt.aLinks[this.iCurLinkIndex]);this.oCurImage.src=$c.getElementsByTagName('img')[0].src;if(oBase.ua.bIsIE){this.oCurImage.removeAttribute('width');this.oCurImage.removeAttribute('height');}};function BrowseHistory(ad){this.opt=ad;this.init();}
BrowseHistory.prototype.init=function(){if('hash' in location&&typeof(location.hash)=='string'&&location.hash.length>1){var bd=location.hash.substr(1);}};