var wsm={loadPlayer:function(b,e,d,c){var a=(c=="mp4"?"mp4:":"");flowplayer(b,{src:dir+"libs/flowplayer-3.2.2.swf",wmode:"transparent"},{debug:false,autoBuffering:true,play:{opacity:0},plugins:{controls:{tooltipTextColor:"#ffffff",timeBorder:"0px solid rgba(0, 0, 0, 0.3)",sliderGradient:"none",durationColor:"#a3a3a3",borderRadius:"0px",progressGradient:"none",sliderColor:"#000000",backgroundGradient:[0.5,0,0.3],sliderBorder:"1px solid rgba(128, 128, 128, 0.7)",bufferGradient:"none",volumeBorder:"1px solid rgba(128, 128, 128, 0.7)",volumeColor:"#333333",muteButtonColor:"#333333",buttonColor:"#000000",timeColor:"#ffffff",timeSeparator:" ",progressColor:"#112233",volumeSliderColor:"#000000",backgroundColor:"#222222",buttonOverColor:"#ff7616",bufferColor:"#445566",timeBgColor:"rgb(0, 0, 0, 0)",tooltipColor:"#000000",volumeSliderGradient:"none",height:24,opacity:1,autoHide:"always",hideDelay:1000,play:false,scrubber:false,volume:true,time:false,fullscreen:true},rtmp:{url:dir+"libs/flowplayer.rtmp-3.2.1.swf",netConnectionUrl:"rtmp://"+e+"/cfx/st",durationFunc:"getStreamLength"}},clip:{onStart:function(){wsm.trigger_webinar_action("start");wsm.trackUser()},autoPlay:false,url:a+d,provider:"rtmp",cuepointMultiplier:1000,onBeforePause:function(){return false}},onError:function(f){qss.write_to_log(dir+"libs/cm_functions.js",76,"Flowplayer error code: "+f);window.setTimeout(function(){window.location.reload(true)},refresh_rate)}})},startToPlay:function(){var start=new Date(start2).getTime();var now=new Date().getTime()+ssi.getOffset2();video_start_pos=(((now-(start))/1000))-(delay/1000);video_start_pos2=(now-(start))-delay;$f("myWebinar").getClip(0).update({start:video_start_pos});var cue1=Math.round((download_show-video_start_pos2)/1000/60);var cue2=Math.round((order_show-video_start_pos2)/1000/60);var cue3=Math.round((video_length-video_start_pos2-10000)/1000/60);var cuearr=eval("("+cues+")");for(var i=0;i<cuearr.length;i++){cuearr[i]=cuearr[i]-video_start_pos2}$f("myWebinar").getClip(0).onCuepoint(cuearr,function(clip,cuepoint){cuepoint=Math.round(cuepoint/1000/60);if(cuepoint==cue1){wsm.downloadStart()}else{if(cuepoint==cue2){wsm.orderStart()}else{if(cuepoint==cue3){wsm.trigger_webinar_action("end")}}}if(cuepoint!=0){wsm.trackUser()}});$f("myWebinar").play();if(google){pageTracker._trackEvent("WSM","Webinar Started",title)}if(video_start_pos2>download_show&&video_start_pos2<download_hide){wsm.downloadStart()}if(video_start_pos2>order_show&&video_start_pos2<order_hide){wsm.orderStart()}},trackUser:function(){$.ajax({type:"POST",url:dir+"index.php",data:"mode=trackUser&start_date="+start+"&video_length="+video_length+"&sec="+sec+"&project_id="+project_id})},is_live:function(){$.ajax({type:"POST",url:dir+"index.php",data:"mode=is_live&project_id="+project_id})},downloadStart:function(){if(download_show!=0){var b=new Date(start2).getTime();var a=((b)+delay)+download_hide;downloadInterval=window.setInterval(function(){ssi.countdown("download_timer",a,wsm.downloadCompleted,downloadClock)},1000);$("#download_layer").css({display:"Block"})}},downloadCompleted:function(){window.clearInterval(downloadInterval);$("#download_timer").css({display:"None"});$("#download_layer").css({display:"None"})},orderStart:function(){if(order_show!=0){var b=new Date(start2).getTime();var a=((b)+delay)+order_hide;orderInterval=window.setInterval(function(){ssi.countdown("order_timer",a,wsm.orderCompleted,orderClock)},1000);$("#order_layer").css({display:"Block"})}},orderCompleted:function(){window.clearInterval(orderInterval);$("#order_timer").css({display:"None"});$("#order_layer").css({display:"None"})},check_video:function(){if($f("myWebinar").getState()!=3){window.location.reload(true)}},videoStart:function(){window.clearInterval(videoInterval);$("#video_timer").html("Loading webinar, please stand by...");qss.sleep(2);var c=window.location.search.substring(1);if(how_to_display==1){var a=800;var b=600;if(window.screen){a=window.screen.availWidth;b=window.screen.availHeight}window.open(dir+project_name+"/webinar?"+c,title,"status=0,toolbar=0,location=0,menubar=0,directories=0,scrollbars=0,fullscreen=1,titlebar=0,width="+a+",height="+b)}else{window.location=dir+project_name+"/webinar?"+c}},trigger_webinar_action:function(a){$.ajax({type:"POST",url:dir+"index.php",data:"mode=trigger_webinar_action&action="+a+"&combo_string="+combo_string+"&sec="+sec+"&project_id="+project_id})},change_playback:function(b,c,a){window.location="index.php?mode=activity&project_id="+b+"&start="+c+"&sec="+a},update_video_activity:function(f,g,b){var c=new Date().getTime();if(c>(g*1000)+(b*60*1000)+(1000*60*2)){return false}var a=$("#tabs").tabs();var e=a.tabs("option","selected");var d="tabs-1";switch(e){case 0:e="a";d="ui-tabs-1";break;case 1:e="b";d="ui-tabs-2";break;case 2:e="c";d="ui-tabs-3";break;case 3:e="d";d="ui-tabs-4";break}$.ajax({type:"GET",url:"index.php",data:"mode=video_activity&project_id="+f+"&start="+g+"&sec="+e,success:function(h){$("#"+d).html(h)}})}};
