(function(){var b=this;function a(b){var a=0;try{a=new ActiveXObject("Microsoft.XMLDOM");var c=new RegExp("<!DOCTYPE.*?>","i"),d=b.responseText.replace(c,"");a.loadXML(d)}catch(g){try{var f=b.responseXML.documentElement;a=b.responseXML}catch(h){if(window.DOMParser)try{var e=new DOMParser;a=e.parseFromString(b.responseText.toString(),"text/xml")}catch(i){}}}return a}b.getDocRoot=function(b){var c=b.responseXML||a(b);return c?c.documentElement:0}}).ns("Msn.Xml");String.addMethod("parseJSON",function(){try{if(/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(this))return eval("("+this+")")}catch(a){}return false});(function(){var a=this,b=document,d=Msn.DOM,c=d.Event;a.HDock=new Msn.Enum("Left","Center","Right","Cursor","Screen");a.VDock=new Msn.Enum("Top","Middle","Bottom","Cursor","Screen");a.HAnchor=new Msn.Enum("Left","Center","Right","None");a.VAnchor=new Msn.Enum("Top","Middle","Bottom","None");a.getLayoutRoot=function(){return b.compatMode=="CSS1Compat"?b.documentElement:b.body};a.getMouseLocation=function(a,d){a=c(a);var b=Msn.Ui.getLocation(d||Msn.Ui.getLayoutRoot());return new Msn.Ui.Point(a.clientX+Msn.Ui.getLayoutRoot().scrollLeft-b.left,a.clientY+Msn.Ui.getLayoutRoot().scrollTop-b.top)};a.getLocation=function(b,f){if(!b)return Msn.Ui.Rect.Empty;var a=new Msn.Ui.Rect;a.source=b;var d=b.currentStyle,g=["Top","Left","Right","Bottom"];for(var e=0;e<g.length;e++){var c=g[e];a["margin"+c]=d&&d["margin"+c]!="auto"?parseInt(d["margin"+c]):0;a["border"+c]=d&&d["border"+c+"Width"]!="auto"?parseInt(d["border"+c+"Width"]):0;a["padding"+c]=d&&d["padding"+c]!="auto"?parseInt(d["padding"+c]):0}a.height=b.offsetHeight;a.width=b.offsetWidth;a.left=b.offsetLeft;a.top=b.offsetTop;b=b.offsetParent;var h=Msn.Ui.getLayoutRoot();while(b&&(!f||b!=f)){a.left+=b.offsetLeft-(h!=b?parseInt(b.scrollLeft):0);a.top+=b.offsetTop-(h!=b?parseInt(b.scrollTop):0);b=b.offsetParent}if(document.compatMode=="CSS1Compat"){a.contentWidth=a.source.offsetWidth-a.borderLeft-a.borderRight-a.paddingLeft-a.paddingRight-a.marginLeft-a.marginRight;a.contentHeight=a.source.offsetHeight-a.borderTop-a.borderBottom-a.paddingTop-a.paddingBottom-a.marginTop-a.marginBottom}else{a.contentWidth=a.source.offsetWidth;a.contentHeight=a.source.offsetHeight}a.bottom=a.top+a.height-a.marginBottom;a.right=a.left+a.width-a.marginRight;return a};a.getContainer=function(){if(a._container==null){a._container=document.createElement("span");document.body.insertAdjacentElement("afterBegin",a._container)}return a._container}}).ns("Msn.Ui");(function(b,c){var a=this;a.x=b;a.y=c;a.left=a.x;a.top=a.y;return a}).as("Msn.Ui.Point");Msn.Ui.Point.prototype={offset:function(b,c){var a=this;a.y+=c;a.x+=b;a.left=a.x;a.top=a.y;return a},toString:function(){var a=this;return "Msn.Ui.Point - {x:"+a.x+",y:"+a.y+",left:"+a.left+",top:"+a.top+"}"}};(function(d,e,c,b){var a=this;a.top=e;a.bottom=e+b;a.left=d;a.right=d+c;a.width=c;a.height=b}).as("Msn.Ui.Rect");Msn.Ui.Rect.prototype={inflate:function(c,b){var a=this;a.width+=c;a.height+=b;a.right=a.left+a.left;a.bottom=a.top+a.height},offset:function(b,c){var a=this;a.top=c;a.bottom+=c;a.left=b;a.right+=b},contains:function(b){var a=this;return b.x>=a.left&&b.x<=a.width+a.left&&b.y>=a.top&&b.y<=a.height+a.top},isEmpty:function(){var a=this;return a.width<=0||a.height<=0},toString:function(){var a=this;return "Msn.Ui.Rect - {top:"+a.top+",left:"+a.left+",right:"+a.right+",bottom:"+a.bottom+"}"}};Msn.Ui.Rect.Empty=new Msn.Ui.Rect(0,0,0,0);(function(b){var a=this;a.state={};a.state.contents=b;a.state.opacity=100}).as("Msn.Ui.Control");Msn.Ui.Control.prototype={setContents:function(b){var a=this.state.contents;a=b;return a},getContents:function(){return this.state.contents},addContent:function(a){var b=this.state.contents;switch(typeof a){case "object":b.appendChild(a);break;case "string":b.innerHTML+=a;break}},setOpacity:function(a){var c=this.state,b=c.contents;if(!!b&&typeof a!=="number"){c.opacity=a;b.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+(a>=0?Math.round(a):0)+")";b.style.opacity=a>=0?a/100:0}},getOpacity:function(){return this.state.opacity},setBounds:function(b){var a=this;a.setPosition(b);a.setSize(b)},getBounds:function(){return this.getLayoutRect()},setPosition:function(b){var a=this.state.contents;if(!a)return;var c=this.state.offset;if(!c)c=Msn.Ui.getLocation(a.offsetParent);a.style.top=b.top-(b.marginTop||0)-c.top+"px";a.style.left=b.left-(b.marginLeft||0)-c.left+"px"},getPosition:function(){return this.getLayoutRect()},setSize:function(a){var b=this.state.contents;if(typeof a.width=="number")b.style.width=parseInt(a.width)+"px";if(typeof a.height=="number")b.style.height=parseInt(a.height)+"px"},getSize:function(){return this.getLayoutRect()},getLayoutRect:function(){var a=this.state.contents;if(!a)return Msn.Ui.Rect.Empty;var b=Msn.Ui.getLocation(a);if(!b||b.isEmpty()){var c={visibility:(a.currentStyle?a.currentStyle.visibility:null)||a.style.visibility||"visible",display:(a.currentStyle?a.currentStyle.display:null)||a.style.display||"auto",position:(a.currentStyle?a.currentStyle.position:null)||a.style.position||null};a.style.visibility="hidden";a.style.display="block";b=Msn.Ui.getLocation(a);a.style.display=c.display;a.style.visibility=c.visibility}return b},setClip:function(b,d){var a=this.state.contents;if(!a)return;var c=!b?"rect('auto','auto','auto','auto')":"rect("+d+","+width+","+height+","+b+")";try{a.style.clip=c}catch(g){}},getClip:function(){return this.state.contents.style.clip},show:function(){var a=this.state.contents;if(!a)return;a.style.display="block"},hide:function(){var a=this.getContents();if(!a)return;a.style.display="none"},contains:function(a){return this.getLayoutRect().contains(a)},toString:function(){return "Msn.Ui.Control - {"+this.getLayoutRect.toString()+"}"},dispose:function(){this.state.contents=0;this.state={}}};(function(b){if(!(b instanceof Msn.Ui.Control)||b.nodeType&&b.nodeType==1)return;var c=this;c.state={};var a=c.state;if(b instanceof Msn.Ui.Control){a.owner=b;a.parent=b.getContents().parentNode}else{a.owner=new Msn.Ui.Control(b);a.parent=b.parentNode}a.container=document.createElement("div");var d=a.container;a.parent.appendChild(d);d.style.position="absolute";a.frame=docuement.createElement("div");var e=a.frame;d.appendChild(c);e.style.position="absolute";e.style.display="block";e.style.width="100%";e.style.height="100%";c.setContents(d);c.setOpacity(0);var f=a.owner.getContents().currentStyle.zIndex;d.style.zIndex=f=="auto"?-1:f-1;c.recalc()}).as("Msn.Ui.Frame",Msn.Ui.Control);Msn.Ui.Frame.setMethods({recalc:function(){var a=this,d=a.state.container,b=a.state.owner;if(!b)return;var c=b.getContents();if(!c||c.style.display=="none"){d.style.display="none";return}var e=b.getBounds();d.style.display=c.currentStyle.display;a.setBounds(e)},positionAt:function(d,a){var c=this,b=c.state;c.setBounds(d);if(a&&typeof a=="number"&&b&&b.container)b.container.style.zIndex=a},toString:function(){return "Msn.Ui.Frame - {"+this.getLayoutRect.toString()+"}"},dispose:function(){var a=this;a.state={}}});(function(){var a=this;a.state={};a.state.hdock=Msn.Ui.HDock.Screen;a.state.vdock=Msn.Ui.VDock.Screen;a.state.hanchor=Msn.Ui.HAnchor.Center;a.state.vanchor=Msn.Ui.VAnchor.Middle;a.state.padding=new Msn.Ui.Point(0,0);return a}).as("Msn.Ui.Panel",Msn.Ui.Control);Msn.Ui.Panel.setMethods({setPadding:function(b){var a=this.state;a.padding.x=b.x||a.padding.x;a.padding.y=b.y||a.padding.y;this.recalc()},setDock:function(b){var a=this.state;a.hdock=b.x||a.hdock;a.vdock=b.y||a.vdock;if(b.ev)a.ev=b.ev;this.recalc()},setAnchor:function(b){var a=this.state;a.hanchor=b.x||a.hanchor;a.vanchor=b.y||a.vanchor;this.recalc()},setContents:function(b){var d=this,a=d.state,e=Msn.DOM,c=e.AddClass;if(typeof b=="string"){a.contents=document.createElement("div");a.contents.innerHTML=b}else a.contents=b;c(a.contents,"Msn_Ui_Panel");a.contents.style.position="absolute";a.contents.style.display="none";if(!a.contents.parentNode||!a.contents.parentNode.tagName)Msn.Ui.getContainer().appendChild(a.contents);return a.contents},render:function(e,b,d){var a=this,c=a.state;if(!c.contents&&!!b)a.setContents(b);a.dockTo(e,null,d);a.show();return c.contents},getDockElement:function(){return this.state.owner.getContents()},getDockPosition:function(){var g=this,b=g.state,i=Msn.DOM,j=i.Event,e=Msn.Ui.Rect.Empty,k=g.getContents(),f=g.getLayoutRect();if((b.hdock!=Msn.Ui.HDock.Screen||b.vdock!=Msn.Ui.VDock.Screen)&&!(b.hdock==Msn.Ui.HDock.Cursor&&b.vdock==Msn.Ui.VDock.Cursor))e=b.owner.getBounds();var c=new Msn.Ui.Point,a=new Msn.Ui.Point;switch(b.hdock){case Msn.Ui.HDock.Left:c.x=e.left;break;case Msn.Ui.HDock.Center:c.x=(e.left+e.right)/2;break;case Msn.Ui.HDock.Right:c.x=e.right;break;case Msn.Ui.HDock.Cursor:c.x=Msn.Ui.getMouseLocation(b.ev).x;break;default:c.x=Msn.Ui.getLayoutRoot().scrollLeft+Msn.Ui.getLayoutRoot().clientWidth/2;break}switch(b.vdock){case Msn.Ui.VDock.Top:c.y=e.top;break;case Msn.Ui.VDock.Middle:c.y=(e.top+e.bottom)/2;break;case Msn.Ui.VDock.Bottom:c.y=e.bottom;break;case Msn.Ui.VDock.Cursor:c.y=Msn.Ui.getMouseLocation(b.ev).y;break;default:c.y=Msn.Ui.getLayoutRoot().scrollTop+Msn.Ui.getLayoutRoot().clientHeight/2;break}switch(b.hanchor){case Msn.Ui.HAnchor.Left:a.x=c.x;break;case Msn.Ui.HAnchor.Right:a.x=c.x-f.width;break;default:a.x=c.x-f.width/2;break}switch(b.vanchor){case Msn.Ui.VAnchor.Top:a.y=c.y;break;case Msn.Ui.VAnchor.Bottom:a.y=c.y-f.height;break;default:a.y=c.y-f.height/2;break}a.x+=b.padding.x;a.y+=b.padding.y;if(b.doRelocate){var d=Web.UI.getLayoutRoot();if(a.x+f.width>d.scrollLeft+d.clientWidth)a.x=d.scrollLeft+d.clientWidth-f.width;if(a.y+f.height>d.scrollTop+d.clientHeight)a.y=d.scrollTop+d.clientHeight-f.height;if(a.x<d.scrollLeft)a.x=d.scrollLeft;if(a.y<d.scrollTop)a.y=d.scrollTop}if(b.offset){var h=Msn.Ui.getLocation(b.offset);a.x-=h.x;a.y-=h.y}a.left=a.x;a.top=a.y;return a},dockTo:function(a,d,c){var b=this.state;b.owner=a instanceof Msn.Ui.Control?a:new Msn.Ui.Control(a);b.offset=d;b.doRelocate=c;this.recalc()},recalc:function(){var a=this.state;this.setPosition(this.getDockPosition())},toString:function(){return "Msn.Ui.Panel - {"+this.getLayoutRect.toString()+"}"},dispose:function(){var a=this;a.owner=null;if(!!a.state.contents)Msn.Ui.getContainer().removeChild(a.state.contents);Msn.Ui.Control.prototype.dispose.call(a);a.state={}}});(function(c,b){var a=this;a.args={};a.state.contents=c;a.scrollRight=function(){a.scroll(Msn.Ui.ThumbnailControl.ScrollDirection.Right)};a.scrollLeft=function(){a.scroll(Msn.Ui.ThumbnailControl.ScrollDirection.Left)};a.scrollDown=function(){a.scroll(Msn.Ui.ThumbnailControl.ScrollDirection.Down)};a.scrollUp=function(){a.scroll(Msn.Ui.ThumbnailControl.ScrollDirection.Up)};a.startScrollRight=function(){a.startScroll(Msn.Ui.ThumbnailControl.ScrollDirection.Right)};a.startScrollLeft=function(){a.startScroll(Msn.Ui.ThumbnailControl.ScrollDirection.Left)};a.startScrollDown=function(){a.startScroll(Msn.Ui.ThumbnailControl.ScrollDirection.Down)};a.startScrollUp=function(){a.startScroll(Msn.Ui.ThumbnailControl.ScrollDirection.Up)};a.stopScroll=function(){if(a.intIntervalId)window.clearInterval(a.intIntervalId)};if(!b)b={};if(!b.data)throw"No slide data available.";a.args.data=b.data;a.args.enumLayout=Msn.Util.ArgWithDefault(b.layout,Msn.Ui.ThumbnailControl.Layout.Horizontal);a.args.displayCount=Msn.Util.ArgWithDefault(b.displayCount,5);a.args.imageHeight=Msn.Util.ArgWithDefault(b.imageHeight,50);a.args.imageWidth=Msn.Util.ArgWithDefault(b.imageWidth,50);a.args.imageBorderWidth=Msn.Util.ArgWithDefault(b.imageBorderWidth,1);a.args.controllerWidth=Msn.Util.ArgWithDefault(b.controllerWidth,30);if(!b.buttons)b.buttons={};a.args.buttons={};a.args.buttons.previousEnabled=Msn.Util.ArgWithDefault(b.buttons.previousEnabled,"");a.args.buttons.previousDisabled=Msn.Util.ArgWithDefault(b.buttons.previousDisabled,"");a.args.buttons.nextEnabled=Msn.Util.ArgWithDefault(b.buttons.nextEnabled,"");a.args.buttons.nextDisabled=Msn.Util.ArgWithDefault(b.buttons.nextDisabled,"");if(a.args.displayCount>=a.args.data.thumbnails.length){a.args.displayCount=a.args.data.thumbnails.length;a.args.showingAll=1}else a.args.showingAll=0;a.intSel=a.args.data.currentthumb;a.elThumbStrip=null;a.intThumbstripSize=0;a.intThumbstripScrollLimit=-1;a.intIntervalId=null;a.intScrollInterval=10;a.intScrollStepSize=6;a.intScrollValue=0;a.thumbnailSpacing=8;a.thumbnailMargin=a.thumbnailSpacing/2;a.initialize();return a}).as("Msn.Ui.ThumbnailControl",Msn.Ui.Control);Msn.Ui.ThumbnailControl.ScrollDirection=new Msn.Enum("Up","Left","Down","Right");Msn.Ui.ThumbnailControl.Layout=new Msn.Enum("Horizontal","Vertical");Msn.Ui.ThumbnailControl.setMethods({initialize:function(){var a=this,b=a.args,e=document.createElement("div"),h=Msn.DOM,l=h.CancelEvent;a.elNegativeArrow=document.createElement("div");a.elNegativeArrow.className="harrow";a.elNegativeArrow.style.width=b.controllerWidth+"px";a.elNegativeArrow.enabled=b.showingAll?"":"<img src='"+b.buttons.previousEnabled+"'/>";a.elNegativeArrowDisabledMarkup=b.showingAll?"":"<img src='"+b.buttons.previousDisabled+"'/>";a.elNegativeArrow.innerHTML=a.elNegativeArrow.enabled;a.elPositiveArrow=document.createElement("div");a.elPositiveArrow.className="harrow";a.elPositiveArrow.style.width=b.controllerWidth+"px";a.elPositiveArrow.enabled=b.showingAll?"":"<img src='"+b.buttons.nextEnabled+"'/>";a.elPositiveArrowDisabledMarkup=b.showingAll?"":"<img src='"+b.buttons.nextDisabled+"'/>";a.elPositiveArrow.innerHTML=a.elPositiveArrow.enabled;a.addContent(a.elNegativeArrow);a.addContent(e);a.addContent(a.elPositiveArrow);a.elThumbStrip=document.createElement("div");e.appendChild(a.elThumbStrip);e.className="thumbstrip";var c=a.elThumbStrip;switch(b.enumLayout){case Msn.Ui.ThumbnailControl.Layout.Horizontal:a.intThumbstripSize=(b.imageWidth+a.thumbnailSpacing+b.imageBorderWidth*2)*b.displayCount-a.thumbnailSpacing;var j=Msn.Ui.getLocation(a.state.contents.parentNode).width;while(a.intThumbstripSize+b.controllerWidth*2>j&&b.displayCount>1){b.displayCount-=1;a.intThumbstripSize=(b.imageWidth+a.thumbnailSpacing+b.imageBorderWidth*2)*b.displayCount-a.thumbnailSpacing}c.className="thumbroll horizontal";c.style.height=b.imageHeight+a.thumbnailMargin+"px";c.style.width=a.intThumbstripSize+"px";if(a.elNegativeArrow)a.startScrollLeft.hook(a.elNegativeArrow,"mousedown");if(a.elPositiveArrow)a.startScrollRight.hook(a.elPositiveArrow,"mousedown");var k=Msn.Ui.getLocation(a.elNegativeArrow).width+a.intThumbstripSize+Msn.Ui.getLocation(a.elPositiveArrow).width;a.setSize({width:k});break;case Msn.Ui.ThumbnailControl.Layout.Vertical:break}c.style.overflow="hidden";c.style.position="relative";c.style.whiteSpace="nowrap";if(a.elNegativeArrow){a.stopScroll.hook(a.elNegativeArrow,"mouseout");a.stopScroll.hook(a.elNegativeArrow,"mouseup")}if(a.elPositiveArrow){a.stopScroll.hook(a.elPositiveArrow,"mouseout");a.stopScroll.hook(a.elPositiveArrow,"mouseup")}a.imageRoll=function(a){a=h.Event(a);var c=a[a["target"]?"target":"srcElement"],b=c.parentNode.parentNode;if(a.type=="mouseover")Msn.DOM.AddClass(b,"on");else Msn.DOM.DelClass(b,"on")};a.elThumbsBlock=document.createElement("div");c.appendChild(a.elThumbsBlock);var d=a.elThumbsBlock;d.style.position="absolute";d.style.width=b.data.thumbnails.length*110+"px";d.innerHTML=a.genThumbsMarkup(b.data);for(var i=0,g;g=d.childNodes[i];i++){var f=g.firstChild.firstChild;if(!f)continue;a.imageRoll.hook(f,"mouseover");a.imageRoll.hook(f,"mouseout")}},genThumbsMarkup:function(i){var a=this,b=a.args,l="";for(var j=0,c;c=i.thumbnails[j];j++){var e=0,d=0,g=typeof c.img.width!="undefined"&&c.img.width>0?c.img.width:typeof c.img.original!="undefined"&&typeof c.img.original.width!="undefined"&&c.img.original.width>0?c.img.original.width:0,f=typeof c.img.height!="undefined"&&c.img.height>0?c.img.height:typeof c.img.original!="undefined"&&typeof c.img.original.height!="undefined"&&c.img.original.height>0?c.img.original.height:0;if(g>f){d=b.imageHeight+5;var m=d/f;e=(m*g).toFixed(0)}else if(f>g){e=b.imageWidth+5;var m=e/g;d=(m*f).toFixed(0)}else{e=b.imageWidth+5;d=b.imageHeight+5}var k="",h="";switch(j){case 0:h=" first";break;case i.thumbnails.length-1:h=" last";break}if(c.slidenumber==a.intSel){a.intScrollValue=0-(b.imageWidth+a.thumbnailSpacing+b.imageBorderWidth*2)*j-(Math.round((b.imageWidth+a.thumbnailSpacing+b.imageBorderWidth*2)/(b.displayCount%2==1?2:1))+a.thumbnailMargin-b.imageBorderWidth*(b.displayCount%2==1?1:2))+Math.round(((b.imageWidth+a.thumbnailSpacing+b.imageBorderWidth*2)*b.displayCount+(Math.round(a.thumbnailSpacing/2)+(b.displayCount%2==1?b.imageBorderWidth:0)))/2);if(0-a.intScrollValue<b.imageWidth){a.intScrollValue=0;a.elNegativeArrowDisabled=1;a.elNegativeArrow.innerHTML=a.elNegativeArrowDisabledMarkup}else if(a.intScrollValue<=0-((b.imageWidth+a.thumbnailSpacing+b.imageBorderWidth*2)*i.thumbnails.length-a.thumbnailSpacing-a.intThumbstripSize)){a.intScrollValue=0-((b.imageWidth+a.thumbnailSpacing+b.imageBorderWidth*2)*i.thumbnails.length-a.thumbnailSpacing-a.intThumbstripSize);a.elPositiveArrowDisabled=1;a.elPositiveArrow.innerHTML=a.elPositiveArrowDisabledMarkup}a.scrollTo(b.enumLayout,a.intScrollValue.toFixed(0));k="<div class='tb selectedIndex{0}'><img src='{1}' width='{2}' height='{3}' title='{4}' /></div>".format(h,c.img.src,e,d,c.img.alt)}else k="<div class='tb{0}'><a href='{1}'><img src='{2}' width='{3}' height='{4}' title='{5}' /></a></div>".format(h,c.url,c.img.src,e,d,c.img.alt);l+=k}return l},scrollTo:function(c,b){var a=this;switch(c){case Msn.Ui.ThumbnailControl.Layout.Horizontal:a.elThumbsBlock.style.left=b+"px";break;case Msn.Ui.ThumbnailControl.Layout.Vertical:break}},scroll:function(b){var a=this,c=a.args;if(a.intThumbstripScrollLimit==-1)switch(b){case Msn.Ui.ThumbnailControl.ScrollDirection.Left:case Msn.Ui.ThumbnailControl.ScrollDirection.Right:a.intThumbstripScrollLimit=0-((c.imageWidth+2*c.imageBorderWidth+a.thumbnailSpacing)*c.data.thumbnails.length-a.thumbnailSpacing-a.intThumbstripSize);break;case Msn.Ui.ThumbnailControl.ScrollDirection.Down:case Msn.Ui.ThumbnailControl.ScrollDirection.Up:break}if(a.elThumbStrip!=null){switch(b){case Msn.Ui.ThumbnailControl.ScrollDirection.Down:case Msn.Ui.ThumbnailControl.ScrollDirection.Right:if(a.intScrollValue>a.intThumbstripScrollLimit){if(!!a.elNegativeArrowDisabled){a.elNegativeArrowDisabled=0;a.elNegativeArrow.innerHTML=a.elNegativeArrow.enabled}if(0-(a.intThumbstripScrollLimit-a.intScrollValue)<a.intScrollStepSize)a.intScrollValue-=a.intScrollValue-a.intThumbstripScrollLimit;else a.intScrollValue-=a.intScrollStepSize}else{a.elPositiveArrowDisabled=1;a.elPositiveArrow.innerHTML=a.elPositiveArrowDisabledMarkup}break;case Msn.Ui.ThumbnailControl.ScrollDirection.Up:case Msn.Ui.ThumbnailControl.ScrollDirection.Left:if(a.intScrollValue<0){if(!!a.elPositiveArrowDisabled){a.elPositiveArrowDisabled=0;a.elPositiveArrow.innerHTML=a.elPositiveArrow.enabled}if(a.intScrollStepSize>0-a.intScrollValue)a.intScrollValue+=0-a.intScrollValue;else a.intScrollValue+=a.intScrollStepSize}else{a.elNegativeArrowDisabled=1;a.elNegativeArrow.innerHTML=a.elNegativeArrowDisabledMarkup}break}switch(b){case Msn.Ui.ThumbnailControl.ScrollDirection.Left:case Msn.Ui.ThumbnailControl.ScrollDirection.Right:a.elThumbsBlock.style.left=a.intScrollValue.toFixed(0)+"px";break;case Msn.Ui.ThumbnailControl.ScrollDirection.Down:case Msn.Ui.ThumbnailControl.ScrollDirection.Up:break}}},startScroll:function(b){var a=this;a.stopScroll();switch(b){case Msn.Ui.ThumbnailControl.ScrollDirection.Down:a.intIntervalId=window.setInterval(a.scrollDown,a.intScrollInterval);break;case Msn.Ui.ThumbnailControl.ScrollDirection.Up:a.intIntervalId=window.setInterval(a.scrollUp,a.intScrollInterval);break;case Msn.Ui.ThumbnailControl.ScrollDirection.Left:a.intIntervalId=window.setInterval(a.scrollLeft,a.intScrollInterval);break;case Msn.Ui.ThumbnailControl.ScrollDirection.Right:a.intIntervalId=window.setInterval(a.scrollRight,a.intScrollInterval);break}},dispose:function(){var a=this;for(var d=0,c;c=a.elThumbsBlock.childNodes[d];d++){var b=c.firstChild.firstChild;if(!b)continue;a.imageRoll.unhook(b,"mouseover");a.imageRoll.unhook(b,"mouseout")}if(a.elNegativeArrow){a.startScrollLeft.unhook(a.elNegativeArrow,"mousedown");a.stopScroll.unhook(a.elNegativeArrow,"mouseout");a.stopScroll.unhook(a.elNegativeArrow,"mouseup")}if(a.elPositiveArrow){a.startScrollRight.unhook(a.elPositiveArrow,"mousedown");a.stopScroll.unhook(a.elPositiveArrow,"mouseout");a.stopScroll.unhook(a.elPositiveArrow,"mouseup")}}});(function(g,b){var a=this,e=a.state.contents,f=Msn.DOM,d=f.CancelEvent;a.onChange=b.callback;a.start={};a.start.value=b.start;a.start.position=0;a.end={};a.end.value=b.end;a.end.position=b.width;a.increaseRight=a.start.value<a.end.value?1:0;if(!!a.increaseRight){a.step=((a.end.value-a.start.value)/(a.end.position-a.start.position)).toFixed(0);a.current={};a.current.value=typeof b.init=="number"&&b.init<a.end.value&&b.init>a.start.value?b.init:((a.end.value-a.start.value)/2).toFixed(0);a.current.position=((a.current.value-a.start.value)/a.step).toFixed(0)}else{a.step=((a.start.value-a.end.value)/(a.end.position-a.start.position)).toFixed(0);a.current={};a.current.value=typeof b.init=="number"&&b.init>a.end.value&&b.init<a.start.value?b.init:((a.start.value-a.end.value)/2).toFixed(0);a.current.position=((a.start.value-a.current.value)/a.step).toFixed(0)}e.style.display="inline";e.style.position="relative";a.setSize({width:b.width+b.handle.width,height:b.height});var c=document.createElement("img");a.addContent(c);c.style.position="relative";c.style.top="-"+b.bar.height+"px";c.src=b.bar.url;c.width=b.width+b.handle.width;c.height=b.bar.height;a.handle=document.createElement("img");a.addContent(a.handle);a.handle.style.position="absolute";a.handle.src=b.handle.url;a.handle.width=b.handle.width;a.handle.height=b.handle.height;a.handle.style.cursor="w-resize";a.handle.isHandle=1;a.startAdjust=function(b){d(b);b=f.Event(b);var e=b[b["target"]?"target":"srcElement"],c=Msn.Ui.getMouseLocation(b,a.getContents());if(!!e.isHandle){a.doAdjust=1;a.cursorOffset=c.x-a.current.position;a.endAdjust.hook(Msn.Ui.getLayoutRoot(),"mouseup");a.adjust.hook(Msn.Ui.getLayoutRoot(),"mousemove")}else{a.current.position=c.x-(a.handle.width/2).toFixed(0);a.setLevel(a.current.position);a.endAdjust()}};a.endAdjust=function(){if(!!a.doAdjust){a.doAdjust=0;a.cursorOffset=0;a.endAdjust.unhook(Msn.Ui.getLayoutRoot(),"mouseup");a.adjust.unhook(Msn.Ui.getLayoutRoot(),"mousemove")}a.current.value=!!a.increaseRight?a.start.value+a.current.position*a.step:a.start.value-a.current.position*a.step;a.onChange(a.current.value)};a.adjust=function(b){if(!a.doAdjust)return;d(b);var c=Msn.Ui.getMouseLocation(b,a.getContents());a.setLevel(c.x-a.cursorOffset)};a.setLevel(a.current.position);a.startAdjust.hook(a.handle.parentNode,"mousedown");return a}).as("Msn.Ui.Component.Slider",Msn.Ui.Control);Msn.Ui.Component.Slider.setMethods({setLevel:function(b){var a=this;if(b>=a.start.position){if(b>a.end.position)b=a.end.position}else b=a.start.position;var c=a.valueFromPosition(b);a.handle.style.left=b+"px";a.current.position=b;a.current.value=c},setValue:function(b){var a=this,c=a.start.position;if(!!a.increaseRight)if(b>=a.start.value){if(b>a.end.value)b=a.end.value}else b=a.start.value;else if(b<=a.start.value){if(b<a.end.value)b=a.end.value}else b=a.start.value;var c=a.positionFromValue(b);a.handle.style.left=c+"px";a.current.position=c;a.current.value=b},valueFromPosition:function(c){var a=this,b=a.start.value;if(!!a.increaseRight)b=a.start.value+(c-a.start.position)*a.step;else b=a.start.value-(c-a.start.position)*a.step;return b},positionFromValue:function(c){var a=this,b=a.start.position;if(!!a.increaseRight)b=a.start.position+((c-a.start.value)/a.step).toFixed(0);else b=a.start.position+((a.start.value-c)/a.step).toFixed(0);return b},dispose:function(){var a=this;a.startAdjust.unhook(a.handle.parentNode,"mousedown");a.handle=a.onChange=0}});(function(g,b){var a=this,c=a.state.contents,f=document,d=Msn.DOM,e=d.CancelEvent;a.args={};a.args.emailTxt=Msn.Util.ArgWithDefault(b.emailTxt,"E-mail");a.args.emailMsg=Msn.Util.ArgWithDefault(b.emailMsg,"Check out this page on MSN:");a.args.printTxt=Msn.Util.ArgWithDefault(b.printTxt,"Print");a.args.printUrl=Msn.Util.ArgWithDefault(b.printUrl,"");a.args.printName=Msn.Util.ArgWithDefault(b.printName,"");a.args.printOptions=Msn.Util.ArgWithDefault(b.printOptions,"");a.args.imTxt=Msn.Util.ArgWithDefault(b.imTxt,"IM");a.args.blogTxt=Msn.Util.ArgWithDefault(b.blogTxt,"Blog");c.innerHTML="<ul class='linklist9 cf'>"+"<li class='first'><a href='#'>"+a.args.emailTxt+"</a></li>"+(a.args.printUrl!=""?"<li><a href='#'>"+a.args.printTxt+"</a></li>":"")+"<li><a href='#'>"+a.args.imTxt+"</a></li>"+"<li class='last'><a href='#'>"+a.args.blogTxt+"</a></li>"+"</ul>";a.doAction=function(b){e(b);b=d.Event(b);var c=b[b["target"]?"target":"srcElement"];if(typeof c.tagName!="undefined"&&c.tagName.toLowerCase()=="a")switch(c.innerHTML){case a.args.emailTxt:Msn.Util.EmailThis(f.title,a.args.emailMsg);break;case a.args.printTxt:Msn.Util.PrintThis(a.args.printUrl,a.args.printName,a.args.printOptions);break;case a.args.imTxt:Msn.Util.IMThis();break;case a.args.blogTxt:Msn.Util.BlogThis();break}};a.doAction.hook(c,"click");a.dispose=function(){a.doAction.unhook(c,"click")}}).as("Msn.Ui.ActionToolbar",Msn.Ui.Control);(function(){Msn.Ui.Control.addMethod("fade",function(a,i,g,e){if(typeof a=="string"&&(parseInt(a)>=0&&parseInt(a)<=100))a=parseInt(a);else if(!(typeof a=="number"&&(a>=0&&a<=100)))return;var c=this;if(typeof c.__AnimateFadeInterval)clearInterval(c.__AnimateFadeInterval);var j=typeof i=="number"?i:500,f=typeof g=="number"?g:10;if(j<f)return;var b=parseInt(c.getOpacity()),h=j/f,d=Math.abs(b-a)/f;c.__AnimateFadeInterval=b>a?setInterval(function(){var f=b-d<0?0:b-d;c.setOpacity(f);if(f<=a){clearInterval(c.__AnimateFadeInterval);if(typeof e=="function")e();return}b=f},h):setInterval(function(){var f=b+d>100?100:b+d;c.setOpacity(b+d);if(f>=a){clearInterval(c.__AnimateFadeInterval);if(typeof e=="function")e();return}b=f},h)})}).ns("Msn.Ui.Animate");(function(){var a=this;a.createDelegate=function(a,b){return function(){return b.apply(a,arguments)}}}).ns("Msn.Ag");(function(h,a){var b=this,k=Msn.Util,c=k.ArgWithDefault,f=document,i=3000;if(!a||!a.xaml||!a.xaml.source)return;var e=a.xaml.source;if(!!a.xaml.proxy)e=a.xaml.proxy+"?cp-documentid="+e.encodeURIComponent();b.id=c(a.id,"SilverlightControl");var d=0;while(!!f.getElementById(b.id+d))d++;b.id=b.id+d;if(typeof a.context==="string")a.context=a.context.parseJSON();if(!a.context)a.context={};a.context.__constructorArgs=a;if(!a.context)a.context={};a.context.__constructorArgs=a;a.version=c(a.version,"1");function g(){var c=0;if(Silverlight.isInstalled(a.version)){Silverlight.createObjectEx(b.args);if(a.sltrack instanceof Array&&typeof a.sltrack[1]==="string"){c=f.createElement("img");c.src=a.sltrack[1]}}else{if(!b.inplaceInstallPromptSet){if(a.sltrack instanceof Array&&typeof a.sltrack[0]==="string"){c=f.createElement("img");c.src=a.sltrack[0]}h.innerHTML="<div class='nosilverlight' style='margin:0;padding:0;width:"+a.width+"px;height:"+a.height+"px;"+(!!a.backgroundImage?"background-image:url("+a.backgroundImage+")":"")+"'>"+Silverlight.createObject(null,null,null,{version:a.version,inplaceInstallPrompt:true},{},null)+"</div>";b.inplaceInstallPromptSet=1}setTimeout(g,i)}}function j(){if(typeof a.onLoad==="string"){var i=a.onLoad.split(".");a.onLoad=window;for(var f=0,d;d=i[f];f++){if(!a.onLoad[d]){a.onLoad=null;break}a.onLoad=a.onLoad[d]}}var j=(function(a){return function(e,d,c){b.binding=new a(e,d,c)}})(a.onLoad);b.args={source:e,parentElement:h,id:b.id,properties:{width:c(a.width,"1"),height:c(a.height,"1"),version:a.version,enableHtmlAccess:c(a.enableHtmlAccess,"true"),inplaceInstallPrompt:c(a.inplaceInstallPrompt,true),framerate:c(a.framerate,"24"),background:a.background||null},events:{onError:a.onError||null,onLoad:j||null},initParams:a.initParams||null,context:a.context};g()}a.__waitForLoad(b,j);return b}).as("Msn.Ag.Control");(function(){}).as("msn.ag.control",Msn.Ag.Control);if(!window.Silverlight)window.Silverlight={};Silverlight._silverlightCount=0;Silverlight.ua=null;Silverlight.available=false;Silverlight.fwlinkRoot="http://go.microsoft.com/fwlink/?LinkID=";Silverlight.detectUserAgent=function(){var a=window.navigator.userAgent;Silverlight.ua={OS:"Unsupported",Browser:"Unsupported"};if(a.indexOf("Windows NT")>=0)Silverlight.ua.OS="Windows";else if(a.indexOf("PPC Mac OS X")>=0)Silverlight.ua.OS="MacPPC";else if(a.indexOf("Intel Mac OS X")>=0)Silverlight.ua.OS="MacIntel";if(Silverlight.ua.OS!="Unsupported")if(a.indexOf("MSIE")>=0){if(navigator.userAgent.indexOf("Win64")==-1)if(parseInt(a.split("MSIE")[1])>=6)Silverlight.ua.Browser="MSIE"}else if(a.indexOf("Firefox")>=0){var b=a.split("Firefox/")[1].split("."),c=parseInt(b[0]);if(c>=2)Silverlight.ua.Browser="Firefox";else{var d=parseInt(b[1]);if(c==1&&d>=5)Silverlight.ua.Browser="Firefox"}}else if(a.indexOf("Safari")>=0)Silverlight.ua.Browser="Safari"};Silverlight.detectUserAgent();Silverlight.isInstalled=function(d){var c=false,a=null;try{var b=null;if(Silverlight.ua.Browser=="MSIE")b=new ActiveXObject("AgControl.AgControl");else if(navigator.plugins["Silverlight Plug-In"]){a=document.createElement("div");document.body.appendChild(a);if(Silverlight.ua.Browser=="Safari")a.innerHTML='<embed type="application/x-silverlight" />';else a.innerHTML='<object type="application/x-silverlight"  data="data:," />';b=a.childNodes[0]}document.body.innerHTML;if(b.IsVersionSupported(d))c=true;b=null;Silverlight.available=true}catch(e){c=false}if(a)document.body.removeChild(a);return c};Silverlight.createObject=function(l,g,m,j,k,i,h){var b={},a=j,c=k;a.source=l;b.parentElement=g;b.id=Silverlight.HtmlAttributeEncode(m);b.width=Silverlight.HtmlAttributeEncode(a.width);b.height=Silverlight.HtmlAttributeEncode(a.height);b.ignoreBrowserVer=Boolean(a.ignoreBrowserVer);b.inplaceInstallPrompt=Boolean(a.inplaceInstallPrompt);var e=a.version.split(".");b.shortVer=e[0]+"."+e[1];b.version=a.version;a.initParams=i;a.windowless=a.isWindowless;a.maxFramerate=a.framerate;for(var d in c)if(c[d]&&d!="onLoad"&&d!="onError"){a[d]=c[d];c[d]=null}delete a.width;delete a.height;delete a.id;delete a.onLoad;delete a.onError;delete a.ignoreBrowserVer;delete a.inplaceInstallPrompt;delete a.version;delete a.isWindowless;delete a.framerate;delete a.data;delete a.src;if(Silverlight.isInstalled(b.version)){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var f=Silverlight._silverlightCount++;a.onLoad="__slLoad"+f;a.onError="__slError"+f;window[a.onLoad]=function(a){if(c.onLoad)c.onLoad(document.getElementById(b.id),h,a)};window[a.onError]=function(a,b){if(c.onError)c.onError(a,b);else Silverlight.default_error_handler(a,b)};slPluginHTML=Silverlight.buildHTML(b,a)}else slPluginHTML=Silverlight.buildPromptHTML(b);if(b.parentElement)b.parentElement.innerHTML=slPluginHTML;else return slPluginHTML};Silverlight.supportedUserAgent=function(){var a=Silverlight.ua,b=a.OS=="Unsupported"||a.Browser=="Unsupported"||a.OS=="Windows"&&a.Browser=="Safari"||a.OS.indexOf("Mac")>=0&&a.Browser=="IE";return !b};Silverlight.buildHTML=function(c,d){var a=[],e,i,g,f,h;if(Silverlight.ua.Browser=="Safari"){a.push("<embed ");e="";i=" ";g='="';f='"';h=' type="application/x-silverlight"/>'+"<iframe style='visibility:hidden;height:0;width:0'/>"}else{a.push('<object type="application/x-silverlight" data="data:,"');e=">";i=' <param name="';g='" value="';f='" />';h="</object>"}a.push(' id="'+c.id+'" width="'+c.width+'" height="'+c.height+'" '+e);for(var b in d)if(d[b])a.push(i+Silverlight.HtmlAttributeEncode(b)+g+Silverlight.HtmlAttributeEncode(d[b])+f);a.push(h);return a.join("")};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message     \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+"       \n";a+="Message: "+b.ErrorMessage+"     \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+"     \n";a+="Line: "+b.lineNumber+"     \n";a+="Position: "+b.charPosition+"     \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+"     \n";a+="Position: "+b.charPosition+"     \n"}a+="MethodName: "+b.methodName+"     \n"}alert(a)};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(l){var a=null,d=Silverlight.fwlinkRoot,c=Silverlight.ua.OS,b="92822",e,f="Get Microsoft Silverlight",m="0x409";if(l.inplaceInstallPrompt){var n="98109",i;if(Silverlight.available){e="96189";i="96422"}else{e="96188";i="96422"}var h="93481",g="93483";if(c=="Windows"){b="92799";h="92803";g="92805"}else if(c=="MacIntel"){b="92808";h="92804";g="92806"}else if(c=="MacPPC"){b="92807";h="92815";g="92816"}var k='By clicking <b>"Get Microsoft Silverlight"</b> you accept the<br /><a title="Silverlight License Agreement" href="{2}" target="_top" style="text-decoration: underline; color: #96C5E1"><b>Silverlight license agreement</b></a>',j='Silverlight updates automatically, <a title="Silverlight Privacy Statement" href="{3}" target="_top" style="text-decoration: underline; color: #96C5E1"><b>learn more</b></a>';a='<table border="0" cellpadding="0" cellspacing="0" width="206px"><tr><td><img style="display: block; cursor: pointer; border= 0;" title="'+f+'" alt="'+f+'" onclick="javascript:Silverlight.followFWLink({0});slDownload_Despatch_box_ClickTag();" src="{1}" /></td></tr><tr><td style="width: 206px; margin: 0px; background: #FFFFFF; color: #C7C7C7; text-align: left; border-left-style: solid; border-right-style: solid; padding-left: 6px; padding-right: 6px; padding-top: 3px; padding-bottom: 0px; border-width: 2px; border-color: #c7c7bd; font-family: Verdana; font-size: 82%">'+k+'</td></tr><tr><td><img src="{5}" style="border: 0; display: block" /></td></tr><tr><td style="width: 206px; margin: 0px; background: #D8EFF9; color: #C7C7C7; text-align: left; border-left-style: solid; border-right-style: solid; padding-left: 6px; padding-right: 6px; padding-top: 0px; padding-bottom: 2px; border-width: 2px; border-color: #c7c7bd; font-family: Verdana; font-size: 82%">'+j+'</td></tr><tr><td><img alt="" src="{4}" style="display:block" /></td></tr></table>';a=a.replace("{2}",d+h);a=a.replace("{3}",d+g);a=a.replace("{4}",d+i);a=a.replace("{5}",d+n)}else{if(Silverlight.available)e="94377";else e="92801";if(c=="Windows")b="92800";else if(c=="MacIntel")b="92812";else if(c=="MacPPC")b="92811";a='<div style="display:block; width: 205px; height: 67px;"><img onclick="javascript:Silverlight.followFWLink({0});" style="border:0; cursor:pointer" src="{1}" title="'+f+'" alt="'+f+'"/></div>'}a=a.replace("{0}",b);a=a.replace("{1}",d+e+"&amp;clcid="+m);return a};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--){window["__slLoad"+a]=null;window["__slError"+a]=null}if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d<c.length;d++){a=c.charCodeAt(d);if(a>96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+"&#"+a+";"}return b}

function slDownload_Despatch_box_ClickTag()
{
	var lnkname = 'specials.uk.msn.com:mayoral-election:downloaderSilverlightImage'+(s.pageName||"default")+':'+(s.prop2||"000")+':downloadSilverlight';
	//Options: 'o': Custom links. Report Location: Traffic > Custom Insight > Custom Links
	//         'd':File Downloads. Report Location:  Traffic > Site Traffic > File Downloads
	//         'e' Exit Links. Report Location: Paths > Entries & Exits > Exit Links
	void(s.tl(true, "o", lnkname));
}