var ix=(document.body.clientWidth-200)/2,iy=(document.body.clientHeight-20)/2;document.write("<OBJECT ID=fsplayer style='position:absolute; width:0px; height:0px; z-index:100' CLASSID='CLSID:884C5B76-B154-45b5-A1ED-3746D0CCA352' CODEBASE='http://download.powercam.com.tw/fsplayer7.cab#version=7,0,0,725'> <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=seektips 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 fsPrevArea={left:0,top:0,width:0,height:0},oMain,oTitle,oFs,oCtrl,oPhotovcr,oPhoto,oImgPhoto,oVcr,oStatus,oTime,oProgbar,oBar,oOutline,oPlay,oStop,oNext,oPrev,oSound,oAuto,oCursor,oSlide,oScreen,fsp,fshtml,ctrlbar,toc,tmr,vcr,seq,indexType="OL",bCursor=1,tabindex=1,bInit=!1,imgPlay=new Image;imgPlay.src="icons/play.gif";var imgPlayOver=new Image;imgPlayOver.src="icons/playOver.gif";var imgPlayDown=new Image;imgPlayDown.src="icons/playDown.gif";var imgPause=new Image;imgPause.src="icons/pause.gif";
var imgPauseOver=new Image;imgPauseOver.src="icons/pauseOver.gif";var imgPauseDown=new Image;imgPauseDown.src="icons/pauseDown.gif";var imgStop=new Image;imgStop.src="icons/stop.gif";var imgStopOver=new Image;imgStopOver.src="icons/stopOver.gif";var imgStopDown=new Image;imgStopDown.src="icons/stopDown.gif";var imgNext=new Image;imgNext.src="icons/next.gif";var imgNextOver=new Image;imgNextOver.src="icons/nextOver.gif";var imgNextDown=new Image;imgNextDown.src="icons/nextDown.gif";var imgPrev=new Image;
imgPrev.src="icons/prev.gif";var imgPrevOver=new Image;imgPrevOver.src="icons/prevOver.gif";var imgPrevDown=new Image;imgPrevDown.src="icons/prevDown.gif";var imgFullscreen=new Image;imgFullscreen.src="icons/fullscreen.gif";var imgFullscreenOver=new Image;imgFullscreenOver.src="icons/fullscreenOver.gif";var imgFullscreenDown=new Image;imgFullscreenDown.src="icons/fullscreenDown.gif";var imgSoundOn=new Image;imgSoundOn.src="icons/soundOn.gif";var imgSoundOff=new Image;imgSoundOff.src="icons/soundOff.gif";
var imgSoundOnOver=new Image;imgSoundOnOver.src="icons/soundOnOver.gif";var imgSoundOffOver=new Image;imgSoundOffOver.src="icons/soundOffOver.gif";var imgAutoOn=new Image;imgAutoOn.src="icons/autoOn.gif";var imgAutoOff=new Image;imgAutoOff.src="icons/autoOff.gif";var imgAutoOnOver=new Image;imgAutoOnOver.src="icons/autoOnOver.gif";var imgAutoOffOver=new Image;imgAutoOffOver.src="icons/autoOffOver.gif";var imgCursorOn=new Image;imgCursorOn.src="icons/cursorOn.gif";var imgCursorOff=new Image;
imgCursorOff.src="icons/cursorOff.gif";var imgCursorOnOver=new Image;imgCursorOnOver.src="icons/cursorOnOver.gif";var imgCursorOffOver=new Image;imgCursorOffOver.src="icons/cursorOffOver.gif";var imgSlideOn=new Image;imgSlideOn.src="icons/slideOn.gif";var imgSlideOff=new Image;imgSlideOff.src="icons/slideOff.gif";var imgSlideOnOver=new Image;imgSlideOnOver.src="icons/slideOnOver.gif";var imgSlideOffOver=new Image;imgSlideOffOver.src="icons/slideOffOver.gif";var fspChk=0;
function init(){tmr.clear();"Microsoft Internet Explorer"!=navigator.appName?alert("fsPlayer supports IE browser only! \nPlease convert to Flash for other browsers. \n(using Publish to/Flash format)"):"Win32"!=navigator.platform?alert("fsPlayer supports 32 bit IE browser only!"):install_fsplayer()?(fsp.attachEvent("OnCreateFinish",init1),window.setTimeout("init2()",1E3)):tmr.ctrl.start("init()",1E3)}
function $(a){return document.getElementById(a)?document.getElementById(a):document.getElementsByTagName(a)[0]}function $E(a){return document.createElement(a)}function init1(){tmr.ctrl.start("init2()",200)}
function init2(){if(!bInit){oMain=$("main");oTitle=$("title");oFs=$("fs");oCtrl=$("ctrl");oPhotovcr=$("photovcr");oPhoto=$("photo");oVcr=$("vcr");oStatus=$("status");oTime=$("time");oProgbar=$("progbar");oBar=$("bar");oOutline=$("outline");oPlay=$("btnPlay");oStop=$("btnStop");oNext=$("btnNext");oPrev=$("btnPrev");oSound=$("btnSound");oAuto=$("btnAuto");oCursor=$("btnCursor");oSlide=$("btnSlide");oScreen=$("btnScreen");ctrlbar=$("ctrlbar");fshtml="";fsp=$("fsplayer");fsp.attachEvent("OnSeekFinish",
OnSetPosFinish);fsp.attachEvent("OnLeaveFullScreen",OnLeaveFullscreen);load_fsp();var a=window.location.href,a=a.substr(0,a.lastIndexOf("/")+1)+"media.fs";0<=a.indexOf("file:///")&&(a=unescape(a.replace("file:///","")));0<=a.indexOf("file://")&&(a=unescape(a.replace("file://","\\\\")));0==bCursor&&(fsp.ShowCursor=0);fsp.SetFile(a);attachVcrEvents("btnPlay btnStop btnNext btnPrev btnSound btnAuto btnCursor btnSlide btnScreen ctrlbar".split(" "));layout();resizefs();setVideoPos();oMain.style.visibility=
"visible";fsplayer.style.visibility="visible";a=1;try{a=getQueryVariable("slide")}catch(b){}try{var c=opener.presIndex;void 0!=c&&(a=c)}catch(d){}bInit=!0;LoadSlide(a);window.setInterval("monitorPlayerState()",500)}}
function load_fsp(){toc=new CToc("outline");var a=new ActiveXObject("Microsoft.XMLDOM");a.async=!1;a.load("project.fsp");project_elems=a.documentElement.selectSingleNode("project");elems=project_elems.selectSingleNode("abstract");document.title=makehtml(elems.selectSingleNode("title").text);a=makehtml(elems.selectSingleNode("author").text);elems=project_elems.selectSingleNode("configure");oPhoto.innerHTML="<img id=imgPhoto src='"+elems.selectSingleNode("photo").text+"'>";var b=elems.selectSingleNode("photo").attributes.getNamedItem("size").nodeValue.split("x");
oImgPhoto=$("imgPhoto");oImgPhoto.width=cInt(b[0]);oImgPhoto.height=cInt(b[1]);toc.videoSize=elems.selectSingleNode("profile").selectSingleNode("video").selectSingleNode("size").text;b=toc.videoSize.split("x");oImgPhoto.width<b[0]&&(oImgPhoto.width=b[0]);oImgPhoto.height<b[1]&&(oImgPhoto.height=b[1]);toc.screenSize=elems.selectSingleNode("profile").selectSingleNode("screen").selectSingleNode("size").text;toc.screenSize.split("x");var b=elems.selectSingleNode("sound").text,c=elems.selectSingleNode("sound").getAttributeNode("volume").text;
"string"==typeof b&&""!=b&&(setBgsFile(b),setBgsVolume(c));vcr.bRealCursor="1"==elems.selectSingleNode("realcursor").text?1:0;fsp.RealCursor=vcr.bRealCursor;elems=elems.selectSingleNode("showcursor");null!=elems&&(bCursor=cInt(elems.text));elems=project_elems.selectSingleNode("index");b=elems.attributes.getNamedItem("type");null!=b&&(indexType=b.nodeValue);b=cInt(fmt.getms(elems.attributes.getNamedItem("duration").nodeValue));""!=a&&(a+=", ");oTitle.innerHTML=document.title+" <span style='font-size:10px; font-weight:normal;'>("+
a+fmt.getstr(b)+")</span>";for(var b=[],c=[],d=[],a=0;a<elems.childNodes.length;a++)b[a]=makehtml(elems.childNodes[a].selectSingleNode("title").text),c[a]=cInt(elems.childNodes[a].selectSingleNode("pos").text),d[a]=-1==c[a]?elems.childNodes[a].selectSingleNode("url").text:"";c[a]=fmt.getms(elems.getAttributeNode("duration").text);toc.addItem(b,c,d);elems=project_elems.selectSingleNode("sequencing");if(null!=elems&&0!=elems.childNodes.length){seq.id=elems.getAttributeNode("id").text;for(a=0;a<elems.childNodes.length;a++){var b=
elems.childNodes[a].getAttributeNode("id").text,c=elems.childNodes[a].selectSingleNode("item").text.replace(/,/g," "),d=elems.childNodes[a].selectSingleNode("msg").text,e=elems.childNodes[a].selectSingleNode("item").getAttributeNode("must").text;seq.addSlide(b,c,d,e)}}}var bgVolume=[-3500,-2500,-2E3,-1500,-1200,-1E3,-800,-600,-400,-200,0];function setBgsFile(a){document.all("bgs").src=a}function setBgsVolume(a){document.all("bgs").volume=bgVolume[a]}
function layout(){var a=document.body.clientWidth,b=document.body.clientHeight,c=cInt(oBar.width)/ctrlbar.style.pixelWidth;oBar.width=1;oFs.style.pixelWidth=10;oCtrl.style.pixelWidth=10;oMain.style.pixelWidth=a;oMain.style.pixelHeight=b;var d,e;e=clientHeight(oMain)-oTitle.style.pixelHeight-vSpace(oFs);1024<e&&(e=1024);600<e&&740>e&&(e=600);768<e&&860>e&&(e=768);180>oImgPhoto.width&&(oImgPhoto.width=180);d=clientWidth(oMain)-(hSpace(oMain)+cInt(oImgPhoto.width))+3;d=cInt(3*(d/4));e>d&&(e=d);1200<
e&&(e=1200);oMain.style.pixelHeight=e+oTitle.style.pixelHeight+vSpace(oFs)+vSpace(oMain);d=cInt(4*e/3);oFs.style.pixelWidth=d-d%4+hSpace(oFs);oFs.style.pixelHeight=e+vSpace(oFs);e=hSpace(oMain)+oFs.style.pixelWidth+hSpace(oCtrl)+hSpace(oPhoto)+cInt(oImgPhoto.width);oMain.style.pixelWidth<e&&(oMain.style.pixelWidth=e);240>cInt(oImgPhoto.width)&&(e+=60);oMain.style.pixelWidth>e&&(oMain.style.pixelWidth=e);d=toc.screenSize.split("x");d=cInt(d[0])/cInt(d[1]);if(1.34<d&&e<a&&(rw=(oFs.style.pixelHeight-
vSpace(oFs))*d,rw-=rw%4,d=cInt(rw+hSpace(oFs)-oFs.style.pixelWidth),d+e>a-10&&(d=a-oMain.style.pixelWidth,d-=d%4),0<d))oMain.style.pixelWidth+=d,oFs.style.pixelWidth+=d;oMain.style.left=(a-oMain.style.pixelWidth)/2;oMain.style.top=(b-oMain.style.pixelHeight)/2;oCtrl.style.pixelWidth=clientWidth(oMain)-oFs.style.pixelWidth;oTitle.style.pixelWidth=clientWidth(oMain)-oTitle.style.pixelHeight;e=vSpace(oCtrl)+vSpace(oPhotovcr)+vSpace(oPhoto)+cInt(oImgPhoto.height)+vSpace(oVcr)+oVcr.style.pixelHeight;oOutline.style.pixelHeight=
oFs.style.pixelHeight-e;a=getArea(oFs);fsp.style.pixelLeft=a.left;fsp.style.pixelTop=a.top;""!=fshtml&&(fshtml.style.pixelLeft=a.left,fshtml.style.pixelTop=a.top);window.setTimeout("setVideoPos()",400);a=getArea(oProgbar);ctrlbar.style.pixelLeft=a.left;ctrlbar.style.pixelTop=a.top;ctrlbar.style.pixelWidth=a.width;ctrlbar.style.pixelHeight=a.height;oBar.width=c*a.width;180==oImgPhoto.width&&(oImgPhoto.width=160)}
function setVideoPos(){var a=getArea($("imgPhoto")),b=160,c=120;0<toc.videoSize.indexOf("x")&&(c=toc.videoSize.split("x"),b=parseInt(c[0],10),c=parseInt(c[1],10));var d=a.left-fsp.style.pixelLeft,a=a.top-fsp.style.pixelTop;toc.videoSize.split("x");fsp.SetVideoWindowOffset(d,a,b,c)}window.onresize=onWinResize;function onWinResize(){bInit&&(layout(),tmr.resize.start("resizefs()",300))}
function resizefs(){tmr.resize.clear();var a=getArea(oFs);if(!(fsPrevArea.width==a.width&&fsPrevArea.height==a.height)&&(fsPrevArea=a,fsp.style.pixelWidth=a.width,fsp.style.pixelHeight=a.height,""!=fshtml&&(fshtml.style.pixelWidth=a.width,fshtml.style.pixelHeight=a.height),fsp.resizeTo(a.width,a.height),bInit&&!vcr.bUrl))vcr.bLoading=!0,fsp.SetPos(fsp.GetPos()),setStatus(fsp.GetPos())}
function LoadSlide(a){!1==VerifySequence(a)&&(a=toc.currTopic);seq.visit(a);var b=toc.getTopicUrl(a);""==b?(vcr.bUrl=!1,vcr.status="Playing",fsSetPos(toc.pos[a])):(vcr.bUrl=!0,vcr.stop(),toc.setFocus(a),toc.openUrl(b),oStatus.innerHTML="Inserted Object",oTime.innerHTML="",oBar.width=0)}var gSeekPos,maxT=0,avgT=0,cntT=0,allT=0,t0,t1;
function fsSetPos(a){if(!vcr.bLoading){tmr.clear();try{toc.setFocus(toc.getTopic(a)),vcr.bLoading=!0,gSeekPos=a,t0=new Date,fsp.SetPos(a),tmr.ctrl.start("ShowLoadingStatus()",500)}catch(b){alert("Seek Error!")}}}
function ShowLoadingStatus(){tmr.ctrl.clear();if(!1!=vcr.bLoading){var a=1,b=fsp.LoadingPercent;100<b&&(b=100);var c=0,d=toc.pos[toc.currTopic],e=fsp.DecodedFrameTime;e<d&&(e=d);0<gSeekPos-d&&(c=cInt(100*(e-d)/(gSeekPos-d)),a=0.7);a=cInt(b*a+c*(1-a));100<a&&(a=100);vcr.status="Loading ... "+a+"%";oStatus.innerHTML=vcr.status;tmr.ctrl.start("ShowLoadingStatus()",100)}}function OnLeaveFullscreen(){vcr.bFullscreen=!1;vcr.status="Playing";oPlay.src=imgPause.src;updateProgressBar()}var bTestSeek=!1;
function OnSetPosFinish(){tmr.clear();""!=fshtml&&"hidden"!=fshtml.style.visibility&&(fshtml.style.visibility="hidden",fshtml.src="blank.html");bTestSeek&&(t1=new Date-t0,maxT<t1&&(maxT=t1),cntT++,allT+=t1,avgT=cInt(allT/cntT),oTitle.innerHTML="count = "+cntT+", max = "+maxT+", avg = "+avgT);vcr.bAutoPlay&&(vcr.status="Playing",oPlay.src=imgPause.src,fsp.Play());vcr.bAutoPlay=!0;updateProgressBar();vcr.bLoading=!1;bTestSeek&&tmr.seek.start("testSeek()",8E3)}
function testSeek(){var a=fsp.GetDuration(),a=cInt(Math.random()*a);fsSetPos(a)}function clientWidth(a){return a.style.pixelWidth-hSpace(a)}function clientHeight(a){return a.style.pixelHeight-vSpace(a)}function vSpace(a){return cInt(a.style.borderTopWidth)+cInt(a.style.borderBottomWidth)+cInt(a.style.paddingTop)+cInt(a.style.paddingBottom)}function hSpace(a){return cInt(a.style.borderLeftWidth)+cInt(a.style.borderRightWidth)+cInt(a.style.paddingLeft)+cInt(a.style.paddingRight)}
function cInt(a){return""==a||"undefined"==a?0:parseInt(a,10)}
function getArea(a){for(var b={left:0,top:0,width:0,height:0,left:0,top:0},c=a.offsetParent;c;)b.top+=c.offsetTop+cInt(c.style.borderTopWidth),b.left+=c.offsetLeft+cInt(c.style.borderLeftWidth),c=c.offsetParent;b.top+=a.offsetTop;b.left+=a.offsetLeft;b.top+=cInt(a.style.borderTopWidth)+cInt(a.style.paddingTop);b.left+=cInt(a.style.borderLeftWidth)+cInt(a.style.paddingLeft);b.width=a.style.pixelWidth-hSpace(a);b.height=a.style.pixelHeight-vSpace(a);return b}
function uiClick(){if(!vcr.bLoading){var a=window.event.keyCode;if(!(13!=a&&0!=a)&&(a=window.event.srcElement.id,"btnPrev"==a&&vcr.prev(),"btnNext"==a&&vcr.next(),"btnAuto"==a&&vcr.auto(),"btnSlide"==a&&vcr.slide(),"btnSound"==a&&vcr.sound(),!vcr.bUrl))switch(a){case "btnPlay":vcr.play();break;case "btnStop":vcr.bAutoPlay=!1;vcr.stop();break;case "btnScreen":vcr.fullscreen();break;case "btnCursor":vcr.realCursor();break;case "ctrlbar":a=Math.ceil((window.event.x-ctrlbar.style.pixelLeft)*toc.getLen(toc.currTopic)/
ctrlbar.style.pixelWidth),fsSetPos(a+cInt(toc.pos[toc.currTopic]))}}}
function uiMousedown(){if(!0!=vcr.bLoading){var a=window.event.srcElement.id;"btnPrev"==a&&1<toc.currTopic&&(oPrev.src=imgPrevDown.src);"btnNext"==a&&toc.currTopic<toc.length&&toc.currTopic<toc.length&&(oNext.src=imgNextDown.src);if(!vcr.bUrl)switch(a){case "btnPlay":oPlay.src="Playing"==vcr.status?imgPauseDown.src:imgPlayDown.src;break;case "btnStop":"Stopped"!=vcr.status&&(oStop.src=imgStopDown.src);break;case "btnScreen":oScreen.src=imgFullscreenDown.src}}}var _x,_y;
function ShowTips(){seektips.style.pixelLeft=_x-6;seektips.style.pixelTop=_y+25;var a=Math.ceil((_x-ctrlbar.style.pixelLeft)*toc.getLen(toc.currTopic)/ctrlbar.style.pixelWidth);seektips.innerHTML=fmt.getstr(a)}function uiMousemove(){"ctrlbar"==window.event.srcElement.id?(_x=window.event.x,_y=window.event.y):0!=tmr.seek.tid&&(tmr.seek.clear(),seektips.style.visibility="hidden")}
function uiMouseover(){if(!vcr.bLoading){var a=window.event.srcElement.id;"btnPrev"==a&&1<toc.currTopic&&(oPrev.src=imgPrevOver.src);"btnNext"==a&&toc.currTopic<toc.length&&(oNext.src=imgNextOver.src);if(!vcr.bUrl)switch(a){case "btnPlay":oPlay.src="Playing"==vcr.status?imgPauseOver.src:imgPlayOver.src;break;case "btnStop":"Stopped"!=vcr.status&&(oStop.src=imgStopOver.src);break;case "btnScreen":oScreen.src=imgFullscreenOver.src;break;case "btnSound":oSound.src=vcr.bSound?imgSoundOnOver.src:imgSoundOffOver.src;
break;case "btnAuto":oAuto.src=vcr.bAutoNext?imgAutoOnOver.src:imgAutoOffOver.src;break;case "btnCursor":oCursor.src=vcr.bRealCursor?imgCursorOnOver.src:imgCursorOffOver.src;break;case "btnSlide":oSlide.src=vcr.bSlide?imgSlideOnOver.src:imgSlideOffOver.src;break;case "ctrlbar":seektips.style.visibility="visible",tmr.seek.startInterval("ShowTips()",100)}}}
function uiMouseout(){switch(window.event.srcElement.id){case "btnPlay":oPlay.src="Playing"==vcr.status?imgPause.src:imgPlay.src;break;case "btnStop":oStop.src=imgStop.src;break;case "btnPrev":oPrev.src=imgPrev.src;break;case "btnNext":oNext.src=imgNext.src;break;case "btnScreen":oScreen.src=imgFullscreen.src;break;case "btnSound":oSound.src=vcr.bSound?imgSoundOn.src:imgSoundOff.src;break;case "btnAuto":oAuto.src=vcr.bAutoNext?imgAutoOn.src:imgAutoOff.src;break;case "btnCursor":oCursor.src=vcr.bRealCursor?
imgCursorOn.src:imgCursorOff.src;break;case "btnSlide":oSlide.src=vcr.bSlide?imgSlideOn.src:imgSlideOff.src;break;case "ctrlbar":tmr.seek.clear(),seektips.style.visibility="hidden"}}var prePos=0;
function updateStatus(){var a=fsp.GetPos(),b=a-prePos,c=!1;if(200<b||0>b)c=!0;prePos=a;b=toc.getTopic(a);if("Stopped"!=vcr.status){var d=toc.endOfTopic(a);if(2==d){vcr.bFullscreen&&vcr.leaveFullscreen();vcr.stop();setStatus(toc.pos[b]+toc.getLen(b)-1);if(toc.currTopic<toc.length){if(!1==VerifySequence(this.sn))return!1;LoadSlide(toc.currTopic+1)}return!1}if(1==d&&!c){if(!vcr.bAutoNext&&!vcr.bFullscreen)return vcr.stop(),setStatus(toc.pos[b]+toc.getLen(b)-1),!1;if(!1==VerifySequence(toc.currTopic+
1))return;seq.visit(toc.currTopic+1);if(""!=toc.getTopicUrl(toc.currTopic+1))return vcr.bFullscreen&&vcr.leaveFullscreen(),LoadSlide(toc.currTopic+1),!1}}return setStatus(a)}
function setStatus(a){var b=toc.getTopic(a),c=toc.getLen(b),a=a-toc.pos[b];a>c&&(a=c);if(0==c)return!1;vcr.bFullscreen&&fsp.SetStatus(fmt.getstr(a)+" / "+fmt.getstr(c));!vcr.bLoading&&b!=toc.currTopic&&toc.setFocus(b);oStatus.innerHTML=vcr.status;oTime.innerHTML=-1==vcr.status.indexOf("Loading")?fmt.getstr(a)+" / "+fmt.getstr(c):"";a=a/c*oProgbar.style.pixelWidth;oBar.width=a>ctrlbar.style.pixelWidth?ctrlbar.style.pixelWidth:cInt(a);return!0}
function updateProgressBar(){!0!=vcr.bFullscreen&&(tmr.progbar.clear(),updateStatus()&&tmr.progbar.start("updateProgressBar()",70))}function CToc(a){this.container=$(a);this.videoSize="";this.screenSize="1024x768";this.length=this.duration=0;this.currTopic=1;this.pos=[];this.len=[];this.url=[]}
CToc.prototype={addItem:function(a,b,c){this.length=a.length;this.duration=b[this.length];var d=0,e=0,h,f;for(f=1;f<=this.length;f++){this.pos[f]=b[f-1];this.url[f]=c[f-1];this.len[f]=0;if(-1!=b[f-1]){for(h=f;-1==b[h];h++);this.len[f]=b[h]-b[f-1]}var j=a[f-1],k=" ("+fmt.getstr(cInt(this.len[f]))+")";0==j.indexOf("...")?(e++,h="toc1",hint=j.substr(3),j="OL"==indexType?d+"."+e+" "+hint:hint):(d++,e=0,h="toc0",hint=j,j="OL"==indexType?d+". "+hint:hint);-1==b[f-1]&&(k="");var g=document.createElement("DIV");
g.id="toc"+f;g.sn=f;g.ref=this;g.className=h;g.innerHTML="<div style='font:12px; padding:3px 0px 0px 0px'>"+j+"</div><div id=thumbnail"+f+" style='display:none'></div>";g.title=hint+k;g.onclick=this.onClick;g.tabIndex=tabindex++;g.onkeyup=this.onClick;g.onmouseover=this.onOver;g.onmouseout=this.onOut;this.container.appendChild(g)}this.pos[f]=this.duration},onClick:function(){var a=window.event.keyCode;!(13!=a&&0!=a)&&!0!=vcr.bLoading&&(this.ref.currTopic=this.sn,LoadSlide(this.ref.currTopic))},onOver:function(){this.sn!=
this.ref.currTopic&&(this.className=this.className.split(" ")[0]+" tocOver")},onOut:function(){this.sn!=this.ref.currTopic&&(this.className=this.className.split(" ")[0])},setFocus:function(a){this.currTopic=a;for(var b=this.container,c=1;c<=b.childNodes.length;c++){var d=$("toc"+c),e=d.className.split(" ");d.className=e[0];if(c==a){d.className=e[0]+" tocFocus";if(d.offsetTop<b.scrollTop||d.offsetTop>b.scrollTop+b.clientHeight-20)b.scrollTop=d.offsetTop-0.5*b.clientHeight;b.focus()}}},getTopic:function(a){var b;
for(b=1;b<=this.pos.length&&!(a<this.pos[b]);b++);for(a=b-1;-1==this.pos[a];a--);return a},openUrl:function(a){if(""==fshtml){var b=$E("iframe");b.id="fshtml";b.frameBorder=0;b.style.zIndex=101;b.style.position="absolute";var c=getArea(oFs);b.style.pixelLeft=c.left;b.style.pixelTop=c.top;b.style.pixelWidth=c.width;b.style.pixelHeight=c.height;$("body").appendChild(b);fshtml=$("fshtml")}fshtml.style.visibility="visible";fshtml.src=a},getLen:function(a){return cInt(this.len[a])},getTopicUrl:function(a){return this.url[a]},
isAutoNext:function(){return vcr.bAutoNext},hasNext:function(){return this.currTopic<toc.length?!0:!1},hasPrev:function(){return 1<this.currTopic?!0:!1},endOfTopic:function(a){return a>=this.duration-300?2:a>=this.pos[this.currTopic]+this.len[this.currTopic]-170?1:0}};function getQueryVariable(a){for(var b=window.location.search.substring(1).split("&"),c=0;c<b.length;c++){var d=b[c].split("=");if(d[0]==a)return d[1]}return 1}
function makehtml(a){a=a.replace(/&/,"&amp;");a=a.replace(/</,"&lt;");a=a.replace(/>/,"&gt;");a=a.replace(/\r\n/,"<br>");a=a.replace(/\n/,"<br>");return a=a.replace(/\r/,"<br>")}
function monitorPlayerState(){switch(fsp.PlayState){case 1:"Playing"!=vcr.status&&(vcr.status="Playing",oPlay.src=imgPause.src,updateProgressBar());break;case 2:"Paused"!=vcr.status&&(vcr.status="Paused",oPlay.src=imgPlayOver.src,updateStatus())}switch(fsp.RealCursor){case 0:vcr.bRealCursor=0;oCursor.src=imgCursorOff.src;break;case 1:vcr.bRealCursor=1,oCursor.src=imgCursorOn.src}}
function CVcr(){this.bFullscreen=!1;this.bAutoPlay=!0;this.bLoading=this.bUrl=!1;this.bAutoNext=this.bSound=!0;this.bSlideLoaded=this.bSlide=this.bRealCuror=!1;this.status=""}
CVcr.prototype={play:function(){if(!0!=this.bLoading&&!this.bUrl)if("Playing"==this.status)fsp.Pause(),this.status="Paused",oPlay.src=imgPlayOver.src,updateStatus();else if("Paused"==this.status)fsp.Resume(),this.status="Playing",oPlay.src=imgPause.src,updateProgressBar();else{if(!1==VerifySequence(this.sn))return!1;LoadSlide(toc.currTopic);oPlay.src=imgPause.src}},stop:function(){"Stopped"==this.status?(this.bAutoPlay=!0,this.bLoading=!1):(tmr.clear(),this.bLoading=!1,fsp.Stop(),oStop.src=imgStop.src,
oPlay.src=imgPlay.src,this.status="Stopped",updateStatus(),this.bAutoPlay||fsSetPos(toc.pos[toc.currTopic]))},next:function(){if(!0!=this.bLoading&&toc.currTopic<toc.length){if(!1==VerifySequence(parseInt(toc.currTopic,10)+1))return!1;oNext.src=imgNext.src;LoadSlide(parseInt(toc.currTopic,10)+1)}},prev:function(){if(!0!=this.bLoading&&1<toc.currTopic){if(!1==VerifySequence(toc.currTopic-1))return!1;oPrev.src=imgPrev.src;LoadSlide(toc.currTopic-1)}},sound:function(){this.bSound=!this.bSound;oSound.src=
this.bSound?imgSoundOn.src:imgSoundOff.src;fsp.Volume=this.bSound?1:0},auto:function(){this.bAutoNext=!this.bAutoNext;oAuto.src=this.bAutoNext?imgAutoOn.src:imgAutoOff.src},realCursor:function(){1==this.bRealCursor?(this.bRealCursor=0,fsp.RealCursor=0,oCursor.src=imgCursorOff.src):(this.bRealCursor=1,fsp.RealCursor=1,oCursor.src=imgCursorOn.src)},slide:function(){this.bSlide=!this.bSlide;oSlide.src=this.bSlide?imgSlideOn.src:imgSlideOff.src;for(var a=this.bSlide?"block":"none",b=1;b<=toc.length;b++){var c=
$("thumbnail"+b),d=""==toc.url[b]?toc.pos[b]:toc.url[b].substr(0,toc.url[b].indexOf("/"));this.bSlideLoaded||(c.innerHTML="<img style='width:120px; border:1px solid #aaaaaa' src='thumbnails/"+d+".jpg'>");c.style.display=a}this.bSlideLoaded=!0},fullscreen:function(){if(!this.bUrl&&!this.bFullscreen){var a=$("msgFullscreen");a.style.visibility="visible";a.style.left=oMain.style.pixelLeft+oMain.style.pixelWidth-250;a.style.top=oMain.style.pixelTop+10;fsp.EnterFullScreen();a.style.visibility="hidden";
this.bFullscreen=!0}},leaveFullscreen:function(){!this.bUrl&&this.bFullscreen&&(fsp.LeaveFullScreen(),this.bFullscreen=!1)}};vcr=new CVcr;function CTimer(){this.type=this.tid=0}CTimer.prototype={start:function(a,b){this.clear();this.type=0;this.tid=window.setTimeout(a,b)},startInterval:function(a,b){this.clear();this.type=1;this.tid=window.setInterval(a,b)},clear:function(){if(0!=this.tid){try{0==this.type?window.clearTimeout(this.tid):window.clearInterval(this.tid)}catch(a){}this.tid=0}}};
function CTimerCtrl(){this.resize=new CTimer;this.progbar=new CTimer;this.ctrl=new CTimer;this.seek=new CTimer;this.loading=new CTimer}CTimerCtrl.prototype={clear:function(){this.resize.clear();this.progbar.clear();this.ctrl.clear();this.seek.clear();this.loading.clear()}};tmr=new CTimerCtrl;function CTimeFormat(){}
CTimeFormat.prototype={getms:function(a){a=a.split(":");return time1=3==a.length?36E5*cInt(a[0])+6E4*cInt(a[1])+cInt(1E3*a[2]):6E4*cInt(a[0])+cInt(1E3*a[1])},getstr:function(a){var a=a/1E3,b=cInt(a/3600),c=cInt((a-3600*b)/60),a=cInt(a%60);10>c&&(c="0"+c);10>a&&(a="0"+a);return 0==b?c+":"+a:b+":"+c+":"+a},trim:function(a){a=a.split(":");return"0"==a[0]?a[1]+":"+a[2]:a[0]+":"+a[1]+":"+a[2]}};fmt=new CTimeFormat;
function VerifySequence(a){if(!1==seq.isReady(a)&&!1==vcr.bFullscreen){vcr.stop();a=seq.getSlide(a);if("true"==a.must)return alert(a.msg),!1;if(!1==confirm(a.msg))return!1}return!0}function CSequence(){this.id="";this.slide=[]}
CSequence.prototype={addSlide:function(a,b,c,d){this.slide[a]={id:a,item:b,msg:c,must:d}},visit:function(a){this.setCookie(a)},isReady:function(a){var b="  "+this.getCookie()+" ",a=this.getItem(a);if(""==a)return!0;for(var a=a.split(" "),c=0;c<a.length;c++)if(-1==b.indexOf(" "+a[c]+" "))return!1;return!0},getItem:function(a){return this.hasDefined(a)?this.slide[a].item:""},getMessage:function(a){return this.hasDefined(a)?this.slide[a].item:""},getMust:function(a){return this.hasDefined(a)?this.slide[a].must:
""},getSlide:function(a){return this.hasDefined(a)?this.slide[a]:""},hasDefined:function(a){return"undefined"==typeof this.slide[a]?!1:!0},setCookie:function(a){var b=this.getCookie();0<b.indexOf(" "+a+" ")||(""!=b&&(b+=" "),b+=a,a=new Date((new Date).getTime()+2592E5),document.cookie=this.id+"="+b+";expires="+a.toGMTString()+";")},getCookie:function(){for(var a=document.cookie.split("; "),b=0;b<a.length;b++){var c=a[b].split("=");if(this.id==c[0])return"  "+unescape(c[1])+" "}return""}};seq=new CSequence;
function attachVcrEvents(a){for(i=0;i<a.length;i++){var b=$(a[i]);b.onmouseup=uiClick;b.onkeyup=uiClick;"ctrlbar"!=a[i]&&(b.tabIndex=tabindex++);b.onmousedown=uiMousedown;b.onmouseover=uiMouseover;b.onmouseout=uiMouseout;b.onmousemove=uiMousemove}}function install_fsplayer(){fsp=$("fsplayer");try{if(!fsp.isReady)return showInstallMessage(),!1;var a=$("_ii");null!=a&&(a.style.visibility="hidden");return!0}catch(b){return showInstallMessage(),!1}}
function showInstallMessage(){if(null==$("_ii")){var a=document.createElement("div"),b=(document.body.clientWidth-340)/2,c=(document.body.clientHeight-20)/2;a.style.position="absolute";a.style.left=b;a.style.top=c;a.id="_ii";a.style.color="white";a.style.fontSize="15px";a.style.backgroundColor="red";a.innerHTML=" &nbsp; please install fsPlayer to view content. &nbsp; ";document.getElementsByTagName("body")[0].appendChild(a)}}var debugln=0;
function debug(a){debugln++;if(null==$("_debug")){var b=document.createElement("div");b.style.position="absolute";b.style.left=0;b.style.top=0;b.style.height="600px";b.style.width="200px";b.id="_debug";b.style.overflow="auto";b.style.backgroundColor="yellow";document.getElementsByTagName("body")[0].appendChild(b)}b=$("_debug");b.innerHTML=b.innerHTML+"<br>"+debugln+": "+a};