//Copyright 2003-2004 by Claude MICHELI//This stuff is a part of netvideo Studio 2.0//(NETSCAPE 7.2 compatible : WMP 7+& Quicktime 6+)//Have Fun !var agt=navigator.userAgent.toLowerCase();var appVer = navigator.appVersion.toLowerCase();if ((appVer.indexOf('msie') != -1) && (agt.indexOf("mac")!=-1)) {  alert("Sorry, this application requires Netscape on the Macintosh Platform.");  top.close();}var studio_clock=0;var studio_timer;var curindex=0;var sector=0;var curtime=0;var stoptime=99999999999;var lastimecode=0;var onoff=0;var offset=0;var fileformat="";var obj=null;function starttimer(mode,tc,timeoffset){offset=timeoffset;fileformat=mode;switch(mode){case "clock":cmd="studio_clock=studio_clock+100";cmdplay="clearInterval(studio_timer);studio_timer=setInterval('showtime()',100)";cmdpause="clearInterval(studio_timer)";cmdposition="studio_clock=starttime";cmdmuteOn="";cmdmuteOff="";break;case "flv":ie=(document.all) ? true : false;obj=(ie) ? self.document.vid: self.document.vid[1];cmd="obj.TCallLabel('/','GetPosition');obj.GetVariable('VideoTime')*1000";cmdplay="obj.TCallLabel('/', 'Play');"cmdpause="obj.TCallLabel('/', 'Pause');";cmdposition="obj.SetVariable('gototime',((starttime/1000)+''));obj.TCallLabel('/', 'SetPosition');"; cmdmuteOn="obj.TCallLabel('/', 'Mute');";cmdmuteOff="obj.TCallLabel('/', 'UnMute');";break;case "swf":ie=(document.all) ? true : false;obj=(ie) ? self.document.vid: self.document.vid[1];cmd="obj.TCurrentFrame('/')";cmdplay="obj.Play()";cmdpause="obj.TStopPlay('/')";cmdposition="obj.TGotoFrame('/',starttime);"//cmdmuteOn="obj.SetMute(1)";//cmdmuteOff="obj.SetMute(0)";break;case "rmp":cmd="document.vid.GetPosition()";cmdplay="document.vid.DoPlay()";cmdpause="document.vid.DoPause()";cmdposition="document.vid.SetPosition(starttime)";cmdmuteOn="document.vid.SetMute(1)";cmdmuteOff="document.vid.SetMute(0)";break;case "qt":cmd="(document.vid.GetTime()*10)/6";cmdplay="document.vid.Play()";cmdpause="document.vid.Stop()";cmdposition="document.vid.Stop();document.vid.SetTime((starttime/10)*6);document.vid.Play()";cmdmuteOn="document.vid.SetMute(1)";cmdmuteOff="document.vid.SetMute(0)";break;case "wmp":	document.getElementById('buffer').style.visibility='visible';	parent.video.buffer.document.aform.bp.value=" Connecting...";	if(window.ActiveXObject || navigator.product=="Gecko"){	   cmd="vifr.document.vid.controls.currentPosition*1000";		cmdplay="vifr.document.vid.controls.play()";		cmdpause="vifr.document.vid.controls.pause()";		cmdposition="vifr.document.vid.controls.currentPosition=starttime/1000";		cmdmuteOn="vifr.document.vid.settings.mute=1";		cmdmuteOff="vifr.document.vid.settings.mute=0";	  }	else{		cmd="vifr.document.vid.GetCurrentPosition()*1000";		cmdplay="vifr.document.vid.Play()";		cmdpause="vifr.document.vid.Pause()";		cmdposition="vifr.document.vid.SetCurrentPosition(starttime/1000)";		cmdmuteOn="vifr.document.vid.Setmute=1";		cmdmuteOff="vifr.document.vid.Setmute=0";	}	break;	}  studio_timer=setInterval("showtime()",100);}function showtime(){	curtime=eval(cmd);	  if(curtime>stoptime){	    eval(cmdpause);	  }	if(curtime>(sector+100) || curtime<(sector-100)){	curindex=0;		for(i=0;i<tc.length;i++){			timecode=tc[i].split("µ");	  			if(curtime>timecode[0]){	    			curindex=i;	  			}		}	}		sector=curtime ;	timecode=tc[curindex].split("µ");	    if((curtime>timecode[0])&&(lastimecode!=timecode[0])){               lastimecode=timecode[0];					openwin(timecode[1],timecode[2]);					curindex++;  			}}function GoIndex(starttime,endtime){	starttime=starttime-offset;	stoptime=endtime-offset;	if(fileformat=="wmp") parent.video.buffer.document.getElementById('cache').style.visibility="hidden";	eval(cmdplay);	eval(cmdposition);}function restart(){	starttime=0;	stoptime=99999999999;	if(fileformat=="wmp") parent.video.buffer.document.getElementById('cache').style.visibility="hidden";	eval(cmdplay);	eval(cmdposition);}function openwin(url,targ){	if(targ=="_top") top.location=url;	else{		if (parent.frames[targ]!=undefined) parent.frames[targ].document.location=url;		else		window.open(url,targ);		}}function showpage(url,targ){	openwin("../"+url,targ);}function showvideo(cID,sID,targ,type){	if(targ=="video"||targ=="_self"||targ=="_top"||targ=="_parent"){		clearInterval(studio_timer);		openwin("../../../"+cID+"_"+sID+"/edited_pages/export_"+cID+"/ghost.gif","blind");	}	openwin("../../../"+cID+"_"+sID+"/edited_pages/export_"+cID+"/"+type+".htm",targ);}function play(){eval(cmdplay);}function pause(){eval(cmdpause);}function stop(){GoIndex(0+offset,99999999999);}function muteaudio(onoff){	if(onoff){		eval(cmdmuteOn);	}	else{		eval(cmdmuteOff);	}}function reset(f_list,directory){	if (directory==null) directory="";	frame= f_list.split("*");	for(i=0;i<frame.length;i++){		openwin(directory+"_"+frame[i]+".htm",frame[i]);	}}function changestyle(i_frame,s_param,s_value){	frame=i_frame.split("*");	param= s_param.split("*");	val=s_value.split("*");	for(i=0;i<frame.length;i++){		eval("parent.document.getElementById('"+frame[i]+"').style."+param[i]+"='"+val[i]+"'");	}}