var cK=(document.body.clientWidth-200)/2;var cN=(document.body.clientHeight-20)/2;document.write("<OBJECT ID=fsplayer style='position:absolute; width:0px; height:0px; z-index:100' CLASSID='CLSID:2AA793B8-230D-4EE1-9158-21ADA1421950' CODEBASE='http://download.powercam.com.tw/fsplayer.cab#version=5,0,8,225'> <param name='AutoStart' value='-1'> <param name='Cursor' value='icons/cursor.gif'> <param name='ShowMenu' value='0'> </OBJECT>");document.write("<img src='icons/ctrlbar.gif' id=ctrlbar style='width:0px; height:7px; cursor:hand; position:absolute; z-index:102'>");document.write("<span id=ar style='position:absolute; font:10px Arial; color:red; border: 1px groove black; padding:0px 3px 0px 3px; background:white; visibility:hidden; z-index:103'></span>");document.write("<DIV ID=msgFullscreen style='position:absolute; visibility:hidden; color:white; font-size:15px; background-color:#ffaaaa; left:0px; top:0px;'> &nbsp; Opening fullscreen window ... &nbsp; </DIV>");var aO={left:0,top:0,width:0,height:0};var oMain,oTitle,oFs,oCtrl,oPhotovcr,oPhoto,oImgPhoto,oVcr,oStatus,oTime,oProgbar,oBar,oOutline;var oPlay,oStop,oNext,oPrev,oSound,oAuto,oSlide,oScreen;var fsp,fshtml,fshtmldiv,ctrlbar;var toc;var aq;var vcr;var bB;var indexType="OL";var bF=1;var tabindex=1;var bz=false;var bn=new Image;bn.src='icons/play.gif';var aG=new Image;aG.src='icons/playOver.gif';var bd=new Image;bd.src='icons/playDown.gif';var as=new Image;as.src='icons/pause.gif';var aX=new Image;aX.src='icons/pauseOver.gif';var aW=new Image;aW.src='icons/pauseDown.gif';var bp=new Image;bp.src='icons/stop.gif';var bh=new Image;bh.src='icons/stopOver.gif';var bg=new Image;bg.src='icons/stopDown.gif';var bo=new Image;bo.src='icons/next.gif';var bc=new Image;bc.src='icons/nextOver.gif';var bf=new Image;bf.src='icons/nextDown.gif';var bq=new Image;bq.src='icons/prev.gif';var bj=new Image;bj.src='icons/prevOver.gif';var bi=new Image;bi.src='icons/prevDown.gif';var aT=new Image;aT.src='icons/fullscreen.gif';var av=new Image;av.src='icons/fullscreenOver.gif';var au=new Image;au.src='icons/fullscreenDown.gif';var ax=new Image;ax.src='icons/soundOn.gif';var at=new Image;at.src='icons/soundOff.gif';var aJ=new Image;aJ.src='icons/soundOnOver.gif';var aB=new Image;aB.src='icons/soundOffOver.gif';var aZ=new Image;aZ.src='icons/autoOn.gif';var aN=new Image;aN.src='icons/autoOff.gif';var aU=new Image;aU.src='icons/autoOnOver.gif';var aH=new Image;aH.src='icons/autoOffOver.gif';var aR=new Image;aR.src='icons/slideOn.gif';var aF=new Image;aF.src='icons/slideOff.gif';var aK=new Image;aK.src='icons/slideOnOver.gif';var aD=new Image;aD.src='icons/slideOffOver.gif';var ce=0;function init(){aq.clear();if(navigator.appName!="Microsoft Internet Explorer"){alert("PowerCam Player supports IE browser only! \nPlease convert to Flash for other browsers. \n(using PowerCam/Publish to/Flash format)");return;}if(!H()){aq.ctrl.start("init()",1000);return;if(ce++ >50)alert("Please install PowerCam Player!");else aq.ctrl.start("init()",100);return;}fsp.attachEvent('OnCreateFinish',aa);window.setTimeout("V()",1000);};function C(id){return(document.getElementById(id))?document.getElementById(id):document.getElementsByTagName(id)[0];};function ac(cG){return document.createElement(cG);};function aa(){aq.ctrl.start("V()",200);};function V(){if(bz)return;oMain=C("main");oTitle=C("title");oFs=C("fs");oCtrl=C("ctrl");oPhotovcr=C("photovcr");oPhoto=C("photo");oVcr=C("vcr");oStatus=C("status");oTime=C("time");oProgbar=C("progbar");oBar=C("bar");oOutline=C("outline");oPlay=C("btnPlay");oStop=C("btnStop");oNext=C("btnNext");oPrev=C("btnPrev");oSound=C("btnSound");oAuto=C("btnAuto");oSlide=C("btnSlide");oScreen=C("btnScreen");ctrlbar=C("ctrlbar");fshtml=fshtmldiv="";fsp=C("fsplayer");fsp.attachEvent('OnSeekFinish',OnSetPosFinish);fsp.attachEvent('OnLeaveFullScreen',OnLeaveFullscreen);if(screen.width>1600&&screen.height>1024)oScreen.style.visibility="hidden";R();var url=window.location.href;url=url.substr(0,url.lastIndexOf("/")+1)+"media.fs";if(url.indexOf("file:///")>=0)url=unescape(url.replace("file:///",""));if(url.indexOf("file://")>=0)url=unescape(url.replace("file://","\\\\"));if(bF==0)fsp.ShowCursor=0;fsp.SetFile(url);var bP=["btnPlay","btnStop","btnNext","btnPrev","btnSound","btnAuto","btnSlide","btnScreen","ctrlbar"];J(bP);layout();K();F();oMain.style.visibility="visible";fsplayer.style.visibility="visible";var index=1;try{index=G("slide");}catch(e){}try{var t=opener.presIndex;if(t!=undefined)index=t;}catch(e){}bz=true;LoadSlide(index);};function R(){toc=new ai("outline");var aM=new ActiveXObject("Microsoft.XMLDOM");aM.async=false;aM.load("project.fsp");ak=aM.documentElement.selectSingleNode("abstract");document.title=I(ak.selectSingleNode("title").text);var bb=I(ak.selectSingleNode("author").text);ak=aM.documentElement.selectSingleNode("configure");oPhoto.innerHTML="<img id=imgPhoto src='"+ak.selectSingleNode("photo").text+"'>";var t=ak.selectSingleNode("photo").attributes.getNamedItem("size").nodeValue.split("x");oImgPhoto=C("imgPhoto");oImgPhoto.width=c(t[0]),oImgPhoto.height=c(t[1]);toc.videoSize=ak.selectSingleNode("profile").selectSingleNode("video").selectSingleNode("size").text;var t=toc.videoSize.split("x");if(oImgPhoto.width<t[0])oImgPhoto.width=t[0];if(oImgPhoto.height<t[1])oImgPhoto.height=t[1];var bu=ak.selectSingleNode("sound").text;var bL=ak.selectSingleNode("sound").getAttributeNode("volume").text;if(typeof(bu)=="string"&&bu!=""){setBgsFile(bu);setBgsVolume(bL);}ak=ak.selectSingleNode("showcursor");if(ak!=null)bF=c(ak.text);ak=aM.documentElement.selectSingleNode("index");t=ak.attributes.getNamedItem("type");if(t!=null)indexType=t.nodeValue;t=c(bl.bY(ak.attributes.getNamedItem("duration").nodeValue));if(bb!="")bb=bb+", ";oTitle.innerHTML=document.title+" <span style='font-size:10px; font-weight:normal;'>("+bb+bl.az(t)+")</span>";var aY=new Array();var pos=new Array();var url=new Array();var i;for(i=0;i<ak.childNodes.length;i++){aY[i]=I(ak.childNodes[i].selectSingleNode("title").text);pos[i]=c(ak.childNodes[i].selectSingleNode("pos").text);url[i]=(pos[i]== -1)?ak.childNodes[i].selectSingleNode("url").text:"";}pos[i]=bl.bY(ak.getAttributeNode("duration").text);toc.cb(aY,pos,url);ak=aM.documentElement.selectSingleNode("sequencing");if(ak==null)return;if(ak.childNodes.length==0)return;bB.id=ak.getAttributeNode("id").text;for(i=0;i<ak.childNodes.length;i++){var id=ak.childNodes[i].getAttributeNode("id").text;var item=ak.childNodes[i].selectSingleNode("item").text.replace(/,/g," ");var msg=ak.childNodes[i].selectSingleNode("msg").text;var must=ak.childNodes[i].selectSingleNode("item").getAttributeNode("must").text;bB.bU(id,item,msg,must);}};var bR=[-3500,-2500,-2000,-1500,-1200,-1000,-800,-600,-400,-200,0];function setBgsFile(file){document.all("bgs").src=file;};function setBgsVolume(cH){document.all("bgs").volume=bR[cH];};function layout(){var bx=document.body.clientWidth;var bm=document.body.clientHeight;var cz=c(oBar.width)/ctrlbar.style.pixelWidth;oBar.width=1;oFs.style.pixelWidth=10;oCtrl.style.pixelWidth=10;oMain.style.pixelWidth=bx;oMain.style.pixelHeight=bm;var w,h;h=clientHeight(oMain)-oTitle.style.pixelHeight-l(oFs);if(h>1024)h=1024;if(h>600&&h<740)h=600;if(h>768&&h<860)h=768;var bJ;bJ=clientWidth(oMain)-(v(oMain)+c(oImgPhoto.width))+3;bJ=c(bJ/4*3);if(h>bJ)h=bJ;if(h>1200)h=1200;oMain.style.pixelHeight=h+oTitle.style.pixelHeight+l(oFs)+l(oMain);w=c(h*4/3);w=w-w%4;oFs.style.pixelWidth=w+v(oFs);oFs.style.pixelHeight=h+l(oFs);var minWidth=v(oMain)+oFs.style.pixelWidth+v(oCtrl)+v(oPhoto)+c(oImgPhoto.width);if(oMain.style.pixelWidth<minWidth)oMain.style.pixelWidth=minWidth;var maxWidth=minWidth;if(c(oImgPhoto.width)<240)maxWidth+=60;if(oMain.style.pixelWidth>maxWidth)oMain.style.pixelWidth=maxWidth;oMain.style.left=(bx-oMain.style.pixelWidth)/2;oMain.style.top=(bm-oMain.style.pixelHeight)/2;oCtrl.style.pixelWidth=clientWidth(oMain)-oFs.style.pixelWidth;oTitle.style.pixelWidth=clientWidth(oMain)-oTitle.style.pixelHeight;h=l(oCtrl)+l(oPhotovcr)+l(oPhoto)+c(oImgPhoto.height)+l(oVcr)+oVcr.style.pixelHeight;oOutline.style.pixelHeight=oFs.style.pixelHeight-h;var area=k(oFs);fsp.style.pixelLeft=area.left;fsp.style.pixelTop=area.top;if(fshtml!=""){fshtml.style.pixelLeft=area.left;fshtml.style.pixelTop=area.top;}window.setTimeout("F()",400);var area=k(oProgbar);ctrlbar.style.pixelLeft=area.left;ctrlbar.style.pixelTop=area.top;ctrlbar.style.pixelWidth=area.width;ctrlbar.style.pixelHeight=area.height;oBar.width=cz*area.width;};function F(){var area=k(C("imgPhoto"));var w=160,h=120;if(toc.videoSize=="240x180"){w=240,h=180;}var offsetX=area.left-fsp.style.pixelLeft;var offsetY=area.top-fsp.style.pixelTop;var t=toc.videoSize.split("x");fsp.SetVideoWindowOffset(offsetX,offsetY,w,h);};window.onresize=onWinResize;function onWinResize(){if(!bz)return;layout();aq.resize.start("K()",300);};function K(){aq.resize.clear();var area=k(oFs);if(aO.width==area.width&&aO.height==area.height)return;aO=area;fsp.style.pixelWidth=area.width;fsp.style.pixelHeight=area.height;if(fshtml!=""){fshtml.style.pixelWidth=area.width;fshtml.style.pixelHeight=area.height;}fsp.resizeTo(area.width,area.height);if(!bz)return;if(!vcr.aQ){vcr.am=true;fsp.SetPos(fsp.GetPos());A(fsp.GetPos())}};function LoadSlide(aP){bB.visit(aP);var url=toc.be(aP);if(url==""){vcr.aQ=false;vcr.status="Playing";B(toc.pos[aP]);return;}vcr.aQ=true;vcr.stop();toc.setFocus(aP);toc.ca(url);oStatus.innerHTML="Inserted Object";oTime.innerHTML="";oBar.width=0;};var aA;var bS=0,cn=0,bT=0,bN=0,cI,cp;function B(pos){if(vcr.am)return;aq.clear();try{toc.setFocus(toc.bk(pos));vcr.am=true;aA=pos;cI=new Date();fsp.SetPos(pos);aq.ctrl.start("o()",500);}catch(e){alert("Seek Error!");}};function o(){aq.ctrl.clear();if(vcr.am==false)return;var w=1;var bK=fsp.LoadingPercent;if(bK>100)bK=100;var ck=0;var t=toc.pos[toc.aj];var d=fsp.DecodedFrameTime;if(d<t)d=t;if(aA-t>0){ck=c((d-t)*100/(aA-t));w=0.7;}var p=c(bK*w+ck*(1-w));if(p>100)p=100;vcr.status="Loading ... "+p+"%";var s=(d>aA)?aA:d;oStatus.innerHTML=vcr.status;aq.ctrl.start("o()",100);};function OnLeaveFullscreen(){vcr.al=false;vcr.status="Playing";oPlay.src=as.src;g();};var bw=false;function OnSetPosFinish(){aq.clear();if(fshtml!=""&&fshtml.style.visibility!="hidden"){fshtml.style.visibility="hidden";fshtml.src="blank.html";}if(bw){cp=new Date()-cI;if(bS<cp)bS=cp;bT++;bN=bN+cp;cn=c(bN/bT);oTitle.innerHTML="count = "+bT+", max = "+bS+", avg = "+cn;}if(oSound.src==at.src)oSound.src=ax.src;if(vcr.aE){vcr.status="Playing";oPlay.src=as.src;fsp.Play();}vcr.aE=true;g();vcr.am=false;if(bw)aq.bs.start("T()",8000);};function T(){var cL=fsp.GetDuration();var p=c(Math.random()*cL);B(p);};function clientWidth(el){return el.style.pixelWidth-v(el);};function clientHeight(el){return el.style.pixelHeight-l(el);};function l(el){return c(el.style.borderTopWidth)+c(el.style.borderBottomWidth)+c(el.style.paddingTop)+c(el.style.paddingBottom);};function v(el){return c(el.style.borderLeftWidth)+c(el.style.borderRightWidth)+c(el.style.paddingLeft)+c(el.style.paddingRight);};function c(value){return(value==""||value=="undefined")?0:parseInt(value,10);};function k(el){var area={left:0,top:0,width:0,height:0};area.left=0;area.top=0;var cu=el.offsetParent;while(cu){area.top+=cu.offsetTop+c(cu.style.borderTopWidth);area.left+=cu.offsetLeft+c(cu.style.borderLeftWidth);cu=cu.offsetParent;}area.top+=el.offsetTop;area.left+=el.offsetLeft;area.top+=c(el.style.borderTopWidth)+c(el.style.paddingTop);area.left+=c(el.style.borderLeftWidth)+c(el.style.paddingLeft);area.width=el.style.pixelWidth-v(el);area.height=el.style.pixelHeight-l(el);return area;};function P(){if(vcr.am)return;var keycode=window.event.keyCode;if(keycode!=13&&keycode!=0)return;var src=window.event.srcElement.id;if(src=="btnPrev")vcr.prev();if(src=="btnNext")vcr.next();if(src=="btnAuto")vcr.auto();if(src=="btnSlide")vcr.slide();if(vcr.aQ)return;switch(src){case "btnPlay":vcr.play();break;case "btnStop":vcr.aE=false;vcr.stop();break;case "btnScreen":vcr.fullscreen();break;case "btnSound":vcr.sound();break;case "ctrlbar":var p=Math.ceil((window.event.x-ctrlbar.style.pixelLeft)*toc.aV(toc.aj)/ctrlbar.style.pixelWidth);B(p+c(toc.pos[toc.aj]));break;}};function L(){if(vcr.am==true)return;var src=window.event.srcElement.id;if(src=="btnPrev"&&toc.aj>1)oPrev.src=bi.src;if(src=="btnNext"&&toc.aj<toc.length)if(toc.aj<toc.length)oNext.src=bf.src;if(vcr.aQ)return;switch(src){case "btnPlay":oPlay.src=(vcr.status=="Playing")?aW.src:bd.src;break;case "btnStop":if(vcr.status!="Stopped")oStop.src=bg.src;break;case "btnScreen":oScreen.src=au.src;break;}};var cB,cJ;function U(){ar.style.pixelLeft=cB-6;ar.style.pixelTop=cJ+25;var cx=Math.ceil(((cB-ctrlbar.style.pixelLeft)*toc.aV(toc.aj))/ctrlbar.style.pixelWidth);ar.innerHTML=bl.az(cx);};function M(){if(window.event.srcElement.id=="ctrlbar"){cB=window.event.x;cJ=window.event.y;return;}if(aq.bs.bA!=0){aq.bs.clear();ar.style.visibility="hidden";}};function O(){if(vcr.am)return;var src=window.event.srcElement.id;if(src=="btnPrev"&&toc.aj>1)oPrev.src=bj.src;if(src=="btnNext"&&toc.aj<toc.length)oNext.src=bc.src;if(vcr.aQ)return;switch(src){case "btnPlay":oPlay.src=(vcr.status=="Playing")?aX.src:aG.src;break;case "btnStop":if(vcr.status!="Stopped")oStop.src=bh.src;break;case "btnScreen":oScreen.src=av.src;break;case "btnSound":oSound.src=(vcr.aL)?aJ.src:aB.src;break;case "btnAuto":oAuto.src=(vcr.ap)?aU.src:aH.src;break;case "btnSlide":oSlide.src=(vcr.aI)?aK.src:aD.src;break;case "ctrlbar":ar.style.visibility="visible";aq.bs.startInterval("U()",100);break;}};function Q(){var src=window.event.srcElement.id;switch(src){case "btnPlay":oPlay.src=(vcr.status=="Playing")?as.src:bn.src;break;case "btnStop":oStop.src=bp.src;break;case "btnPrev":oPrev.src=bq.src;break;case "btnNext":oNext.src=bo.src;break;case "btnScreen":oScreen.src=aT.src;break;case "btnSound":oSound.src=(vcr.aL)?ax.src:at.src;break;case "btnAuto":oAuto.src=(vcr.ap)?aZ.src:aN.src;break;case "btnSlide":oSlide.src=(vcr.aI)?aR.src:aF.src;break;case "ctrlbar":aq.bs.clear();ar.style.visibility="hidden";}};function r(){var pos=fsp.GetPos();var ay=toc.bk(pos);if(vcr.status!="Stopped"){var co=toc.bH(pos);if(co==2){if(vcr.al)vcr.leaveFullscreen();vcr.stop();A(toc.pos[ay]+toc.aV(ay)-1);if(toc.aj<toc.length){if(f(this.aP)==false)return false;LoadSlide(toc.aj+1);}return false;}if(co==1){if(!vcr.ap&& !vcr.al){vcr.stop();A(toc.pos[ay]+toc.aV(ay)-1);return false;}if(f(toc.aj+1)==false)return;bB.visit(toc.aj+1);var url=toc.be(toc.aj+1);if(url!=""){if(vcr.al)vcr.leaveFullscreen();LoadSlide(toc.aj+1);return false;}}}return A(pos);};function A(pos){var ay=toc.bk(pos);var duration=toc.aV(ay);pos=pos-toc.pos[ay];if(pos>duration)pos=duration;if(duration==0)return false;if(vcr.al){fsp.SetStatus(bl.az(pos)+" / "+bl.az(duration));}if(!vcr.am&&(ay!=toc.aj))toc.setFocus(ay);oStatus.innerHTML=vcr.status;oTime.innerHTML=(vcr.status.indexOf("Loading")== -1)?bl.az(pos)+" / "+bl.az(duration):"";var w=pos/duration*oProgbar.style.pixelWidth;oBar.width=(w>ctrlbar.style.pixelWidth)?ctrlbar.style.pixelWidth:c(w);return true;};function g(){aq.progbar.clear();if(!r())return;aq.progbar.start("g()",70);};function ai(aC){this.aC=C(aC);this.videoSize="";this.duration=0;this.length=0;this.aj=1;this.pos=new Array();this.len=new Array();this.url=new Array();};ai.prototype={cb:function(aY,pos,url){this.length=aY.length;this.duration=pos[this.length];var toc0=0,toc1=0,ao,i,j;for(i=1;i<=this.length;i++){this.pos[i]=pos[i-1];this.url[i]=url[i-1];this.len[i]=0;if(pos[i-1]!= -1){for(j=i;;j++)if(pos[j]!= -1)break;this.len[i]=pos[j]-pos[i-1];}var title=aY[i-1],ci=" ("+bl.az(c(this.len[i]))+")";if(title.indexOf("...")==0){toc1++;ao="toc1";bt=title.substr(3);title=(indexType=="OL")?toc0+"."+toc1+" "+bt:bt;}else{toc0++;toc1=0;ao="toc0";bt=title;title=(indexType=="OL")?toc0+". "+bt:bt;}if(pos[i-1]== -1)ci="";var el=document.createElement("DIV");el.id="toc"+i;el.aP=i;el.bW=this;el.className=ao;el.innerHTML="<div style='padding:3px 0px 0px 0px'>"+title+"</div><div id=thumbnail"+i+" style='display:none'></div>";el.title=bt+ci;el.onclick=this.onClick;el.tabIndex=tabindex++;el.onkeyup=this.onClick;el.onmouseover=this.onOver;el.onmouseout=this.onOut;this.aC.appendChild(el);}this.pos[i]=this.duration;},onClick:function(){var keycode=window.event.keyCode;if(keycode!=13&&keycode!=0)return;if(vcr.am==true)return;if(f(this.aP)==false)return false;this.bW.aj=this.aP;LoadSlide(this.bW.aj);},onOver:function(){if(this.aP==this.bW.aj)return;var ao=this.className.split(" ");this.className=ao[0]+" tocOver";},onOut:function(){if(this.aP==this.bW.aj)return;var ao=this.className.split(" ");this.className=ao[0];},setFocus:function(aP){this.aj=aP;var ctrl=this.aC;for(var i=1;i<=ctrl.childNodes.length;i++){var toc=C("toc"+i);var ao=toc.className.split(" ");toc.className=ao[0];if(i==aP){toc.className=ao[0]+" tocFocus";if((toc.offsetTop<ctrl.scrollTop)||(toc.offsetTop>ctrl.scrollTop+ctrl.clientHeight-20)){ctrl.scrollTop=toc.offsetTop-(ctrl.clientHeight)*0.5;}ctrl.focus();}}},bk:function(pos){var i,j;for(i=1;i<=this.pos.length;i++)if(pos<this.pos[i])break;for(j=i-1;;j--)if(this.pos[j]!= -1)break;return j;},ca:function(url){if(fshtmldiv==""){var el=ac("div");el.id="fsdiv";C("body").appendChild(el);fshtmldiv=C("fsdiv");}var area=k(oFs);if(fshtml==""||url.indexOf(".mht")>0){fshtmldiv.innerHTML="";fshtmldiv.innerHTML="<iframe id=fshtml frameBorder=0 src='"+url+"' style='position:absolute; z-index:101; left:"+area.left+"px; top:"+area.top+"px; width:"+area.width+"px; height:"+area.height+"px'></iframe>";fshtml=C("fshtml");}else{fshtml.style.visibility="visible";fshtml.src=url;}},aV:function(n){return c(this.len[n]);},be:function(n){return this.url[n];},isAutoNext:function(){return vcr.ap;},cD:function(){return(this.aj<toc.length)?true:false;},cC:function(){return(this.aj>1)?true:false;},bH:function(pos){if(pos>=this.duration-300)return 2;if(pos>=this.pos[this.aj]+this.len[this.aj]-170)return 1;return 0;}};function G(bV){var cr=window.location.search.substring(1);var cl=cr.split("&");for(var i=0;i<cl.length;i++){var aS=cl[i].split("=");if(aS[0]==bV){return aS[1];}}return 1;};function I(text){var html=text.replace(/&/,"&amp;");html=html.replace(/</,"&lt;");html=html.replace(/>/,"&gt;");html=html.replace(/\r\n/,"<br>");html=html.replace(/\n/,"<br>");html=html.replace(/\r/,"<br>");return(html);};function ah(){this.al=false;this.aE=true;this.aQ=false;this.am=false;this.aL=true;this.ap=true;this.aI=false;this.ba=false;this.status="";};ah.prototype={play:function(){if(this.am==true)return;if(this.aQ)return;if(this.status=="Playing"){fsp.Pause();this.status="Paused";oPlay.src=aG.src;r();return;}if(this.status=="Paused"){fsp.Resume();this.status="Playing";oPlay.src=as.src;g();return;}if(f(this.aP)==false)return false;LoadSlide(toc.aj);oPlay.src=as.src;},stop:function(){if(this.status=="Stopped")return;aq.clear();this.am=false;fsp.Stop();oStop.src=bp.src;oPlay.src=bn.src;this.status="Stopped";r();if(!this.aE)B(toc.pos[toc.aj]);},next:function(){if(this.am==true)return;if(toc.aj<toc.length){if(f(toc.aj+1)==false)return false;oNext.src=bo.src;LoadSlide(toc.aj+1);}},prev:function(){if(this.am==true)return;if(toc.aj>1){if(f(toc.aj-1)==false)return false;oPrev.src=bq.src;LoadSlide(toc.aj-1);}},sound:function(){this.aL= !this.aL;oSound.src=(this.aL)?ax.src:at.src;fsp.Volume=(this.aL)?1:0;},auto:function(){this.ap= !this.ap;oAuto.src=(this.ap)?aZ.src:aN.src;},slide:function(){this.aI= !this.aI;oSlide.src=(this.aI)?aR.src:aF.src;var cg=(this.aI)?"block":"none";for(var i=1;i<=toc.length;i++){var ctrl=C("thumbnail"+i);var jpg=(toc.url[i]=="")?toc.pos[i]:toc.url[i].substr(0,toc.url[i].indexOf("/"));if(!this.ba)ctrl.innerHTML="<img style='width:120px; height:90px; border:1px solid #aaaaaa' src='thumbnails/"+jpg+".jpg'>";ctrl.style.display=cg;}this.ba=true;},fullscreen:function(){if(this.aQ)return;if(this.al)return;var msg=C("msgFullscreen");msg.style.visibility="visible";msg.style.left=oMain.style.pixelLeft+oMain.style.pixelWidth-250;msg.style.top=oMain.style.pixelTop+10;fsp.EnterFullScreen();msg.style.visibility="hidden";this.al=true;},leaveFullscreen:function(){if(this.aQ)return;if(!this.al)return;fsp.LeaveFullScreen();this.al=false;}};vcr=new ah();function ae(){this.bA=0;this.type=0;};ae.prototype={start:function(bO,cA){this.clear();this.type=0;this.bA=window.setTimeout(bO,cA);},startInterval:function(bO,cA){this.clear();this.type=1;this.bA=window.setInterval(bO,cA);},clear:function(){if(this.bA!=0){try{if(this.type==0)window.clearTimeout(this.bA);else window.clearInterval(this.bA);}catch(e){}this.bA=0;}}};function ag(){this.resize=new ae();this.progbar=new ae();this.ctrl=new ae();this.bs=new ae();this.cc=new ae();};ag.prototype={clear:function(){this.resize.clear();this.progbar.clear();this.ctrl.clear();this.bs.clear();this.cc.clear();}};aq=new ag();function af(){};af.prototype={bY:function(ct){var t=ct.split(":");if(t.length==3)bX=c(t[0])*3600000+c(t[1])*60000+c(t[2]*1000);else bX=c(t[0])*60000+c(t[1]*1000);return bX;},az:function(bI){bI=bI/1000;var cw=c(bI/3600);var mm=c((bI-cw*3600)/60);var cf=c(bI%60);if(mm<10)mm="0"+mm;if(cf<10)cf="0"+cf;if(cw==0)return mm+":"+cf;else return cw+":"+mm+":"+cf;},cO:function(bZ){var t=bZ.split(":");return(t[0]=="0")?t[1]+":"+t[2]:t[0]+":"+t[1]+":"+t[2];}};bl=new af();function f(aP){if(bB.isReady(aP)==false&&vcr.al==false){vcr.stop();var cd=bB.bQ(aP);if(cd.must=="true"){alert(cd.msg);return false;}if(confirm(cd.msg)==false)return false;}return true;};function ad(){this.id="";this.slide=new Array();};ad.prototype={bU:function(id,item,msg,must){this.slide[id]={"id":id,"item":item,"msg":msg,"must":must};},visit:function(id){this.an(id);},isReady:function(id){var visited="  "+this.bv()+" ";var t=this.getItem(id);if(t=="")return true;t=t.split(" ");for(var i=0;i<t.length;i++){if(visited.indexOf(" "+t[i]+" ")== -1)return false;}return true;},getItem:function(id){return(this.aw(id))?this.slide[id].item:"";},cq:function(id){return(this.aw(id))?this.slide[id].item:"";},cE:function(id){return(this.aw(id))?this.slide[id].must:"";},bQ:function(id){return(this.aw(id))?this.slide[id]:"";},aw:function(id){return(typeof(this.slide[id])=="undefined")?false:true;},an:function(bC){var visited=this.bv();if(visited.indexOf(" "+bC+" ")>0)return;if(visited!="")visited+=" ";visited=visited+bC;var cs=new Date();var cj=new Date(cs.getTime()+3*1000*60*60*24);document.cookie=this.id+"="+visited+";expires="+cj.toGMTString()+";";},bv:function(){var bD=document.cookie.split("; ");for(var i=0;i<bD.length;i++){var bM=bD[i].split("=");if(this.id==bM[0])return "  "+unescape(bM[1])+" ";}return "";}};bB=new ad();function J(vcr){for(i=0;i<vcr.length;i++){var ctrl=C(vcr[i]);ctrl.onmouseup=P;ctrl.onkeyup=P;if(vcr[i]!="ctrlbar")ctrl.tabIndex=tabindex++;ctrl.onmousedown=L;ctrl.onmouseover=O;ctrl.onmouseout=Q;ctrl.onmousemove=M;}};function H(){fsp=C("fsplayer");try{if(!fsp.isReady){m();return false;}var by=C("_ii");if(by!=null)by.style.visibility="hidden";return true;}catch(e){m();return false;}};function m(){if(C("_ii")==null){var by=document.createElement("div");var cK=(document.body.clientWidth-340)/2;var cN=(document.body.clientHeight-20)/2;by.style.position="absolute";by.style.left=cK;by.style.top=cN;by.id="_ii";by.style.color="white";by.style.fontSize="15px";by.style.backgroundColor="red";by.innerHTML=" &nbsp; please install fsPlayer to view PowerCam content. &nbsp; ";document.getElementsByTagName("body")[0].appendChild(by);}};var bE=0;function ab(msg){bE++;if(C("_debug")==null){var bG=document.createElement("div");bG.style.position="absolute";bG.style.left=0;bG.style.top=0;bG.style.height="600px";bG.style.width="200px";bG.id="_debug";bG.style.overflow="auto";bG.style.backgroundColor="yellow";document.getElementsByTagName("body")[0].appendChild(bG);}var cv=C("_debug");cv.innerHTML=cv.innerHTML+"<br>"+bE+": "+msg;}