var iSpeakVideo_Global;function hideWhenFinished(){iSpeakVideo_Global.HideWhenFinished()}function iSpeakVideo(){this.src="";this.width="";this.height="";this.Position;this.Location=new this.Point();this.Location.X=0;this.Location.Y=0;this.DoNotShowDays=0;this.PauseIfShown=0;this.PositionMode="absolute";this.positionFrom="fromBottom";this.positionHorizontalFrom="fromLeft";this.ReferenceID=null;this.RequiredVersionMajor=9;this.RequiredVersionMinor=0;this.needFlashString="Flash Version "+this.RequiredVersionMajor+"."+this.RequiredVersionMinor+" is needed.<br/><a href='http://www.adobe.com/go/getflash/' target='_blank'>Get it here</a>";if(document.body.attachEvent){this.isIE=true}else{this.isIE=false}this.ParseBrowser();this.backgroundImage="images/transparent.gif";this.NeedsFix=false;this.WriteWrapper=true;this.FlashVars="";this.urlArray=null;this.anchorMode="static";this.InitialX=0;this.cookie=null;this.hideAfterMaxPlays=0;this.playCountDays=null;this.playCountCookie=null;this.maxPlayCount=0}iSpeakVideo.MouseX=function(a){return a.pageX||(a.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))};iSpeakVideo.MouseY=function(a){return a.pageY||(a.clientY+(document.documentElement.scrollTop||document.body.scrollTop))};iSpeakVideo.prototype.LockMouse=function(){this.MouseStartX=null;this.MouseStartY=null;if(this.isIE){document.attachEvent("onmousemove",iSpeakVideo.TrackMouse);document.attachEvent("onmouseup",iSpeakVideo.ReleaseMouse)}else{document.addEventListener("mousemove",iSpeakVideo.TrackMouse,false);document.addEventListener("mouseup",iSpeakVideo.ReleaseMouse,false)}};iSpeakVideo.prototype.GetMovie=function(){var a=navigator.appName.indexOf("Microsoft")!=-1;return(a)?window.iSpeakVideo_Container_o:document.iSpeakVideo_Container_o};iSpeakVideo.prototype.PausePlayback=function(){var a=this.GetMovie();a.pausePlayback()};iSpeakVideo.prototype.trace=function(a){alert(a)};iSpeakVideo.ReleaseMouse=function(a){if(document.body.attachEvent){document.detachEvent("onmousemove",iSpeakVideo.TrackMouse);document.detachEvent("onmouseup",iSpeakVideo.ReleaseMouse)}else{document.removeEventListener("mousemove",iSpeakVideo.TrackMouse,false);document.removeEventListener("mouseup",iSpeakVideo.ReleaseMouse,false)}};iSpeakVideo.TrackMouse=function(h){if(iSpeakVideo.MouseStartX!=null){var c=iSpeakVideo.MouseX(h);var b=iSpeakVideo.MouseY(h);var j=c-iSpeakVideo.MouseStartX;var i=b-iSpeakVideo.MouseStartY;var d=iSpeakVideo_Global.el("iSpeakVideo_Container");var a=iSpeakVideo_Global.el(iSpeakVideo_Global.ReferenceID);var g=iSpeakVideo_Global.GetObjectAbsoluteX(d);var f=iSpeakVideo_Global.GetObjectAbsoluteY(d);g+=j;f+=i;d.style.left=g+"px";d.style.top=f+"px"}iSpeakVideo.MouseStartX=iSpeakVideo.MouseX(h);iSpeakVideo.MouseStartY=iSpeakVideo.MouseY(h)};iSpeakVideo.prototype.Query=function(a){if(this.urlArray==null){var f=new Array();var b=new String(window.location.href);var h=b.indexOf("?");if(h!=-1){var c=new String(b.substr(h+1));var g=c.split("&");for(var e=0;e<g.length;e++){if(g[e].indexOf("=")!=-1){var d=g[e].split("=");f[d[0].toLowerCase()]=d[1]}else{f[g[e].toLowerCase()]=""}}}this.urlArray=f}return this.urlArray[a]};iSpeakVideo.prototype.AddUrlVarToFlashVars=function(b){this.AddVarToFlashVars(b,this.Query(b))};iSpeakVideo.prototype.AddVarToFlashVars=function(b,a){this.FlashVars=this.FlashVars+b+"="+a+"&"};iSpeakVideo.prototype.AddUrlVarToFlashVarsRenamed=function(b,c){this.FlashVars=this.FlashVars+c+"="+this.Query(b)+"&"};iSpeakVideo.prototype.Point=function(a,b){this.X=a;this.Y=b};iSpeakVideo.prototype.GetTimeCookie=function(){this.cookie=this.gc("isvTime");return this.cookie};iSpeakVideo.prototype.GetPlayCookie=function(){this.playCountCookie=parseInt(this.gc("playCount"));if(isNaN(this.playCountCookie)){this.playCountCookie=0}return this.playCountCookie};iSpeakVideo.prototype.cc=function(f,b,e){if(e){var c=new Date();c.setTime(c.getTime()+(e*24*3600000));var a="; expires="+c.toGMTString()}else{var a=""}document.cookie=f+"="+b+a+"; path=/"};iSpeakVideo.prototype.gc=function(f){var d=f+"=";var a=document.cookie.split(";");for(var b=0;b<a.length;b++){var e=a[b];while(e.charAt(0)==" "){e=e.substring(1,e.length)}if(e.indexOf(d)==0){return e.substring(d.length,e.length)}}return null};iSpeakVideo.prototype.ec=function(a){createCookie(a,"",-1)};iSpeakVideo.prototype.SetPlayCookie=function(){var a=this.GetPlayCookie();if(isNaN(this.playCountCookie)){a=1}else{a=this.playCountCookie+1}this.cc("playCount",a,this.playCountDays)};iSpeakVideo.prototype.SetTimeCookie=function(){this.cc("isvTime",this.DoNotShowDays)};iSpeakVideo.prototype.ParseBrowser=function(){this.isNetscape=false;this.isFirefox=false;this.isIE=false;this.isOpera=false;this.isSafari=false;this.appName=navigator.appName;this.appVersion=navigator.appVersion;if(this.appName=="Netscape"&&parseFloat(this.appVersion)>4.7){var b=navigator.userAgent.indexOf("Firefox");if(b!=-1){this.isFirefox=true;this.browserVersionMaj=parseInt(navigator.userAgent.charAt(b+8))}else{this.isNetscape=true;this.browserVersionMaj=parseFloat(this.appVersion)}}else{var b=navigator.appVersion.indexOf("MSIE");if(b!=-1){this.isIE=true;var a=navigator.appVersion.split("MSIE");this.appVersion=parseFloat(a[1]);this.browserVersionMaj=parseInt(this.appVersion)}else{var b=navigator.userAgent.indexOf("Opera");if(b!=-1){this.isOpera=true;this.browserVersionMaj=parseInt(navigator.userAgent.charAt(b+6))}}}if(document.compatMode=="CSS1Compat"){this.isCompatible=true}else{this.isCompatible=false}};iSpeakVideo.prototype.el=function(a){return document.getElementById(a)};iSpeakVideo.prototype.AnchorToObjectX=function(){if(this.isIE){window.attachEvent("onresize",AnchorResizedX);window.attachEvent("onload",AnchorResizedX)}else{window.addEventListener("load",AnchorResizedX,false);window.addEventListener("resize",AnchorResizedX,false)}};iSpeakVideo.prototype.IsToBePaused=function(){if(this.DoNotShowDays>0){if(this.cookie!=null){return true}}if(this.maxPlayCount>0){this.GetPlayCookie();if(this.playCountCookie!=null&&this.playCountCookie>=this.maxPlayCount){return true}this.SetPlayCookie()}return false};iSpeakVideo.prototype.Intialize=function(){iSpeakVideo_Global=this;cookie=this.GetTimeCookie();if(this.DoNotShowDays>0){this.GetTimeCookie();if(this.cookie!=null&&this.PauseIfShown==0){return true}this.SetTimeCookie()}if(this.hideAfterMaxPlays>0){this.GetPlayCookie();if(this.playCountCookie!=null&&this.playCountCookie>=this.maxPlayCount){return true}this.SetPlayCookie()}this.InitialX=this.Location.X;if(this.ReferenceID!=null&&this.el(this.ReferenceID)!=null){this.AnchorToObjectX();this.LockInitialX()}if(this.anchorMode=="static"){this.positionMode="fixed";if(this.isIE){if((this.appVersion!=7&&this.appVersion!=8)||!this.isCompatible){this.positionMode="absolute";this.NeedsFix=true}}if(this.isFirefox&&this.browserVersionMaj<2){this.positionMode="absolute";window.addEventListener("scroll",RestorePosition,false);window.addEventListener("size",RestorePosition,false)}this.WriteDiv()}else{this.positionMode="absolute";this.WriteDiv()}if(this.ReferenceID!=null&&this.el(this.ReferenceID)!=null){this.AnchorToObjectX()}};iSpeakVideo.prototype.PlaceElement=function(d,i,e,h){var f=this.el(d);var a=this.el(i);var c=GetObjectPosition(a);var b=e+c[0];var g=h+c[1];f.style.left=b+"px";f.style.top=g+"px"};iSpeakVideo.prototype.CheckFlashVersion=function(){var g=0;var h=0;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash"]){var k=navigator.plugins["Shockwave Flash"].description;var f=k.split(" ");var c=f[2];var b=c.split(".");g=b[0];h=b[1]}}else{try{var j=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");var k=j.GetVariable("$version");var f=k.split(" ");var c=f[1];var b=c.split(",");g=b[0];h=b[1]}catch(i){}}if(g>this.RequiredVersionMajor||(g==this.RequiredVersionMajor&&h>=this.RequiredVersionMinor)){return true}else{return false}};iSpeakVideo.prototype.GetObjectPosition=function(c){var a,b;a=b=0;if(c.offsetParent){a=c.offsetLeft;b=c.offsetTop;while((c=c.offsetParent)){a+=c.offsetLeft;b+=c.offsetTop}}return[a,b]};iSpeakVideo.prototype.HideWhenFinished=function(){this.el("iSpeakVideo_Container").style.display="none"};iSpeakVideo.prototype.GetObjectAbsoluteLocation=function(b){var a=new this.Point(0,0);while(b!=null){a.X+=b.offsetLeft;a.Y+=b.offsetTop;b=b.offsetParent}return a};iSpeakVideo.prototype.GetObjectAbsoluteX=function(b){var a;a=0;while(b!=null){a+=b.offsetLeft;b=b.offsetParent}return a};iSpeakVideo.prototype.GetObjectAbsoluteY=function(a){var b;b=0;while(a!=null){b+=a.offsetTop;a=a.offsetParent}return b};iSpeakVideo.prototype.WriteStandardContainer=function(){document.write('<div id="iSpeakVideo_Container" style="z-index:10001;');this.WritePositionStyleInfo();document.write("z-index: 10000;border: 0px; width:"+this.width+"px;height:"+this.height+';">')};iSpeakVideo.prototype.WritePositionStyleInfo=function(){document.write("position: "+this.positionMode+"; ");if(this.positionFrom=="fromBottom"){document.write("bottom: ")}else{document.write("top: ")}document.write(this.Location.Y+"px; ");if(this.positionHorizontalFrom=="fromLeft"){document.write("left: ")}else{document.write("right: ")}document.write(this.InitialX+"px;")};iSpeakVideo.prototype.WriteNeedFlashContainer=function(){document.write('<div id="iSpeakVideo_Container" style="');this.WritePositionStyleInfo();document.write("z-index: 10000;border: 0px; width:"+this.width+'px; background-color:#FFF; padding:4px 4px 4px 4px; border:inset 3px #F00 ">')};iSpeakVideo.prototype.WriteDiv=function(){if(this.CheckFlashVersion()){if(this.WriteWrapper){this.WriteStandardContainer()}this.WriteMovieObject()}else{this.WriteNeedFlashContainer();this.WriteNeedFlash()}if(this.NeedsFix){this.FixIEFixed()}if(this.WriteWrapper){document.write("</div>")}};iSpeakVideo.prototype.WriteNeedFlash=function(){document.write(this.needFlashString)};iSpeakVideo.prototype.LockInitialX=function(){var b=this.el(iSpeakVideo_Global.ReferenceID);var a=this.GetObjectAbsoluteX(b);this.InitialX=a+this.Location.X};function AnchorResizedX(){var c=iSpeakVideo_Global.el("iSpeakVideo_Container");var d=iSpeakVideo_Global.el(iSpeakVideo_Global.ReferenceID);var b=iSpeakVideo_Global.GetObjectAbsoluteX(d);var a=video.Location.X+b;c.style.left=a+"px"}var shown=0;var lastNum=0;function getIEFixHeight(){var c;var b;var a;if(typeof(window.innerWidth)=="number"){a=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){a=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){a=document.body.clientHeight}}}if(typeof(window.pageYOffset)=="number"){b=window.pageYOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){b=document.body.scrollTop}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){b=document.documentElement.scrollTop}else{b=0}}}if(iSpeakVideo_Global.positionFrom=="fromBottom"){c=b+a-iSpeakVideo_Global.Location.Y-iSpeakVideo_Global.el("iSpeakVideo_Container").clientHeight}else{c=b+iSpeakVideo_Global.Location.Y}return c}iSpeakVideo.prototype.WriteMovieObject=function(){document.write("<object ");if(!this.WriteWrapper){document.write(' id="iSpeakVideo_Container"  style="');this.WritePositionStyleInfo();document.write('z-index: 1000;"')}else{document.write(' id="iSpeakVideo_Container_o"  ')}document.write(' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,19,0" width="');document.write(this.width+'px" height="'+this.height+'">\n');document.write('\t<param name="movie" value="'+this.src+'" />\n');document.write('\t<param name="quality" value="high" />\n');if(this.FlashVars!=""){document.write('\t<param name="FlashVars" value="'+this.FlashVars+'"')}document.write('\t<param name="menu" value="false" />\n');document.write('\t<param name="wmode" value="transparent" />\n');document.write('\t<embed id="iSpeakVideoVideo" src="'+this.src+'" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="');document.write(this.width+'px" height="'+this.height+'" menu="false"');if(this.FlashVars!=""){document.write('FlashVars="'+this.FlashVars+'"')}document.write("></embed>\n");document.write("</object>\n")};iSpeakVideo.prototype.FixIEFixed=function(){if(document.body.currentStyle.backgroundImage=="none"){document.body.style.backgroundImage="url("+this.backgroundImage+")";document.body.style.backgroundRepeat="no-repeat";document.body.style.backgroundAttachment="fixed"}this.el("iSpeakVideo_Container").style.setExpression("top","getIEFixHeight()")};iSpeakVideo.prototype.FixFF15Position=function(){var b=window.pageYOffset;var a=window.innerHeight;if(this.InitialHeight==undefined){this.InitialHeight=this.el("iSpeakVideo_Container").clientHeight}if(this.positionFrom=="fromBottom"){loc=b+a-this.Location.Y-this.InitialHeight}else{loc=b+iSpeakVideo_Global.Location.Y}this.el("iSpeakVideo_Container").style.top=loc+"px"};function RestorePosition(){iSpeakVideo_Global.FixFF15Position()};
