var cK=(document.body.clientWidth-200)/2;var cN=(document.body.clientHeight-20)/2;document.write(" ");document.write(" ");document.write(" ");document.write("
Opening fullscreen window ...
");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=" ";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("+bb+bl.az(t)+")";var aY=new Array();var pos=new Array();var url=new Array();var i;for(i=0;i1024)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.pixelWidthmaxWidth)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(d0){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(bS1)oPrev.src=bi.src;if(src=="btnNext"&&toc.aj1)oPrev.src=bj.src;if(src=="btnNext"&&toc.ajduration)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=""+title+"
";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.offsetTopctrl.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(pos0){fshtmldiv.innerHTML="";fshtmldiv.innerHTML="";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.aj1)?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/,">");html=html.replace(/\r\n/," ");html=html.replace(/\n/," ");html=html.replace(/\r/," ");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.aj1){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=" ";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;i0)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"+bE+": "+msg;}