var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);var niftyCss=false;String.prototype.find=function(what){return(this.indexOf(what)>=0?true:false);}
var oldonload=window.onload;if(typeof(NiftyLoad)!='function')NiftyLoad=function(){};if(typeof(oldonload)=='function')
window.onload=function(){oldonload();NiftyLoad()};else window.onload=function(){NiftyLoad()};function AddCss(){niftyCss=true;var l=CreateEl("link");l.setAttribute("type","text/css");l.setAttribute("rel","stylesheet");l.setAttribute("href","/stylesheets/niftyCorners.css");l.setAttribute("media","screen");document.getElementsByTagName("head")[0].appendChild(l);}
function Nifty(selector,options){if(niftyOk==false)return;var i,v=selector.split(","),h=0;if(options==null)options="";if(options.find("fixed-height"))
h=getElementsBySelector(v[0])[0].offsetHeight;for(i=0;i<v.length;i++)
Rounded(v[i],options);if(options.find("height"))SameHeight(selector,h);}
function Rounded(selector,options){var i,top="",bottom="",v=new Array();if(options!=""){options=options.replace("left","tl bl");options=options.replace("right","tr br");options=options.replace("top","tr tl");options=options.replace("bottom","br bl");options=options.replace("transparent","alias");if(options.find("tl")){top="both";if(!options.find("tr"))top="left";}
else if(options.find("tr"))top="right";if(options.find("bl")){bottom="both";if(!options.find("br"))bottom="left";}
else if(options.find("br"))bottom="right";}
if(top==""&&bottom==""&&!options.find("none")){top="both";bottom="both";}
v=getElementsBySelector(selector);for(i=0;i<v.length;i++){FixIE(v[i]);if(top!="")AddTop(v[i],top,options);if(bottom!="")AddBottom(v[i],bottom,options);}}
function AddTop(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}
else{bk=getParentBk(el);border=Mix(color,bk);}
d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Top");if(options.find("small")){d.style.marginBottom=(p-2)+"px";btype+="s";lim=2;}
else if(options.find("big")){d.style.marginBottom=(p-10)+"px";btype+="b";lim=8;}
else d.style.marginBottom=(p-5)+"px";for(i=1;i<=lim;i++)
d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingTop="0";el.insertBefore(d,el.firstChild);}
function AddBottom(el,side,options){var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;d.style.marginLeft="-"+getPadding(el,"Left")+"px";d.style.marginRight="-"+getPadding(el,"Right")+"px";if(options.find("alias")||(color=getBk(el))=="transparent"){color="transparent";bk="transparent";border=getParentBk(el);btype="t";}
else{bk=getParentBk(el);border=Mix(color,bk);}
d.style.background=bk;d.className="niftycorners";p=getPadding(el,"Bottom");if(options.find("small")){d.style.marginTop=(p-2)+"px";btype+="s";lim=2;}
else if(options.find("big")){d.style.marginTop=(p-10)+"px";btype+="b";lim=8;}
else d.style.marginTop=(p-5)+"px";for(i=lim;i>0;i--)
d.appendChild(CreateStrip(i,side,color,border,btype));el.style.paddingBottom=0;el.appendChild(d);}
function CreateStrip(index,side,color,border,btype){var x=CreateEl("b");x.className=btype+index;x.style.backgroundColor=color;x.style.borderColor=border;if(side=="left"){x.style.borderRightWidth="0";x.style.marginRight="0";}
else if(side=="right"){x.style.borderLeftWidth="0";x.style.marginLeft="0";}
return(x);}
function CreateEl(x){return(document.createElement(x));}
function FixIE(el){if(el.currentStyle!=null&&el.currentStyle.hasLayout!=null&&el.currentStyle.hasLayout==false)
el.style.display="inline-block";}
function SameHeight(selector,maxh){var i,v=selector.split(","),t,j,els=[],gap;for(i=0;i<v.length;i++){t=getElementsBySelector(v[i]);els=els.concat(t);}
for(i=0;i<els.length;i++){if(els[i].offsetHeight>maxh)maxh=els[i].offsetHeight;els[i].style.height="auto";}
for(i=0;i<els.length;i++){gap=maxh-els[i].offsetHeight;if(gap>0){t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";nc=els[i].lastChild;if(nc.className=="niftycorners")
els[i].insertBefore(t,nc);else els[i].appendChild(t);}}}
function getElementsBySelector(selector){var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;if(selector.find("#")){if(selector.find(" ")){s=selector.split(" ");var fs=s[0].split("#");if(fs.length==1)return(objlist);f=document.getElementById(fs[1]);if(f){v=f.getElementsByTagName(s[1]);for(i=0;i<v.length;i++)objlist.push(v[i]);}
return(objlist);}
else{s=selector.split("#");tag=s[0];selid=s[1];if(selid!=""){f=document.getElementById(selid);if(f)objlist.push(f);return(objlist);}}}
if(selector.find(".")){s=selector.split(".");tag=s[0];selclass=s[1];if(selclass.find(" ")){s=selclass.split(" ");selclass=s[0];tag2=s[1];}}
var v=document.getElementsByTagName(tag);if(selclass==""){for(i=0;i<v.length;i++)objlist.push(v[i]);return(objlist);}
for(i=0;i<v.length;i++){c=v[i].className.split(" ");for(j=0;j<c.length;j++){if(c[j]==selclass){if(tag2=="")objlist.push(v[i]);else{v2=v[i].getElementsByTagName(tag2);for(k=0;k<v2.length;k++)objlist.push(v2[k]);}}}}
return(objlist);}
function getParentBk(x){var el=x.parentNode,c;while(el.tagName.toUpperCase()!="HTML"&&(c=getBk(el))=="transparent")
el=el.parentNode;if(c=="transparent")c="#FFFFFF";return(c);}
function getBk(x){var c=getStyleProp(x,"backgroundColor");if(c==null||c=="transparent"||c.find("rgba(0, 0, 0, 0)"))
return("transparent");if(c.find("rgb"))c=rgb2hex(c);return(c);}
function getPadding(x,side){var p=getStyleProp(x,"padding"+side);if(p==null||!p.find("px"))return(0);return(parseInt(p));}
function getStyleProp(x,prop){if(x.currentStyle)
return(x.currentStyle[prop]);if(document.defaultView.getComputedStyle)
return(document.defaultView.getComputedStyle(x,'')[prop]);return(null);}
function rgb2hex(value){var hex="",v,h,i;var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=regexp.exec(value);for(i=1;i<4;i++){v=parseInt(h[i]).toString(16);if(v.length==1)hex+="0"+v;else hex+=v;}
return("#"+hex);}
function Mix(c1,c2){var i,step1,step2,x,y,r=new Array(3);if(c1.length==4)step1=1;else step1=2;if(c2.length==4)step2=1;else step2=2;for(i=0;i<3;i++){x=parseInt(c1.substr(1+step1*i,step1),16);if(step1==1)x=16*x+x;y=parseInt(c2.substr(1+step2*i,step2),16);if(step2==1)y=16*y+y;r[i]=Math.floor((x*50+y*50)/100);r[i]=r[i].toString(16);if(r[i].length==1)r[i]="0"+r[i];}
return("#"+r[0]+r[1]+r[2]);}
Object.extend(String.prototype,{ensureEndsWith:function(str){return this.endsWith(str)?this:this+str;},px:function(){return this.ensureEndsWith('px');}});Object.extend(Number.prototype,{px:function(){return this.toString().px();}});var Window={size:function(){var width=window.innerWidth||(window.document.documentElement.clientWidth||window.document.body.clientWidth);var height=window.innerHeight||(window.document.documentElement.clientHeight||window.document.body.clientHeight);var x=window.pageXOffset||(window.document.documentElement.scrollLeft||window.document.body.scrollLeft);var y=window.pageYOffset||(window.document.documentElement.scrollTop||window.document.body.scrollTop);return{'width':width,'height':height,'x':x,'y':y}}}
var FancyZoomBox={directory:'',zooming:false,setup:false,init:function(directory){if(FancyZoomBox.setup)return;FancyZoomBox.setup=true;var ie=navigator.userAgent.match(/MSIE\s(\d)+/);if(ie){var version=parseInt(ie[1]);Prototype.Browser['IE'+version.toString()]=true;Prototype.Browser.ltIE7=(version<7)?true:false;}
var html='<div id="zoom" style="display:none;"> \
                  <table id="zoom_table" style="border-collapse:collapse; width:100%; height:100%;"> \
                    <tbody> \
                      <tr> \
                        <td class="tl" style="background:url('+FancyZoomBox.directory+'/tl.png) 0 0 no-repeat; width:20px; height:20px; overflow:hidden;" /> \
                        <td class="tm" style="background:url('+FancyZoomBox.directory+'/tm.png) 0 0 repeat-x; height:20px; overflow:hidden;" /> \
                        <td class="tr" style="background:url('+FancyZoomBox.directory+'/tr.png) 100% 0 no-repeat; width:20px; height:20px; overflow:hidden;" /> \
                      </tr> \
                      <tr> \
                        <td class="ml" style="background:url('+FancyZoomBox.directory+'/ml.png) 0 0 repeat-y; width:20px; overflow:hidden;" /> \
                        <td class="mm" style="background:#efefef; vertical-align:top; padding:10px;"> \
                          <div id="zoom_content"> \
                          </div> \
                        </td> \
                        <td class="mr" style="background:url('+FancyZoomBox.directory+'/mr.png) 100% 0 repeat-y;  width:20px; overflow:hidden;" /> \
                      </tr> \
                      <tr> \
                        <td class="bl" style="background:url('+FancyZoomBox.directory+'/bl.png) 0 100% no-repeat; width:20px; height:20px; overflow:hidden;" /> \
                        <td class="bm" style="background:url('+FancyZoomBox.directory+'/bm.png) 0 100% repeat-x; height:20px; overflow:hidden;" /> \
                        <td class="br" style="background:url('+FancyZoomBox.directory+'/br.png) 100% 100% no-repeat; width:20px; height:20px; overflow:hidden;" /> \
                      </tr> \
                    </tbody> \
                  </table> \
                  <a href="#" title="Close" id="zoom_close" style="position:absolute; top:0; left:0;"> \
                    <img src="'+FancyZoomBox.directory+'/closebox.png" alt="Close" style="border:none; margin:0; padding:0;" /> \
                  </a> \
                </div>';var body=$$('body').first();body.insert(html);FancyZoomBox.zoom=$('zoom');FancyZoomBox.zoom_table=$('zoom_table');FancyZoomBox.zoom_close=$('zoom_close');FancyZoomBox.zoom_content=$('zoom_content');FancyZoomBox.zoom_close.observe('click',FancyZoomBox.hide);FancyZoomBox.middle_row=$A([$$('td.ml'),$$('td.mm'),$$('td.mr')]).flatten();FancyZoomBox.cells=FancyZoomBox.zoom_table.select('td');$$('html').first().observe('click',function(e){var click_in_zoom=e.findElement('#zoom'),zoom_display=FancyZoomBox.zoom.getStyle('display');if(zoom_display=='block'&&!click_in_zoom){FancyZoomBox.hide(e);}});$(document).observe('keyup',function(e){var zoom_display=FancyZoomBox.zoom.getStyle('display');if(e.keyCode==Event.KEY_ESC&&zoom_display=='block'){FancyZoomBox.hide(e);}});if(Prototype.Browser.ltIE7){FancyZoomBox.switchBackgroundImagesTo('gif');}},getDirectory:function(){},show:function(e){e.stop();if(FancyZoomBox.zooming)return;FancyZoomBox.zooming=true;var element=e.findElement('a');var related_div=element.content_div;var width=(element.zoom_width||related_div.getWidth())+60;var height=(element.zoom_height||related_div.getHeight())+60;var d=Window.size();var yOffset=document.viewport.getScrollOffsets()[1];var newTop=Math.max((d.height/2)-(height/2)+yOffset,0);var newLeft=(d.width/2)-(width/2);FancyZoomBox.curTop=e.pointerY();FancyZoomBox.curLeft=e.pointerX();FancyZoomBox.moveX=-(FancyZoomBox.curLeft-newLeft);FancyZoomBox.moveY=-(FancyZoomBox.curTop-newTop);FancyZoomBox.zoom.hide().setStyle({position:'absolute',top:FancyZoomBox.curTop.px(),left:FancyZoomBox.curLeft.px()});new Effect.Parallel([new Effect.Appear(FancyZoomBox.zoom,{sync:true}),new Effect.Move(FancyZoomBox.zoom,{x:FancyZoomBox.moveX,y:FancyZoomBox.moveY,sync:true}),new Effect.Morph(FancyZoomBox.zoom,{style:{width:width.px(),height:height.px()},sync:true,beforeStart:function(effect){$('feedback_button').hide();if(Prototype.Browser.IE){FancyZoomBox.middle_row.invoke('setStyle',{height:(height-40).px()});}
FancyZoomBox.fixBackgroundsForIE();},afterFinish:function(effect){FancyZoomBox.zoom_content.innerHTML=related_div.innerHTML;FancyZoomBox.unfixBackgroundsForIE();FancyZoomBox.zoom_close.show();FancyZoomBox.zooming=false;}})],{duration:0.5});},hide:function(e){if(e){e.stop();}
if(FancyZoomBox.zooming)return;FancyZoomBox.zooming=true;new Effect.Parallel([new Effect.Move(FancyZoomBox.zoom,{x:FancyZoomBox.moveX*-1,y:FancyZoomBox.moveY*-1,sync:true}),new Effect.Morph(FancyZoomBox.zoom,{style:{width:'1'.px(),height:'1'.px()},sync:true,beforeStart:function(effect){FancyZoomBox.fixBackgroundsForIE();FancyZoomBox.zoom_content.innerHTML='';FancyZoomBox.zoom_close.hide();},afterFinish:function(effect){$('feedback_button').show();FancyZoomBox.unfixBackgroundsForIE();FancyZoomBox.zooming=false;}}),new Effect.Fade(FancyZoomBox.zoom,{sync:true})],{duration:0.5});},switchBackgroundImagesTo:function(to){FancyZoomBox.cells.each(function(td){var bg=td.getStyle('background-image').gsub(/\.(png|gif|none)\)$/,'.'+to+')');td.setStyle('background-image: '+bg);});var close_img=FancyZoomBox.zoom_close.firstDescendant();var new_img=close_img.readAttribute('src').gsub(/\.(png|gif|none)$/,'.'+to);close_img.writeAttribute('src',new_img);},fixBackgroundsForIE:function(){if(Prototype.Browser.IE7){FancyZoomBox.switchBackgroundImagesTo('gif');}},unfixBackgroundsForIE:function(){if(Prototype.Browser.IE7){FancyZoomBox.switchBackgroundImagesTo('png');}}}
var FancyZoom=Class.create({initialize:function(element){this.options=arguments.length>1?arguments[1]:{};if(location.protocol=="https:"||location.host=="marketdrums.local"){FancyZoomBox.directory='/images/fancyzoom';}else{FancyZoomBox.directory='http://assets.marketdrums.com/images/fancyzoom';}
FancyZoomBox.init();this.element=$(element);if(this.element){this.element.content_div=$(this.element.readAttribute('href').gsub(/^#/,''));this.element.content_div.hide();this.element.zoom_width=this.options.width;this.element.zoom_height=this.options.height;this.element.observe('click',FancyZoomBox.show);}}});var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF&&typeof doc.appendChild!=UNDEF&&typeof doc.replaceChild!=UNDEF&&typeof doc.removeChild!=UNDEF&&typeof doc.cloneNode!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0;}}
else if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7");}
catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always";}
catch(e){if(playerVersion[0]==6){fp6Crash=true;}}
if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX);}
catch(e){}}}
if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}
catch(e){}}}
var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac};}();var onDomLoad=function(){if(!ua.w3cdom){return;}
addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<scr"+"ipt id=__ie_ondomload defer=true src=//:></scr"+"ipt>");var s=getElementById("__ie_ondomload");if(s){s.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);callDomLoadFunctions();}};}}
catch(e){}}
if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions();}},10);}
if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null);}
addLoadEvent(callDomLoadFunctions);}();function callDomLoadFunctions(){if(isDomLoaded){return;}
if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t);}
catch(e){return;}}
isDomLoaded=true;if(timer){clearInterval(timer);timer=null;}
var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]();}}
function addDomLoadEvent(fn){if(isDomLoaded){fn();}
else{domLoadFnArr[domLoadFnArr.length]=fn;}}
function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false);}
else if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false);}
else if(typeof win.attachEvent!=UNDEF){win.attachEvent("onload",fn);}
else if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn();};}
else{win.onload=fn;}}
function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj);}
setVisibility(id,true);}
else if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i]);}
else{displayAltContent(obj);}}}
else{setVisibility(id,true);}}}
function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName.toLowerCase()=="data"){e.setAttribute("src",a[i].nodeValue);}
else{e.setAttribute(a[i].nodeName,a[i].nodeValue);}}}
var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName.toLowerCase()=="param"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"));}}}
obj.parentNode.replaceChild(e,obj);}}
function fixObjectLeaks(id){if(ua.ie&&ua.win&&hasPlayerVersion("8.0.0")){win.attachEvent("onunload",function(){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=function(){};}}
obj.parentNode.removeChild(obj);}});}}
function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId;}}
else{storedAltContent=abstractAltContent(obj);}
if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310";}
if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137";}
doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";win.attachEvent("onload",function(){obj.parentNode.removeChild(obj);});}
createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId);}}
function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";win.attachEvent("onload",function(){obj.parentNode.removeChild(obj);});}
else{obj.parentNode.replaceChild(abstractAltContent(obj),obj);}}
function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML;}
else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true));}}}}}
return ac;}
function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(typeof attObj.id==UNDEF){attObj.id=id;}
if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i=="data"){parObj.movie=attObj[i];}
else if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"';}
else if(i!="classid"){att+=' '+i+'="'+attObj[i]+'"';}}}
var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />';}}
el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+'>'+par+'</object>';fixObjectLeaks(attObj.id);r=getElementById(attObj.id);}
else if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k=="data"){e.setAttribute("src",attObj[k]);}
else if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k]);}
else if(k!="classid"){e.setAttribute(k,attObj[k]);}}}
for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l!="movie"){e.setAttribute(l,parObj[l]);}}}
el.parentNode.replaceChild(e,el);r=e;}
else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m]);}
else if(m!="classid"){o.setAttribute(m,attObj[m]);}}}
for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n!="movie"){createObjParam(o,n,parObj[n]);}}
el.parentNode.replaceChild(o,el);r=o;}
return r;}
function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p);}
function getElementById(id){return doc.getElementById(id);}
function createElement(el){return doc.createElement(el);}
function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10);v[2]=parseInt(v[2],10);return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;}
function createCSS(sel,decl){if(ua.ie&&ua.mac){return;}
var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"));}
h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl);}}}
function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded){getElementById(id).style.visibility=v;}
else{createCSS("#"+id,"visibility:"+v);}}
function getTargetVersion(obj){if(!obj)
return 0;var c=obj.childNodes;var cl=c.length;for(var i=0;i<cl;i++){if(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="object"){c=c[i].childNodes;cl=c.length;i=0;}
if(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param"&&c[i].getAttribute("name")=="swfversion"){return c[i].getAttribute("value");}}
return 0;}
function getExpressInstall(obj){if(!obj)
return"";var c=obj.childNodes;var cl=c.length;for(var i=0;i<cl;i++){if(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="object"){c=c[i].childNodes;cl=c.length;i=0;}
if(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param"&&c[i].getAttribute("name")=="expressinstall"){return c[i].getAttribute("value");}}
return"";}
return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr){return;}
var obj=document.getElementById(objectIdStr);var xi=getExpressInstall(obj);var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr?swfVersionStr:getTargetVersion(obj);regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:((xi!="")?xi:false);regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false);},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom&&isDomLoaded){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o;}
else if(typeof n.SetVariable!=UNDEF){r=n;}}}
return r;},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return;}
widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att=(typeof attObj==OBJECT)?attObj:{};att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par=(typeof parObj==OBJECT)?parObj:{};if(typeof flashvarsObj==OBJECT){for(var i in flashvarsObj){if(flashvarsObj[i]!=Object.prototype[i]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+i+"="+flashvarsObj[i];}
else{par.flashvars=i+"="+flashvarsObj[i];}}}}
addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true);}});}
else if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj);});}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]};},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom&&isDomLoaded){return createSWF(attObj,parObj,replaceElemIdStr);}
else{return undefined;}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl);}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(param==null){return q;}
if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1));}}}
return"";},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block";}}
storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false;}}}};}();Event.observe(window,'load',function(){new LoginCheck('user_name');new PartnerCheck('partner_id');Nifty("div#messages","normal");Nifty("div.testimonial","normal");Nifty("div#funds_status","normal");Nifty("div#fund-list","normal");new FancyZoom('feedback_button');externalLinks();disableAutoComplete();});Event.addBehavior({'#login:click':function(e){var element=Event.element(e);if(element.value=='Username'||element.value=='Gebruikersnaam')
element.value='';return true;},'#login-box-button:click':function(e){$('login-box-form').submit();},'#password:focus':function(e){var element=Event.element(e);element.value='';return true;},'#password:keypress':function(e){if(e.which==13||e.keyCode==13){$('header_login_form').submit();}
return true;},'#sign-in-button:click':function(e){$('header_login_form').submit();return true;},'a#login_link:click':function(e){Element.hide('nav_list');Effect.toggle('login_bubble','slide',{duration:0.3,queue:'login',afterFinish:function(){$('login_field').activate();}});Event.stop(e);},'.text:blur':function(e){$$('div.validation-container').each(Element.remove);$$('input.validation-failed').each(this.removeClassName('validation-failed'));return true;},'#cancel_reason:keypress':function(e){var element=Event.element(e);if(element.value.length>255){element.value=element.value.substr(0,255);}
return true;}});var PartnerCheck=Class.create({initialize:function(cookie_name){var partner=getQueryVariable("partner");if(partner){set_cookie(cookie_name,partner);}}});var Feedback={render:function(elm,text){if(elm.value==text){elm.value='';}},submit:function(){$$('#feedback_spinner')[1].toggle();$$('#feedback_header')[1].toggle();$$('#feedback_response')[1].toggle();setTimeout('FancyZoomBox.hide();',4000);}}
var LoginCheck=Class.create({initialize:function(cookie_name){var cookie_value=get_cookie(cookie_name);if(cookie_value){$('login_greeting').hide();$('greeting').show();$('feedback_button').show();$('nav_container').setStyle("width:800px;");}
else{if($("login-box")){$('login_greeting').remove();}
else{$('login_greeting').show();$('greeting').hide();$('nav_container').setStyle("width:250px");if($("feedback_button")){$('feedback_button').hide();}}}}});Element.addMethods({getInnerText:function(element){element=$(element);return element.innerText&&!window.opera?element.innerText:element.innerHTML.stripScripts().unescapeHTML().replace(/[\n\r\s]+/g,' ');}});var Validator=Class.create();Validator.prototype={initialize:function(className,error,test,options){if(typeof test=='function'){this.options=$H(options);this._test=test;}else{this.options=$H(test);this._test=function(){return true};}
this.error=error||'Validation failed.';this.className=className;},test:function(v,elm){return(this._test(v,elm)&&this.options.all(function(p){return Validator.methods[p.key]?Validator.methods[p.key](v,elm,p.value):true;}));}}
Validator.methods={pattern:function(v,elm,opt){return ValidatingForm.get('IsEmpty').test(v)||opt.test(v)},minLength:function(v,elm,opt){return v.length>=opt},maxLength:function(v,elm,opt){return v.length<=opt},min:function(v,elm,opt){return v>=parseFloat(opt)},max:function(v,elm,opt){return v<=parseFloat(opt)},notOneOf:function(v,elm,opt){return $A(opt).all(function(value){return v!=value;})},oneOf:function(v,elm,opt){return $A(opt).any(function(value){return v==value;})},is:function(v,elm,opt){return v==opt},isNot:function(v,elm,opt){return v!=opt},equalToField:function(v,elm,opt){return v==$F(opt)},notEqualToField:function(v,elm,opt){return v!=$F(opt)},include:function(v,elm,opt){return $A(opt).all(function(value){return ValidatingForm.get(value).test(v,elm);})}}
var ValidatingForm=Class.create();ValidatingForm.prototype={initialize:function(form,options){this.options=Object.extend({onSubmit:true,stopOnFirst:true,immediate:false,focusOnError:true,useTitles:true,onFormValidate:function(result,form){},onElementValidate:function(result,elm){}},options||{});this.form=$(form);if(this.options.onSubmit)Event.observe(this.form,'submit',this.onSubmit.bind(this),false);if(this.options.immediate){var useTitles=this.options.useTitles;var callback=this.options.onElementValidate;Form.getElements(this.form).each(function(input){Event.observe(input,'blur',function(ev){ValidatingForm.validate(Event.element(ev),{useTitle:useTitles,onElementValidate:callback});});});}},onSubmit:function(ev){if(!this.validate())Event.stop(ev);},validate:function(){var result=false;var useTitles=this.options.useTitles;var callback=this.options.onElementValidate;if(this.options.stopOnFirst){result=Form.getElements(this.form).all(function(elm){return ValidatingForm.validate(elm,{useTitle:useTitles,onElementValidate:callback});});}else{result=Form.getElements(this.form).collect(function(elm){return ValidatingForm.validate(elm,{useTitle:useTitles,onElementValidate:callback});}).all();}
if(!result&&this.options.focusOnError){Form.getElements(this.form).findAll(function(elm){return $(elm).hasClassName('validation-failed')}).first().focus();}
this.options.onFormValidate(result,this.form);return result;},reset:function(){Form.getElements(this.form).each(ValidatingForm.reset);}}
Object.extend(ValidatingForm,{validate:function(elm,options){options=Object.extend({useTitle:false,onElementValidate:function(result,elm){}},options||{});elm=$(elm);var cn=elm.classNames();return result=cn.all(function(value){var test=ValidatingForm.test(value,elm,options.useTitle);options.onElementValidate(test,elm);return test;});},test:function(name,elm,useTitle){var v=ValidatingForm.get(name);var prop='__advice'+name.camelize();try{if(ValidatingForm.isVisible(elm)&&!v.test($F(elm),elm)){var advice=ValidatingForm.getAdvice(name,elm);if(advice==null){var errorMsg=useTitle?((elm&&elm.title)?elm.title:v.error):v.error;var width="width:"+ValidatingForm.getElmWidth(elm)+"px;";var margin=elm.up().down(0).getWidth()+20;advice='<div class="validation-container" style="height:30px;width:100%;'+'display:none;" id="advice-'+name+'-'+ValidatingForm.getElmID(elm)+'" >'+'<div class="validation-advice" style="padding:5px;margin:-8px 0 0 '+
margin+'px;'+width+'">'+errorMsg+'</div></div>';switch(elm.type.toLowerCase()){case'checkbox':case'radio':var p=elm.parentNode;if(p){new Insertion.After(p,advice);}else{new Insertion.After(elm,advice);}
break;default:var p=elm.parentNode;if(p){new Insertion.After(p,advice);}else{new Insertion.After(elm,advice);}}
advice=ValidatingForm.getAdvice(name,elm);}
if(typeof Effect=='undefined'){advice.style.display='block';}else{new Effect.Appear(advice,{duration:1});}
elm[prop]=true;elm.removeClassName('validation-passed');elm.addClassName('validation-failed');return false;}else{var advice=ValidatingForm.getAdvice(name,elm);if(advice!=null)advice.hide();elm[prop]='';elm.removeClassName('validation-failed');elm.addClassName('validation-passed');return true;}}catch(e){throw(e)}},isVisible:function(elm){while(elm.tagName!='BODY'){if(!$(elm).visible())return false;elm=elm.parentNode;}
return true;},getAdvice:function(name,elm){return $('advice-'+name+'-'+ValidatingForm.getElmID(elm))||$('advice-'+ValidatingForm.getElmID(elm));},getElmID:function(elm){return elm.id?elm.id:elm.name;},getElmWidth:function(elm){p=elm.up();div=p.up();label=p.down(0);margins=(div.getWidth()-p.getWidth());width=(p.getWidth()-label.getWidth()-margins+20);return width;},getElmLeft:function(elm){return elm.offsetLeft;},getElmTop:function(elm){return elm.offsetTop+elm.getHeight();},reset:function(elm){elm=$(elm);var cn=elm.classNames();cn.each(function(value){var prop='__advice'+value.camelize();if(elm[prop]){var advice=ValidatingForm.getAdvice(value,elm);advice.hide();elm[prop]='';}
elm.removeClassName('validation-failed');elm.removeClassName('validation-passed');});},add:function(className,error,test,options){var nv={};nv[className]=new Validator(className,error,test,options);Object.extend(ValidatingForm.methods,nv);},addAllThese:function(validators){var nv={};$A(validators).each(function(value){nv[value[0]]=new Validator(value[0],value[1],value[2],(value.length>3?value[3]:{}));});Object.extend(ValidatingForm.methods,nv);},get:function(name){return ValidatingForm.methods[name]?ValidatingForm.methods[name]:ValidatingForm.methods['_LikeNoIDIEverSaw_'];},methods:{'_LikeNoIDIEverSaw_':new Validator('_LikeNoIDIEverSaw_','',{})}});ValidatingForm.add('IsEmpty','',function(v){return((v==null)||(v.length==0)||(/^\s+$/.test(v)));});ValidatingForm.add('confirmation','Fields do to not match',function(v,elm){element_id=elm.id.replace('_confirmation','')
if($F(elm.id)==$F(element_id))return true;});ValidatingForm.add('validate-cc','Credit card is not in a valid format',function(v,elm){var number=$F(elm.id).replace(/\s+/g,'');if(number.match(/\D/)){return false;}
if(number==1){return true;}
number=number.split('').reverse().join('');var digits='';for(var i=0;i<number.length;i++){digits+=''+((i%2)?number.charAt(i)*2:number.charAt(i));}
var sum=0;for(var i=0;i<digits.length;i++){sum+=(digits.charAt(i)*1);}
return(sum%10)?false:true;});ValidatingForm.add('validate-cc-exp','Credit card expiration date is not valid',function(v,elm){var month=$F("creditcard_month");var year=$F("creditcard_year");var today=new Date();var ccDate=new Date(year,month,today.getDate(),today.getHours(),today.getMinutes(),today.getSeconds());if(ccDate<=today){return false;}
return true;});ValidatingForm.add('validate-phone',"Phone number too short",function(v,elm){return((v==null)||(v.length>=11));});ValidatingForm.addAllThese([['required','This is a required field.',function(v){return!ValidatingForm.get('IsEmpty').test(v);}],['validate-number','Please enter a valid number in this field.',function(v){return ValidatingForm.get('IsEmpty').test(v)||(!isNaN(v)&&!/^\s+$/.test(v));}],['validate-digits','Please use numbers only in this field. please avoid spaces or other characters such as dots or commas.',function(v){return ValidatingForm.get('IsEmpty').test(v)||!/[^\d]/.test(v);}],['validate-alpha','Please use letters only (a-z) in this field.',function(v){return ValidatingForm.get('IsEmpty').test(v)||/^[a-z\sA-Z]+$/.test(v)}],['validate-alphanum','Please use only letters (a-z) or numbers (0-9) only in this field. No spaces or other characters are allowed.',function(v){return ValidatingForm.get('IsEmpty').test(v)||!/\W/.test(v)}],['validate-date','Please enter a valid date.',function(v){var test=new Date(v);return ValidatingForm.get('IsEmpty').test(v)||!isNaN(test);}],['validate-email','Please enter a valid email address. For example fred@domain.com .',function(v){return ValidatingForm.get('IsEmpty').test(v)||/\w{1,}[@][\w\-]{1,}([.]([\w\-]{1,})){1,3}$/.test(v)}],['validate-url','Please enter a valid URL.',function(v){return ValidatingForm.get('IsEmpty').test(v)||/^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)}],['validate-date-au','Please use this date format: dd/mm/yyyy. For example 17/03/2006 for the 17th of March, 2006.',function(v){if(ValidatingForm.get('IsEmpty').test(v))return true;var regex=/^(\d{2})\/(\d{2})\/(\d{4})$/;if(!regex.test(v))return false;var d=new Date(v.replace(regex,'$2/$1/$3'));return(parseInt(RegExp.$2,10)==(1+d.getMonth()))&&(parseInt(RegExp.$1,10)==d.getDate())&&(parseInt(RegExp.$3,10)==d.getFullYear());}],['validate-currency-dollar','Please enter a valid $ amount. For example $100.00 .',function(v){return ValidatingForm.get('IsEmpty').test(v)||/^\$?\-?([1-9]{1}[0-9]{0,2}(\,[0-9]{3})*(\.[0-9]{0,2})?|[1-9]{1}\d*(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|(\.[0-9]{1,2})?)$/.test(v)}],['validate-selection','Please make a selection',function(v,elm){return elm.options?elm.selectedIndex>0:!ValidatingForm.get('IsEmpty').test(v);}]]);var all_funds=true;Event.observe(window,'load',function(){if($("funds")){$("progress_indicator").toggle();$("funds").toggle();FundsBrowser.init();FundsGrid.init();}});Event.addBehavior({'.li_category:click':function(e){applySelectedTo(this);},'#searchField:click':function(e){if($("searchField").value=="Search"||$("searchField").value=="Zoeken"){$("searchField").value="";}},'#searchField:keyup':function(e){FundsGrid.filterFunds($("searchField").value,e);},'#paging_area:click':function(e){FundsGrid.ensureChecks();}});var FundsGrid={hiddenRows:[],availableFunds:0,locale:'en',checks:[],init:function(){mygrid=new dhtmlXGridObject('gridbox');mygrid.setImagePath("/images/dhtmlxgrid/");mygrid.setNoHeader(true);mygrid.setHeader("Fund,Symbol,All,SMS,Email,Calendar,RSS,,industry,sector,countries,markets,indices,fund_id");mygrid.setInitWidths("311,105,50,60,52,68,60,0,0,0,0,0,0,0");mygrid.setColAlign("left,left,center,center,center,center,center,center,left,left,left,left,left,left");mygrid.setColSorting("str,str,int,int,int,int,int,int,str,str,str,str,str,str");mygrid.enableResizing("false,false,false,false,false,false,false,false");mygrid.setColTypes("ro,ro,ch,ch,ch,ch,ch,ch,ro,ro,ro,ro,ro,ro");mygrid.setPagingTemplates("[prevpages:<img src=\"/images/buttons/arrow-left.gif\" /> :&nbsp;] "+"[nextpages:<img src=\"/images/buttons/arrow-right.gif\" />:&nbsp;]","<b>[from]-[to]</b> of <b>[total]</b>");mygrid.setColumnHidden(7,true);mygrid.setColumnHidden(8,true);mygrid.setColumnHidden(9,true);mygrid.setColumnHidden(10,true);mygrid.setColumnHidden(11,true);mygrid.setColumnHidden(12,true);mygrid.setColumnHidden(13,true);mygrid.attachEvent("onCheckbox",this.onCheck);mygrid.attachEvent("onPaging",this.onPaging);mygrid.enablePaging(true,10,1,"paging_area",true,"page_state");mygrid.enableAutoHeight(false);mygrid.enableCellIds(true);mygrid.setSkin("light");mygrid.enableMultiselect(false);mygrid.enableMultiline(false);mygrid.init();mygrid.load(this.getFundFilePath(),function(){selectCurrentFunds();$('progress_indicator').style.display="none";$('funds').style.visibility="visible";if(myfunds){$('funds_toggle').checked=true;FundsGrid.userFunds();}
mygrid.forEachRow(function(id){['3','4','5','6'].each(function(name,index){attr=id+'_'+mygrid.getColumnLabel(name);mygrid.cells(id,name).cell.firstElementChild.setAttribute("id",id+'_'+mygrid.getColumnLabel(name));});});FundsGrid.gridPerPage(10)});this.attachEvents(mygrid);},applySelectedTo:function(link){var ul=link.up(1);var allLinks=ul.getElementsByTagName("a");for(var i=0;i<allLinks.length;i++){allLinks[i].up().className="";}
link.up().className="selected";},filterFunds:function(terms,key){if(key.keyCode==8||terms.length==1){if($("funds_toggle").checked){FundsGrid.userFunds();}else{FundsGrid.resetGrid();}
this.ensureChecks();}
mygrid.filterBy(0,terms,true);},showAllFunds:function(){FundsGrid.resetGrid();FundsBrowser.resetBrowser();},attachEvents:function(mygrid){$$(".li_category").each(function(li){Event.observe(li,'click',function(e){this.filterCategory();});});},filterCategory:function(){industry=this.getSelectedItem('.li_industry_id');sector=this.getSelectedItem('.li_sector_id');country=this.getSelectedItem('.li_country_id');market=this.getSelectedItem('.li_market_id');index=this.getSelectedItem('.li_index_id');mygrid.filterBy(8,industry);mygrid.filterBy(9,sector,true);mygrid.filterBy(10,country,true);mygrid.filterBy(11,market,true);mygrid.filterBy(12,index,true);},getSelectedItem:function(ul){var returnType="";$$(ul).each(function(li){if(li.up().className=="selected"&&li.id==''){returnType=li.innerHTML;}});return returnType;},onCheck:function(rowID,cellInd,checked){if(checked==true&&FundsGrid.checkForFundLimit(rowID,cellInd)==true){return;}
var params='fund_id='+FundsGrid.getFundId(rowID)+'&type='
+FundsGrid.detectCommunicationType(cellInd);if(checked==true&&mygrid.getColumnLabel(cellInd)=="All"){FundsGrid.addCommunication(params);for(var iter=2;iter<7;iter++){var ed=this.cells(rowID,iter);ed.setValue(1);ed.cell.wasChanged=true;FundsGrid.checks.push([iter,rowID]);}}
else if(checked==false&&mygrid.getColumnLabel(cellInd)=="All"){for(var iter=2;iter<7;iter++){var ed=this.cells(rowID,iter);ed.setValue(0);ed.cell.wasChanged=true;}
FundsGrid.deleteCommunication(params);}
else if(checked){FundsGrid.addCommunication(params);FundsGrid.checks.push([cellInd,rowID]);mygrid.cells(rowID,cellInd).setValue(true);}
else
{FundsGrid.deleteCommunication(params);}
FundsGrid.checkForAll(rowID);FundsGrid.hasCellsSelected(rowID);return true;},onPaging:function(){var html='<b>1-0</b> of <b>0</b>';if(mygrid.recordInfoBlock.innerHTML==html){$('no-results').show();}else{$('no-results').hide();}},loadToolTips:function(){mygrid.forEachRow(function(id){['2','3','4','5','6'].each(function(name,index){cell=mygrid.cells(id,name);new Tip(cell.cell,mygrid.getColumnLabel(name),{width:'auto',border:0,radius:0,style:'simple',offset:{x:13,y:13}});});});},checkForFundLimit:function(rowID,cellID){if(!FundsGrid.hasCellsSelected(rowID,cellID)&&FundsGrid.availableFunds==0){mygrid.cells(rowID,cellID).setValue(0);FundsGrid.flash($('no_funds_text').innerHTML);return true;}
return false;},flash:function(message){$('funds_errors').update(message);Effect.Appear('funds_errors');},onToggleCheck:function(e){mygrid.setEditable(false);if(e.checked==true){FundsGrid.userFunds();}else{FundsGrid.resetGrid();FundsBrowser.resetBrowser();}
mygrid.setEditable(true);},detectCommunicationType:function(type_index){var return_type=null;switch(type_index){case 2:return_type="All";break
case 3:return_type="Sms";break
case 4:return_type="Email";break
case 5:return_type="Calendar";break
case 6:return_type="Rss";break
case 7:return_type="Im";break}
return return_type;},addCommunication:function(params){var url='/communications/';var myAjax=new Ajax.Request(url,{method:"POST",parameters:params,asynchronous:true});},deleteCommunication:function(params){var url='/communications/destroy';var myAjax=new Ajax.Request(url,{method:"DELETE",parameters:params,asynchronous:true});},gridPerPage:function(rows){height=(355*(rows/10)-rows);var gridQString="/funds.xml?position=1&count="+rows;mygrid.rowsBufferOutSize=rows;mygrid.enablePaging(true,rows,1,"paging_area",true,"page_state");mygrid.changePage(1);if(rows>10){FundsGrid.loadToolTips();}
$("gridbox").setStyle("height:"+height+"px");$$("#gridbox div.objbox").first().setStyle("height:"+height+"px");return true;},checkForAll:function(rowID){for(var iter=3;iter<7;iter++){var ed=mygrid.cells(rowID,iter);if(ed.getValue()==0){mygrid.cells(rowID,2).setValue(0);return;}}
mygrid.cells(rowID,2).setValue(1);},hasCellsSelected:function(rowID,cellID){for(var iter=3;iter<7;iter++){var ed=mygrid.cells(rowID,iter);if(ed.getValue()==1&&iter!=cellID){return true;}}
FundsGrid.hideRow(rowID);return false;},hideRow:function(rowID){if($('funds_toggle').checked==true){var row=mygrid.getRowById(rowID);Effect.Fade(row,{duration:1.0});page=mygrid.currentPage;setTimeout("mygrid.setRowHidden("+rowID+", 'hide');FundsGrid.userFunds();",1000);FundsGrid.hiddenRows.push(rowID);}},userFunds:function(page){var pageNum=Object.isUndefined(page)?1:page;FundsGrid.checks=[];var funds=[];mygrid.forEachRow(function(id){['3','4','5','6'].each(function(name,index){if(mygrid.cells(id,name).getValue()==1){FundsGrid.checks.push([name,id]);funds.push(mygrid.cells(id,13).getValue());}});});mygrid.filterBy(13,function(val){return(funds.indexOf(val)!=-1);});FundsBrowser.filterBrowser(funds);mygrid.changePage(pageNum);this.ensureChecks();},logChecks:function(){console.clear();mygrid.forEachRow(function(id){['3','4','5','6'].each(function(name,index){if(mygrid.cells(id,name).getValue()==1){console.log("Checked: "+
mygrid.cells(id,1).getValue()+" "+
mygrid.getColumnLabel(name));}});});console.log(FundsGrid.checks);},ensureChecks:function(){FundsGrid.checks.each(function(name,index){cell=(mygrid.cells(name[1],name[0]));if(cell.getValue()!=1){cell.setValue(true);cell.setChecked(true);FundsGrid.checkForAll(name[1]);}});},containsFund:function(val,column,funds){if(column.indexOf('_row')>0){return true;}else{for(var i=funds.length-1;i>=0;--i){if(val.indexOf(funds[i])!=-1){return true;}}}
return false;},selectedFunds:function(){var funds=[];for(var i=0;i<mygrid.getAllRowIds().length;i++){fund_id=mygrid.getRowId(i);if(fund_id){funds.push(("#"+mygrid.getRowId(i)));}}
return funds;},resetGrid:function(){FundsGrid.hiddenRows.each(function(rowID){mygrid.setRowHidden(rowID,false);});mygrid.filterBy(8,'');mygrid.filterBy(9,'',true);mygrid.filterBy(10,'',true);mygrid.filterBy(11,'',true);mygrid.filterBy(12,'',true);},getFundId:function(rowID){fund=mygrid.cells(rowID,13).getValue();return fund.substring(1);},getFundName:function(rowID){fund=mygrid.cells(rowID,0).getValue();return fund;},getFundFilePath:function(){var randomnumber=(Math.round((Math.random()*100000)+1));var path="/system/funds_"+this.locale+".xml?"+randomnumber;return path;}}
var FundsBrowser={locale:'en',init:function(){this.initIndustry();this.initSector();this.initCountry();this.initExchange();this.initIndex();},initIndustry:function(){industry=new dhtmlXGridObject('category-industry');industry.setNoHeader(true);industry.setImagePath("/images/dhtmlxgrid/");industry.setHeader("'','','','','','',''");industry.setInitWidths("190,0,0,0,0,0,0");industry.setColTypes("ro");industry.setColAlign("left");industry.setColSorting("str");industry.enableResizing("false");industry.enableAutoHeigth(true,"165");industry.init();industry.attachEvent("onRowSelect",this.doIndustrySelected);industry.loadXML(this.systempath("industries_"+this.locale+".xml"));},initSector:function(){sector=new dhtmlXGridObject('category-sector');sector.setNoHeader(true);sector.setHeader("'','','','','','',''");sector.setImagePath("/images/dhtmlxgrid/");sector.setInitWidths("200,0,0,0,0,0,0");sector.setColTypes("ro");sector.setColAlign("left");sector.setColSorting("str");sector.enableResizing("false");sector.enableAutoHeigth(true,"182");sector.init();sector.attachEvent("onRowSelect",this.doSectorSelected);sector.loadXML(this.systempath("sectors_"+this.locale+".xml"));},initCountry:function(){country=new dhtmlXGridObject('category-country');country.setNoHeader(true);country.setHeader("'','','','','','',''");country.setImagePath("/images/dhtmlxgrid/");country.setInitWidths("190,0,0,0,0,0,0");country.setColTypes("ro");country.setColAlign("left");country.setColSorting("str");country.enableResizing("false");country.enableAutoHeigth(true,"165");country.init();country.attachEvent("onRowSelect",this.doCountrySelected);country.loadXML(this.systempath("countries_"+this.locale+".xml"));},initExchange:function(){exchange=new dhtmlXGridObject('category-exchange');exchange.setNoHeader(true);exchange.setHeader("'','','','','','',''");exchange.setImagePath("/images/dhtmlxgrid/");exchange.setInitWidths("220,0,0,0,0,0,0");exchange.setColTypes("ro");exchange.setColAlign("left");exchange.setColSorting("str");exchange.enableResizing("false");exchange.enableAutoHeigth(true,"166");exchange.init();exchange.attachEvent("onRowSelect",this.doExchangeSelected);exchange.loadXML(this.systempath("exchanges_"+this.locale+".xml"));},initIndex:function(){index=new dhtmlXGridObject('category-index');index.setNoHeader(true);index.setHeader("'','','','','','',''");index.setInitWidths("190,0,0,0,0,0,0");index.setImagePath("/images/dhtmlxgrid/");index.setColTypes("ro");index.setColAlign("left");index.setColSorting("str");index.enableResizing("false");index.enableAutoHeigth(true,"182");index.init();index.attachEvent("onRowSelect",this.doIndexSelected);index.loadXML(this.systempath("indices_"+this.locale+".xml"));},filterCategory:function(column_id,row_id,grid){if(FundsBrowser.activeRow(grid)==false){grid.filterBy(column_id,function(val,col){return FundsBrowser.checkRow(val,col,row_id);},false);funds=FundsGrid.selectedFunds();grid.filterBy(6,function(val,col){return FundsGrid.containsFund(val,col,funds);},false);}},checkRow:function(val,column,row){return(column.indexOf('_row')>0||val.indexOf(row)!=-1);},doIndustrySelected:function(rowId){FundsBrowser.clearAllCategories(1);FundsBrowser.updateGrid();if(FundsBrowser.activeRow(industry)){industry.rowsCol[0].className='';FundsBrowser.filterCategory(1,industry.getSelectedRowId(),sector);FundsBrowser.filterCategory(1,industry.getSelectedRowId(),country);FundsBrowser.filterCategory(1,industry.getSelectedRowId(),exchange);FundsBrowser.filterCategory(1,industry.getSelectedRowId(),index);}},doSectorSelected:function(rowId){FundsBrowser.clearAllCategories(2);FundsBrowser.updateGrid();if(FundsBrowser.activeRow(sector)){sector.rowsCol[0].className='';FundsBrowser.filterCategory(2,rowId,industry);FundsBrowser.filterCategory(2,rowId,country);FundsBrowser.filterCategory(2,rowId,exchange);FundsBrowser.filterCategory(2,rowId,index);}},doCountrySelected:function(rowId){FundsBrowser.clearAllCategories(3);FundsBrowser.updateGrid();if(FundsBrowser.activeRow(country)){country.rowsCol[0].className='';FundsBrowser.filterCategory(3,rowId,industry);FundsBrowser.filterCategory(3,rowId,sector);FundsBrowser.filterCategory(3,rowId,exchange);FundsBrowser.filterCategory(3,rowId,index);}},doExchangeSelected:function(rowId){FundsBrowser.clearAllCategories(4);FundsBrowser.updateGrid();if(FundsBrowser.activeRow(exchange)){exchange.rowsCol[0].className='';FundsBrowser.filterCategory(4,rowId,industry);FundsBrowser.filterCategory(4,rowId,sector);FundsBrowser.filterCategory(4,rowId,country);FundsBrowser.filterCategory(4,rowId,index);}},doIndexSelected:function(rowId){FundsBrowser.clearAllCategories(5);FundsBrowser.updateGrid();if(FundsBrowser.activeRow(index)){index.rowsCol[0].className='';FundsBrowser.filterCategory(5,rowId,industry);FundsBrowser.filterCategory(5,rowId,sector);FundsBrowser.filterCategory(5,rowId,country);FundsBrowser.filterCategory(5,rowId,exchange);}},updateHeaders:function(){industry.cellById("industry_row",0).setValue("Show all industries");sector.cellById("sector_row",0).setValue("Show all sectors");country.cellById("country_row",0).setValue("Show all countries");exchange.cellById("exchange_row",0).setValue("Show all exchanges");index.cellById("index_row",0).setValue("Show all indices");},clearAllCategories:function(cell){if(industry.getSelectedRowId()==null||industry.getSelectedRowId()=="industry_row"){industry.filterBy(cell,'');}
if(sector.getSelectedRowId()==null||sector.getSelectedRowId()=="sector_row"){sector.filterBy(cell,'');}
if(country.getSelectedRowId()==null||country.getSelectedRowId()=="country_row"){country.filterBy(cell,'');}
if(exchange.getSelectedRowId()==null||exchange.getSelectedRowId()=="exchange_row"){exchange.filterBy(cell,'');}
if(index.getSelectedRowId()==null||index.getSelectedRowId()=="index_row"){index.filterBy(cell,'');}},updateGrid:function(){if($('funds_toggle').checked){FundsGrid.userFunds();}else{FundsGrid.resetGrid();}
if(FundsBrowser.activeRow(industry)){mygrid.filterBy(8,"#"+industry.getSelectedRowId(),true);}
if(FundsBrowser.activeRow(sector)){mygrid.filterBy(9,"#"+sector.getSelectedRowId(),true);}
if(FundsBrowser.activeRow(country)){mygrid.filterBy(10,"#"+country.getSelectedRowId(),true);}
if(FundsBrowser.activeRow(exchange)){mygrid.filterBy(11,"#"+exchange.getSelectedRowId(),true);}
if(FundsBrowser.activeRow(index)){mygrid.filterBy(12,"#"+index.getSelectedRowId(),true);}},resetBrowser:function(){industry.filterBy(0,'');sector.filterBy(0,'');country.filterBy(0,'');exchange.filterBy(0,'');index.filterBy(0,'');},filterBrowser:function(funds)
{industry.filterBy(6,function(val,column){return FundsGrid.containsFund(val,column,funds);},true);sector.filterBy(6,function(val,column){return FundsGrid.containsFund(val,column,funds);},true);country.filterBy(6,function(val,column){return FundsGrid.containsFund(val,column,funds);},true);exchange.filterBy(6,function(val,column){return FundsGrid.containsFund(val,column,funds);},true);index.filterBy(6,function(val,column){return FundsGrid.containsFund(val,column,funds);},true);},activeRow:function(grid){if(grid.getSelectedRowId()!=null&&grid.getSelectedRowId().indexOf("_row")==-1){return true;}else{return false;}},systempath:function(location)
{var randomnumber=(Math.round((Math.random()*100000)+1));var new_path="/system/"+location+'?'+randomnumber;return new_path;}}
var Prototip={Version:'2.1.0.1'};var Tips={options:{images:'/images/prototip/',zIndex:6000}};Prototip.Styles={'default':{border:6,borderColor:'#c7c7c7',className:'default',closeButton:false,hideAfter:false,hideOn:'mouseleave',hook:false,radius:6,showOn:'mousemove',stem:{height:12,width:15}},'marketdrums':{className:'marketdrums',border:0,borderColor:'#f5f5f5',radius:0,stem:{height:41,width:25}},'protoblue':{className:'protoblue',border:6,borderColor:'#116497',radius:6,stem:{height:12,width:15}},'darkgrey':{className:'darkgrey',border:6,borderColor:'#363636',radius:6,stem:{height:12,width:15}},'creamy':{className:'creamy',border:6,borderColor:'#ebe4b4',radius:6,stem:{height:12,width:15}},'protogrey':{className:'protogrey',border:6,borderColor:'#606060',radius:6,stem:{height:12,width:15}}};eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('N.Y(U,{4n:"1.6.0.3",2M:{26:!!10.4o("26").3r},3s:q(){9.3t("27");p(/^(4p?:\\/\\/|\\/)/.4q(s.o.V)){s.V=s.o.V}11{r a=/1G(?:-[\\w\\d.]+)?\\.4r(.*)/;s.V=(($$("4s[28]").3u(q(b){M b.28.29(a)})||{}).28||"").2N(a,"")+s.o.V}p(!9.2M.26){p(10.4t>=8&&!10.3v.2j){10.3v.2O("2j","4u:4v-4w-4x:4y","#2k#3w")}11{10.1c("3x:2P",q(){10.4z().4A("2j\\\\:*","4B: 2Q(#2k#3w);")})}}s.2l();I.1c(2R,"2S",9.2S)},3t:q(a){p((4C 2R[a]=="4D")||(9.2T(2R[a].4E)<9.2T(9["3y"+a]))){3z("U 4F "+a+" >= "+9["3y"+a]);}},2T:q(a){r b=a.2N(/3A.*|\\./g,"");b=4G(b+"0".4H(4-b.2U));M a.4I("3A")>-1?b-1:b},4J:$w("3B 4K"),1S:q(a){p(27.2V.3C){M a}a=a.2m(q(f,d){r b=N.2n(9)?9:9.C,c=d.4L;4M(c&&c!=b){4N{c=c.4O}4P(g){c=b}}p(c==b){M}f(d)});M a},2W:q(a){M(a>0)?(-1*a):(a).4Q()},2S:q(){s.3D()}});N.Y(s,{1A:[],13:[],2l:q(){9.2o=9.1o},1m:(q(a){M{1i:(a?"1T":"1i"),15:(a?"1H":"15"),1T:(a?"1T":"1i"),1H:(a?"1H":"15")}})(27.2V.3C),3E:{1i:"1i",15:"15",1T:"1i",1H:"15"},2a:{D:"2X",2X:"D",v:"1p",1p:"v",1U:"1U",1d:"1f",1f:"1d"},3F:{H:"1d",G:"1f"},2Y:q(a){M!!1V[1]?9.2a[a]:a},1j:(q(b){r a=J 4R("4S ([\\\\d.]+)").4T(b);M a?(3G(a[1])<7):X})(4U.4V),2Z:(27.2V.4W&&!10.4X),2O:q(a){9.1A.2p(a)},1B:q(a){r b=9.1A.3u(q(c){M c.C==$(a)});p(b){b.3H();p(b.17){b.F.1B();p(s.1j){b.1q.1B()}}9.1A=9.1A.3I(b)}a.1G=2b},3D:q(){9.1A.30(q(a){9.1B(a.C)}.1g(9))},2q:q(c){p(c==9.3J){M}p(9.13.2U===0){9.2o=9.o.1o;31(r b=0,a=9.1A.2U;b<a;b++){9.1A[b].F.u({1o:9.o.1o})}}c.F.u({1o:9.2o++});p(c.R){c.R.u({1o:9.2o})}9.3J=c},3K:q(a){9.32(a);9.13.2p(a)},32:q(a){9.13=9.13.3I(a)},3L:q(){s.13.1I("T")},W:q(b,f){b=$(b),f=$(f);r k=N.Y({1e:{x:0,y:0},O:X},1V[2]||{});r d=k.1u||f.2r();d.D+=k.1e.x;d.v+=k.1e.y;r c=k.1u?[0,0]:f.3M(),a=10.1C.2s(),g=k.1u?"1W":"18";d.D+=(-1*(c[0]-a[0]));d.v+=(-1*(c[1]-a[1]));p(k.1u){r e=[0,0];e.H=0;e.G=0}r i={C:b.1X()},j={C:N.2c(d)};i[g]=k.1u?e:f.1X();j[g]=N.2c(d);31(r h 3N j){3O(k[h]){S"4Y":S"4Z":j[h].D+=i[h].H;19;S"51":j[h].D+=(i[h].H/2);19;S"52":j[h].D+=i[h].H;j[h].v+=(i[h].G/2);19;S"53":S"54":j[h].v+=i[h].G;19;S"55":S"56":j[h].D+=i[h].H;j[h].v+=i[h].G;19;S"57":j[h].D+=(i[h].H/2);j[h].v+=i[h].G;19;S"58":j[h].v+=(i[h].G/2);19}}d.D+=-1*(j.C.D-j[g].D);d.v+=-1*(j.C.v-j[g].v);p(k.O){b.u({D:d.D+"B",v:d.v+"B"})}M d}});s.2l();r 59=5a.3P({2l:q(c,e){9.C=$(c);p(!9.C){3z("U: I 5b 5c, 5d 3P a 17.");M}s.1B(9.C);r a=(N.2t(e)||N.2n(e)),b=a?1V[2]||[]:e;9.1r=a?e:2b;p(b.1Y){b=N.Y(N.2c(U.33[b.1Y]),b)}9.o=N.Y(N.Y({1k:X,1h:0,34:"#5e",1n:0,K:s.o.K,1a:s.o.5f,1v:!(b.1b&&b.1b=="1Z")?0.14:X,1D:X,1w:"1H",3Q:X,W:b.W,1e:b.W?{x:0,y:0}:{x:16,y:16},1J:(b.W&&!b.W.1u)?1l:X,1b:"2u",E:X,1Y:"2k",18:9.C,12:X,1C:(b.W&&!b.W.1u)?X:1l,H:X},U.33["2k"]),b);9.18=$(9.o.18);9.1n=9.o.1n;9.1h=(9.1n>9.o.1h)?9.1n:9.o.1h;p(9.o.V){9.V=9.o.V.35("://")?9.o.V:s.V+9.o.V}11{9.V=s.V+"5g/"+(9.o.1Y||"")+"/"}p(!9.V.5h("/")){9.V+="/"}p(N.2t(9.o.E)){9.o.E={O:9.o.E}}p(9.o.E.O){9.o.E=N.Y(N.2c(U.33[9.o.1Y].E)||{},9.o.E);9.o.E.O=[9.o.E.O.29(/[a-z]+/)[0].2e(),9.o.E.O.29(/[A-Z][a-z]+/)[0].2e()];9.o.E.1E=["D","2X"].3R(9.o.E.O[0])?"1d":"1f";9.1s={1d:X,1f:X}}p(9.o.1k){9.o.1k.o=N.Y({36:27.5i},9.o.1k.o||{})}9.1m=$w("5j 3B").3R(9.C.5k.2e())?s.3E:s.1m;p(9.o.W.1u){r d=9.o.W.1t.29(/[a-z]+/)[0].2e();9.1W=s.2a[d]+s.2a[9.o.W.1t.29(/[A-Z][a-z]+/)[0].2e()].2v()}9.3S=(s.2Z&&9.1n);9.3T();s.2O(9);9.3U();U.Y(9)},3T:q(){9.F=J I("Q",{K:"1G"}).u({1o:s.o.1o});p(9.3S){9.F.T=q(){9.u("D:-3V;v:-3V;1K:2w;");M 9};9.F.P=q(){9.u("1K:13");M 9};9.F.13=q(){M(9.37("1K")=="13"&&3G(9.37("v").2N("B",""))>-5l)}}9.F.T();p(s.1j){9.1q=J I("5m",{K:"1q",28:"5n:X;",5o:0}).u({2x:"2f",1o:s.o.1o-1,5p:0})}p(9.o.1k){9.20=9.20.2m(9.38)}9.1t=J I("Q",{K:"1r"});9.12=J I("Q",{K:"12"}).T();p(9.o.1a||(9.o.1w.C&&9.o.1w.C=="1a")){9.1a=J I("Q",{K:"2g"}).21(9.V+"2g.2y")}},2z:q(){p(10.2P){9.39();9.3W=1l;M 1l}11{p(!9.3W){10.1c("3x:2P",9.39);M X}}},39:q(){$(10.3a).L(9.F);p(s.1j){$(10.3a).L(9.1q)}p(9.o.1k){$(10.3a).L(9.R=J I("Q",{K:"5q"}).21(9.V+"R.5r").T())}r g="F";p(9.o.E.O){9.E=J I("Q",{K:"5s"}).u({G:9.o.E[9.o.E.1E=="1f"?"G":"H"]+"B"});r b=9.o.E.1E=="1d";9[g].L(9.3b=J I("Q",{K:"5t 2A"}).L(9.3X=J I("Q",{K:"5u 2A"})));9.E.L(9.1L=J I("Q",{K:"5v"}).u({G:9.o.E[b?"H":"G"]+"B",H:9.o.E[b?"G":"H"]+"B"}));p(s.1j&&!9.o.E.O[1].3Y().35("5w")){9.1L.u({2x:"5x"})}g="3X"}p(9.1h){r d=9.1h,f;9[g].L(9.22=J I("5y",{K:"22"}).L(9.23=J I("3c",{K:"23 3d"}).u("G: "+d+"B").L(J I("Q",{K:"2B 5z"}).L(J I("Q",{K:"24"}))).L(f=J I("Q",{K:"5A"}).u({G:d+"B"}).L(J I("Q",{K:"3Z"}).u({1x:"0 "+d+"B",G:d+"B"}))).L(J I("Q",{K:"2B 5B"}).L(J I("Q",{K:"24"})))).L(9.3e=J I("3c",{K:"3e 3d"}).L(9.3f=J I("Q",{K:"3f"}).u("2C: 0 "+d+"B"))).L(9.40=J I("3c",{K:"40 3d"}).u("G: "+d+"B").L(J I("Q",{K:"2B 5C"}).L(J I("Q",{K:"24"}))).L(f.5D(1l)).L(J I("Q",{K:"2B 5E"}).L(J I("Q",{K:"24"})))));g="3f";r c=9.22.3g(".24");$w("5F 5G 5H 5I").30(q(j,h){p(9.1n>0){U.41(c[h],j,{1M:9.o.34,1h:d,1n:9.o.1n})}11{c[h].2D("42")}c[h].u({H:d+"B",G:d+"B"}).2D("24"+j.2v())}.1g(9));9.22.3g(".3Z",".3e",".42").1I("u",{1M:9.o.34})}9[g].L(9.17=J I("Q",{K:"17 "+9.o.K}).L(9.25=J I("Q",{K:"25"}).L(9.12)));p(9.o.H){r e=9.o.H;p(N.5J(e)){e+="B"}9.17.u("H:"+e)}p(9.E){r a={};a[9.o.E.1E=="1d"?"v":"1p"]=9.E;9.F.L(a);9.2h()}9.17.L(9.1t);p(!9.o.1k){9.3h({12:9.o.12,1r:9.1r})}},3h:q(e){r a=9.F.37("1K");9.F.u("G:1N;H:1N;1K:2w").P();p(9.1h){9.23.u("G:0");9.23.u("G:0")}p(e.12){9.12.P().43(e.12);9.25.P()}11{p(!9.1a){9.12.T();9.25.T()}}p(N.2n(e.1r)){e.1r.P()}p(N.2t(e.1r)||N.2n(e.1r)){9.1t.43(e.1r)}9.17.u({H:9.17.44()+"B"});9.F.u("1K:13").P();9.17.P();r c=9.17.1X(),b={H:c.H+"B"},d=[9.F];p(s.1j){d.2p(9.1q)}p(9.1a){9.12.P().L({v:9.1a});9.25.P()}p(e.12||9.1a){9.25.u("H: 3i%")}b.G=2b;9.F.u({1K:a});9.1t.2D("2A");p(e.12||9.1a){9.12.2D("2A")}p(9.1h){9.23.u("G:"+9.1h+"B");9.23.u("G:"+9.1h+"B");b="H: "+(c.H+2*9.1h)+"B";d.2p(9.22)}d.1I("u",b);p(9.E){9.2h();p(9.o.E.1E=="1d"){9.F.u({H:9.F.44()+9.o.E.G+"B"})}}9.F.T()},3U:q(){9.3j=9.20.1y(9);9.45=9.T.1y(9);p(9.o.1J&&9.o.1b=="2u"){9.o.1b="1i"}p(9.o.1b==9.o.1w){9.1O=9.46.1y(9);9.C.1c(9.o.1b,9.1O)}p(9.1a){9.1a.1c("1i",q(e){e.21(9.V+"5K.2y")}.1g(9,9.1a)).1c("15",q(e){e.21(9.V+"2g.2y")}.1g(9,9.1a))}r c={C:9.1O?[]:[9.C],18:9.1O?[]:[9.18],1t:9.1O?[]:[9.F],1a:[],2f:[]},a=9.o.1w.C;9.3k=a||(!9.o.1w?"2f":"C");9.1P=c[9.3k];p(!9.1P&&a&&N.2t(a)){9.1P=9.1t.3g(a)}r d={1T:"1i",1H:"15"};$w("P T").30(q(h){r g=h.2v(),f=(9.o[h+"47"].3l||9.o[h+"47"]);9[h+"48"]=f;p(["1T","1H","1i","15"].35(f)){9[h+"48"]=(9.1m[f]||f);9["3l"+g]=U.1S(9["3l"+g])}}.1g(9));p(!9.1O){9.C.1c(9.o.1b,9.3j)}p(9.1P){9.1P.1I("1c",9.5L,9.45)}p(!9.o.1J&&9.o.1b=="1Z"){9.2E=9.O.1y(9);9.C.1c("2u",9.2E)}9.49=9.T.2m(q(g,f){r e=f.5M(".2g");p(e){e.5N();f.5O();g(f)}}).1y(9);p(9.1a||(9.o.1w&&(9.o.1w.C==".2g"))){9.F.1c("1Z",9.49)}p(9.o.1b!="1Z"&&(9.3k!="C")){9.2F=U.1S(q(){9.1F("P")}).1y(9);9.C.1c(9.1m.15,9.2F)}r b=[9.C,9.F];9.3m=U.1S(q(){s.2q(9);9.2G()}).1y(9);9.3n=U.1S(9.1D).1y(9);b.1I("1c",9.1m.1i,9.3m).1I("1c",9.1m.15,9.3n);p(9.o.1k&&9.o.1b!="1Z"){9.2H=U.1S(9.4a).1y(9);9.C.1c(9.1m.15,9.2H)}},3H:q(){p(9.o.1b==9.o.1w){9.C.1z(9.o.1b,9.1O)}11{9.C.1z(9.o.1b,9.3j);p(9.1P){9.1P.1I("1z")}}p(9.2E){9.C.1z("2u",9.2E)}p(9.2F){9.C.1z("15",9.2F)}9.F.1z();9.C.1z(9.1m.1i,9.3m).1z(9.1m.15,9.3n);p(9.2H){9.C.1z(9.1m.15,9.2H)}},38:q(c,b){p(!9.17){p(!9.2z()){M}}9.O(b);p(9.2I){M}11{p(9.4b){c(b);M}}9.2I=1l;r e=b.5P(),d={2i:{1Q:e.x,1R:e.y}};r a=N.2c(9.o.1k.o);a.36=a.36.2m(q(g,f){9.3h({12:9.o.12,1r:f.5Q});9.O(d);(q(){g(f);r h=(9.R&&9.R.13());p(9.R){9.1F("R");9.R.1B();9.R=2b}p(h){9.P()}9.4b=1l;9.2I=2b}.1g(9)).1v(0.6)}.1g(9));9.5R=I.P.1v(9.o.1v,9.R);9.F.T();9.2I=1l;9.R.P();9.5S=(q(){J 5T.5U(9.o.1k.2Q,a)}.1g(9)).1v(9.o.1v);M X},4a:q(){9.1F("R")},20:q(a){p(!9.17){p(!9.2z()){M}}9.O(a);p(9.F.13()){M}9.1F("P");9.5V=9.P.1g(9).1v(9.o.1v)},1F:q(a){p(9[a+"4c"]){5W(9[a+"4c"])}},P:q(){p(9.F.13()){M}p(s.1j){9.1q.P()}p(9.o.3Q){s.3L()}s.3K(9);9.17.P();9.F.P();p(9.E){9.E.P()}9.C.4d("1G:5X")},1D:q(a){p(9.o.1k){p(9.R&&9.o.1b!="1Z"){9.R.T()}}p(!9.o.1D){M}9.2G();9.5Y=9.T.1g(9).1v(9.o.1D)},2G:q(){p(9.o.1D){9.1F("1D")}},T:q(){9.1F("P");9.1F("R");p(!9.F.13()){M}9.4e()},4e:q(){p(s.1j){9.1q.T()}p(9.R){9.R.T()}9.F.T();(9.22||9.17).P();s.32(9);9.C.4d("1G:2w")},46:q(a){p(9.F&&9.F.13()){9.T(a)}11{9.20(a)}},2h:q(){r c=9.o.E,b=1V[0]||9.1s,d=s.2Y(c.O[0],b[c.1E]),f=s.2Y(c.O[1],b[s.2a[c.1E]]),a=9.1n||0;9.1L.21(9.V+d+f+".2y");p(c.1E=="1d"){r e=(d=="D")?c.G:0;9.3b.u("D: "+e+"B;");9.1L.u({"2J":d});9.E.u({D:0,v:(f=="1p"?"3i%":f=="1U"?"50%":0),5Z:(f=="1p"?-1*c.H:f=="1U"?-0.5*c.H:0)+(f=="1p"?-1*a:f=="v"?a:0)+"B"})}11{9.3b.u(d=="v"?"1x: 0; 2C: "+c.G+"B 0 0 0;":"2C: 0; 1x: 0 0 "+c.G+"B 0;");9.E.u(d=="v"?"v: 0; 1p: 1N;":"v: 1N; 1p: 0;");9.1L.u({1x:0,"2J":f!="1U"?f:"2f"});p(f=="1U"){9.1L.u("1x: 0 1N;")}11{9.1L.u("1x-"+f+": "+a+"B;")}p(s.2Z){p(d=="1p"){9.E.u({O:"4f",60:"61",v:"1N",1p:"1N","2J":"D",H:"3i%",1x:(-1*c.G)+"B 0 0 0"});9.E.1Y.2x="4g"}11{9.E.u({O:"4h","2J":"2f",1x:0})}}}9.1s=b},O:q(b){p(!9.17){p(!9.2z()){M}}s.2q(9);p(s.1j){r a=9.F.1X();p(!9.2K||9.2K.G!=a.G||9.2K.H!=a.H){9.1q.u({H:a.H+"B",G:a.G+"B"})}9.2K=a}p(9.o.W){r j,h;p(9.1W){r k=10.1C.2s(),c=b.2i||{};r g,i=2;3O(9.1W.3Y()){S"62":S"63":g={x:0-i,y:0-i};19;S"64":g={x:0,y:0-i};19;S"65":S"66":g={x:i,y:0-i};19;S"67":g={x:i,y:0};19;S"68":S"69":g={x:i,y:i};19;S"6a":g={x:0,y:i};19;S"6b":S"6c":g={x:0-i,y:i};19;S"6d":g={x:0-i,y:0};19}g.x+=9.o.1e.x;g.y+=9.o.1e.y;j=N.Y({1e:g},{C:9.o.W.1t,1W:9.1W,1u:{v:c.1R||2L.1R(b)-k.v,D:c.1Q||2L.1Q(b)-k.D}});h=s.W(9.F,9.18,j);p(9.o.1C){r n=9.3o(h),m=n.1s;h=n.O;h.D+=m.1f?2*U.2W(g.x-9.o.1e.x):0;h.v+=m.1f?2*U.2W(g.y-9.o.1e.y):0;p(9.E&&(9.1s.1d!=m.1d||9.1s.1f!=m.1f)){9.2h(m)}}h={D:h.D+"B",v:h.v+"B"};9.F.u(h)}11{j=N.Y({1e:9.o.1e},{C:9.o.W.1t,18:9.o.W.18});h=s.W(9.F,9.18,N.Y({O:1l},j));h={D:h.D+"B",v:h.v+"B"}}p(9.R){r e=s.W(9.R,9.18,N.Y({O:1l},j))}p(s.1j){9.1q.u(h)}}11{r f=9.18.2r(),c=b.2i||{},h={D:((9.o.1J)?f[0]:c.1Q||2L.1Q(b))+9.o.1e.x,v:((9.o.1J)?f[1]:c.1R||2L.1R(b))+9.o.1e.y};p(!9.o.1J&&9.C!==9.18){r d=9.C.2r();h.D+=-1*(d[0]-f[0]);h.v+=-1*(d[1]-f[1])}p(!9.o.1J&&9.o.1C){r n=9.3o(h),m=n.1s;h=n.O;p(9.E&&(9.1s.1d!=m.1d||9.1s.1f!=m.1f)){9.2h(m)}}h={D:h.D+"B",v:h.v+"B"};9.F.u(h);p(9.R){9.R.u(h)}p(s.1j){9.1q.u(h)}}},3o:q(c){r e={1d:X,1f:X},d=9.F.1X(),b=10.1C.2s(),a=10.1C.1X(),g={D:"H",v:"G"};31(r f 3N g){p((c[f]+d[g[f]]-b[f])>a[g[f]]){c[f]=c[f]-(d[g[f]]+(2*9.o.1e[f=="D"?"x":"y"]));p(9.E){e[s.3F[g[f]]]=1l}}}M{O:c,1s:e}}});N.Y(U,{41:q(d,g){r j=1V[2]||9.o,f=j.1n,c=j.1h,e={v:(g.4i(0)=="t"),D:(g.4i(1)=="l")};p(9.2M.26){r b=J I("26",{K:"6e"+g.2v(),H:c+"B",G:c+"B"});d.L(b);r i=b.3r("2d");i.6f=j.1M;i.6g((e.D?f:c-f),(e.v?f:c-f),f,0,6h.6i*2,1l);i.6j();i.4j((e.D?f:0),0,c-f,c);i.4j(0,(e.v?f:0),c,c-f)}11{r h;d.L(h=J I("Q").u({H:c+"B",G:c+"B",1x:0,2C:0,2x:"4g",O:"4f",6k:"2w"}));r a=J I("2j:6l",{6m:j.1M,6n:"6o",6p:j.1M,6q:(f/c*0.5).6r(2)}).u({H:2*c-1+"B",G:2*c-1+"B",O:"4h",D:(e.D?0:(-1*c))+"B",v:(e.v?0:(-1*c))+"B"});h.L(a);a.4k=a.4k}}});I.6s({21:q(c,b){c=$(c);r a=N.Y({4l:"v D",3p:"6t-3p",3q:"6u",1M:""},1V[2]||{});c.u(s.1j?{6v:"6w:6x.6y.6z(28=\'"+b+"\'\', 3q=\'"+a.3q+"\')"}:{6A:a.1M+" 2Q("+b+") "+a.4l+" "+a.3p});M c}});U.4m={P:q(){s.2q(9);9.2G();r d={};p(9.o.W){d.2i={1Q:0,1R:0}}11{r a=9.18.2r(),c=9.18.3M(),b=10.1C.2s();a.D+=(-1*(c[0]-b[0]));a.v+=(-1*(c[1]-b[1]));d.2i={1Q:a.D,1R:a.v}}p(9.o.1k){9.38(d)}11{9.20(d)}9.1D()}};U.Y=q(a){a.C.1G={};N.Y(a.C.1G,{P:U.4m.P.1g(a),T:a.T.1g(a),1B:s.1B.1g(s,a.C)})};U.3s();',62,409,'|||||||||this|||||||||||||||options|if|function|var|Tips||setStyle|top||||||px|element|left|stem|wrapper|height|width|Element|new|className|insert|return|Object|position|show|div|loader|case|hide|Prototip|images|hook|false|extend||document|else|title|visible||mouseout||tooltip|target|break|closeButton|showOn|observe|horizontal|offset|vertical|bind|border|mouseover|fixIE|ajax|true|useEvent|radius|zIndex|bottom|iframeShim|content|stemInverse|tip|mouse|delay|hideOn|margin|bindAsEventListener|stopObserving|tips|remove|viewport|hideAfter|orientation|clearTimer|prototip|mouseleave|invoke|fixed|visibility|stemImage|backgroundColor|auto|eventToggle|hideTargets|pointerX|pointerY|capture|mouseenter|middle|arguments|mouseHook|getDimensions|style|click|showDelayed|setPngBackground|borderFrame|borderTop|prototip_Corner|toolbar|canvas|Prototype|src|match|_inverse|null|clone||toLowerCase|none|close|positionStem|fakePointer|ns_vml|default|initialize|wrap|isElement|zIndexTop|push|raise|cumulativeOffset|getScrollOffsets|isString|mousemove|capitalize|hidden|display|png|build|clearfix|prototip_CornerWrapper|padding|addClassName|eventPosition|eventCheckDelay|cancelHideAfter|ajaxHideEvent|ajaxContentLoading|float|iframeShimDimensions|Event|support|replace|add|loaded|url|window|unload|convertVersionString|length|Browser|toggleInt|right|inverseStem|WebKit419|each|for|removeVisible|Styles|borderColor|include|onComplete|getStyle|ajaxShow|_build|body|stemWrapper|li|borderRow|borderMiddle|borderCenter|select|_update|100|eventShow|hideElement|event|activityEnter|activityLeave|getPositionWithinViewport|repeat|sizingMethod|getContext|start|require|find|namespaces|VML|dom|REQUIRED_|throw|_|input|IE|removeAll|specialEvent|_stemTranslation|parseFloat|deactivate|without|_highest|addVisibile|hideAll|cumulativeScrollOffset|in|switch|create|hideOthers|member|fixSafari2|setup|activate|9500px|_isBuilding|stemBox|toUpperCase|prototip_Between|borderBottom|createCorner|prototip_Fill|update|getWidth|eventHide|toggle|On|Action|buttonEvent|ajaxHide|ajaxContentLoaded|Timer|fire|afterHide|relative|block|absolute|charAt|fillRect|outerHTML|align|Methods|REQUIRED_Prototype|createElement|https|test|js|script|documentMode|urn|schemas|microsoft|com|vml|createStyleSheet|addRule|behavior|typeof|undefined|Version|requires|parseInt|times|indexOf|_captureTroubleElements|textarea|relatedTarget|while|try|parentNode|catch|abs|RegExp|MSIE|exec|navigator|userAgent|WebKit|evaluate|topRight|rightTop||topMiddle|rightMiddle|bottomLeft|leftBottom|bottomRight|rightBottom|bottomMiddle|leftMiddle|Tip|Class|not|available|cannot|000000|closeButtons|styles|endsWith|emptyFunction|area|tagName|9500|iframe|javascript|frameBorder|opacity|prototipLoader|gif|prototip_Stem|prototip_StemWrapper|prototip_StemBox|prototip_StemImage|MIDDLE|inline|ul|prototip_CornerWrapperTopLeft|prototip_BetweenCorners|prototip_CornerWrapperTopRight|prototip_CornerWrapperBottomLeft|cloneNode|prototip_CornerWrapperBottomRight|tl|tr|bl|br|isNumber|close_hover|hideAction|findElement|blur|stop|pointer|responseText|loaderTimer|ajaxTimer|Ajax|Request|showTimer|clearTimeout|shown|hideAfterTimer|marginTop|clear|both|LEFTTOP|TOPLEFT|TOPMIDDLE|TOPRIGHT|RIGHTTOP|RIGHTMIDDLE|RIGHTBOTTOM|BOTTOMRIGHT|BOTTOMMIDDLE|BOTTOMLEFT|LEFTBOTTOM|LEFTMIDDLE|cornerCanvas|fillStyle|arc|Math|PI|fill|overflow|roundrect|fillcolor|strokeWeight|1px|strokeColor|arcSize|toFixed|addMethods|no|scale|filter|progid|DXImageTransform|Microsoft|AlphaImageLoader|background'.split('|'),0,{}));var Pluit={};var sliderIntervalId=0;Pluit.Carousel=Class.create({initialize:function(elCarousel,options){this.initOptions(options);this.initElements(elCarousel);this.initViewport();this.initNavigation();var el=this;sliderIntervalId=setInterval(function(){el.moveNext();},(5*1000));},initOptions:function(options){this.options={circular:false,hideAutoNav:false,animDuration:0.5,viewportClassName:'viewport',navClassName:'nav',prevClassName:'prev',nextClassName:'next',pagesClassName:'pages',pageClassNamePrefix:'page-',activeClassName:'active'};Object.extend(this.options,options||{});},initElements:function(elCarousel){this.elCarousel=$(elCarousel);this.elViewport=this.elCarousel.down('.'+this.options.viewportClassName);this.elSlidesPanel=this.elViewport.firstDescendant();this.elSlides=this.elSlidesPanel.childElements();this.elNav=this.elCarousel.down('.'+this.options.navClassName);this.maxPageNo=this.elSlides.length;this.prevPageNo=this.curPageNo=1;this.elSlides.each(function(s,index){if(index!=0){s.hide();}});},initViewport:function(){if(this.elSlides.length===0){return;}
this.viewportDimension=this.getViewportDimension();this.elViewport.setStyle({width:this.viewportDimension[0]+'px',height:this.viewportDimension[1]+'px'});this.elViewport.observe('click',this.onViewportClick.bindAsEventListener(this));},initNavigation:function(){this.elNav=this.elCarousel.down('.nav');if((!this.elNav)&&(!this.options.hideAutoNav)){this.elNav=this.buildNavigation();this.elNav=$(this.elNav);}
if(!this.elNav){return;}
this.elNav.observe('click',this.onNavClick.bindAsEventListener(this));},buildNavigation:function(){var elNav=document.createElement('ul');elNav.className='nav';var navHTML='';if(this.maxPageNo>0){navHTML+='<li class="'+this.options.pagesClassName+'"><ul>';for(var i=0;i<this.maxPageNo;i++){navHTML+='<li class="';if(i===0){navHTML+=this.options.activeClassName+' ';}
navHTML+=this.options.pageClassNamePrefix+(i+1)+'"><a href="#">'+(i+1)+'</a></li>';}
navHTML+='</ul></li>';}
elNav.innerHTML=navHTML;this.elCarousel.insert({top:elNav});return elNav;},getViewportDimension:function(){var firstPage=this.elSlides[0];return[firstPage.getWidth(),firstPage.getHeight()];},onNavClick:function(e){clearInterval(sliderIntervalId);var navItem=e.findElement('li');if(!navItem){return;}
var className=navItem.className;if(className===this.options.prevClassName){this.movePrevious();}else if(className===this.options.nextClassName){this.moveNext();}else if(className.match(this.options.pageClassNamePrefix)){var pageNo=parseInt(className.split('-')[1],10);this.movePage(pageNo);}
e.preventDefault();},onViewportClick:function(e){var parentNode=e.element().parentNode;if((parentNode.tagName!=='A')&&(parentNode.tagName==='LI')){this.moveNext();}},moveNext:function(){this.movePage(this.curPageNo+1);},movePrevious:function(){this.movePage(this.curPageNo-1);},movePage:function(pageNo){if(this.onTheMove){return;}
if(pageNo===this.curPageNo){return;}
pageNo=this.checkPageNo(pageNo,this.curPageNo);var distance=this.getMoveDistance(pageNo,this.curPageNo);this.onTheMove=true;this.activatePageNav(pageNo);var currentSlide=this.elSlidesPanel.childElements()[this.curPageNo-1];var nextSlide=this.elSlidesPanel.childElements()[pageNo-1];new Effect.Fade(currentSlide,{duration:0.8});new Effect.Appear(nextSlide,{duration:1.0,afterFinish:function(){this.onTheMove=false;}.bind(this)});this.curPageNo=pageNo;},isMovePrevious:function(pageNo,curPageNo){if(pageNo<curPageNo){return true;}},getMoveDistance:function(pageNo,curPageNo){var distance=0;if(pageNo===curPageNo){return distance;}
var isPrevious=this.isMovePrevious(pageNo,curPageNo);if(isPrevious){while(pageNo<curPageNo){distance+=this.elSlides[pageNo-1].getWidth();pageNo+=1;}
return distance;}else{while(pageNo>curPageNo){distance+=this.elSlides[pageNo-2].getWidth();pageNo-=1;}
return-distance;}},activatePageNav:function(pageNo){if(!this.elNav){return;}
var elNavItem=this.elNav.down('.page-'+pageNo);var elCurNavItem=this.elNav.down('.page-'+this.curPageNo);if(!elNavItem&&!elCurNavItem){return;}
elCurNavItem.removeClassName(this.options.activeClassName);elNavItem.addClassName(this.options.activeClassName);},checkPageNo:function(pageNo,curPageNo){var isPrevious=this.isMovePrevious(pageNo,curPageNo);if(isPrevious){if(pageNo<1){if(this.options.circular){return this.maxPageNo;}else{return 1;}}}else{if(pageNo>this.maxPageNo){if(this.options.circular){return 1;}else{return this.maxPageNo;}}}
return pageNo;}});Pluit.Carousel.init=function(){var cssRules=$A(arguments);var options=null;if(typeof cssRules.last()==='object'){options=cssRules.pop();}
if(cssRules.length===0){cssRules=['.pluit-carousel'];}
document.observe("dom:loaded",function(){$A(cssRules).each(function(cssRule){$$(cssRule).each(function(carousel){new Pluit.Carousel(carousel,options);}.bind(this));});});};