/* SWFObject v2.0 rc2
Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License
*/
var flaDetect=function(){var _1=[];var _2=[];var _3=null;var _4=null;var _5=false;var _6=false;var ua=function(){var _8=typeof document.getElementById!="undefined"&&typeof document.getElementsByTagName!="undefined"&&typeof document.createElement!="undefined"&&typeof document.appendChild!="undefined"&&typeof document.replaceChild!="undefined"&&typeof document.removeChild!="undefined"&&typeof document.cloneNode!="undefined";var _9=[0,0,0];var d=null;if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]=="object"){d=navigator.plugins["Shockwave Flash"].description;if(d){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");_9[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);_9[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);_9[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0;}}else{if(typeof window.ActiveXObject!="undefined"){var a=null;var _c=false;try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_9=[6,0,21];a.AllowScriptAccess="always";}catch(e){if(_9[0]==6){_c=true;}}if(!_c){try{a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}}if(!_c&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");_9=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}catch(e){}}}}var u=navigator.userAgent.toLowerCase();var p=navigator.platform.toLowerCase();var _f=/webkit/.test(u);var _10=_f?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):0;var ie=false;var win=p?/win/.test(p):/win/.test(u);var mac=p?/mac/.test(p):/mac/.test(u);/*@cc_on ie=true;@if(@_win32)win=true;@elif(@_mac)mac=true;@end@*/return {w3cdom:_8,playerVersion:_9,webkit:_f,webkitVersion:_10,ie:ie,win:win,mac:mac};}();var _14=function(){if(!ua.w3cdom){return;}addDomLoadEvent(main);if(ua.ie&&ua.win){try{document.write("");var s=document.getElementById("__ie_ondomload");if(s){s.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);callDomLoadFunctions();}};}}catch(e){}}if(ua.webkit&&typeof document.readyState!="undefined"){_3=setInterval(function(){if(/loaded|complete/.test(document.readyState)){callDomLoadFunctions();}},10);}if(typeof document.addEventListener!="undefined"){document.addEventListener("DOMContentLoaded",callDomLoadFunctions,null);}addLoadEvent(callDomLoadFunctions);}();function callDomLoadFunctions(){if(_5){return;}if(ua.ie&&ua.win){var s=document.createElement("span");try{var t=document.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t);}catch(e){return;}}_5=true;if(_3){clearInterval(_3);_3=null;}var dl=_1.length;for(var i=0;i0){var obj=document.getElementById(id);if(obj){_2[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";_2[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(_2[i].swfVersion)){if(ua.webkit&&ua.webkitVersion<312){fixParams(obj);}}else{if(_2[i].expressInstall&&!_6&&hasPlayerVersion([6,0,65])&&(ua.win||ua.mac)){showExpressInstall(_2[i]);}else{displayAltContent(obj);}}}}createCSS("#"+id,"visibility:visible");}}function fixParams(obj){var _22=obj.getElementsByTagName("object")[0];if(_22){var e=document.createElement("embed");var a=_22.attributes;if(a){var al=a.length;for(var i=0;i";}}el.outerHTML="";fixObjectLeaks(_3d.id);r=document.getElementById(_3d.id);}else{if(ua.webkit&&ua.webkitVersion<312){var e=document.createElement("embed");e.setAttribute("type","application/x-shockwave-flash");for(var k in _3d){if(_3d[k]!=Object.prototype[k]){if(k=="data"){e.setAttribute("src",_3d[k]);}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",_3d[k]);}else{if(k!="classid"){e.setAttribute(k,_3d[k]);}}}}}for(var l in _3e){if(_3e[l]!=Object.prototype[l]){if(l!="movie"){e.setAttribute(l,_3e[l]);}}}el.parentNode.replaceChild(e,el);r=e;}else{var o=document.createElement("object");o.setAttribute("type","application/x-shockwave-flash");for(var m in _3d){if(_3d[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",_3d[m]);}else{if(m!="classid"){o.setAttribute(m,_3d[m]);}}}}for(var n in _3e){if(_3e[n]!=Object.prototype[n]&&n!="movie"){createObjParam(o,n,_3e[n]);}}el.parentNode.replaceChild(o,el);r=o;}}return r;}function createObjParam(el,_4d,_4e){var p=document.createElement("param");p.setAttribute("name",_4d);p.setAttribute("value",_4e);el.appendChild(p);}function hasPlayerVersion(rv){return (ua.playerVersion[0]>rv[0]||(ua.playerVersion[0]==rv[0]&&ua.playerVersion[1]>rv[1])||(ua.playerVersion[0]==rv[0]&&ua.playerVersion[1]==rv[1]&&ua.playerVersion[2]>=rv[2]))?true:false;}function createCSS(sel,_52){if(ua.ie&&ua.mac){return;}var h=document.getElementsByTagName("head")[0];var s=document.createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof document.createTextNode!="undefined"){s.appendChild(document.createTextNode(sel+" {"+_52+"}"));}h.appendChild(s);if(ua.ie&&ua.win&&typeof document.styleSheets!="undefined"&&document.styleSheets.length>0){var ls=document.styleSheets[document.styleSheets.length-1];if(typeof ls.addRule=="object"){ls.addRule(sel,_52);}}}return {registerObject:function(_56,_57,_58){if(!ua.w3cdom||!_56||!_57){return;}var _59={};_59.id=_56;var v=_57.split(".");_59.swfVersion=[parseInt(v[0],10),parseInt(v[1],10),parseInt(v[2],10)];_59.expressInstall=_58?_58:false;_2[_2.length]=_59;createCSS("#"+_56,"visibility:hidden");},getObjectById:function(_5b){var r=null;if(ua.w3cdom&&_5){var o=document.getElementById(_5b);if(o){var n=o.getElementsByTagName("object")[0];if(!n||(n&&typeof o.SetVariable!="undefined")){r=o;}else{if(typeof n.SetVariable!="undefined"){r=n;}}}}return r;},embedSWF:function(_5f,_60,_61,_62,_63,_64,_65,_66,_67){if(!ua.w3cdom||!_5f||!_60||!_61||!_62||!_63){return;}_61+="";_62+="";if(hasPlayerVersion(_63.split("."))){createCSS("#"+_60,"visibility:hidden");var att=(typeof _67=="object")?_67:{};att.data=_5f;att.width=_61;att.height=_62;var par=(typeof _66=="object")?_66:{};if(typeof _65=="object"){for(var i in _65){if(_65[i]!=Object.prototype[i]){if(typeof par.flashvars!="undefined"){par.flashvars+="&"+i+"="+_65[i];}else{par.flashvars=i+"="+_65[i];}}}}addDomLoadEvent(function(){createSWF(att,par,_60);createCSS("#"+_60,"visibility:visible");});}else{if(_64&&!_6&&hasPlayerVersion([6,0,65])&&(ua.win||ua.mac)){createCSS("#"+_60,"visibility:hidden");addDomLoadEvent(function(){var _6b={};_6b.id=_6b.altContentId=_60;_6b.width=_61;_6b.height=_62;_6b.expressInstall=_64;showExpressInstall(_6b);createCSS("#"+_60,"visibility:visible");});}}},getFlashPlayerVersion:function(){return {major:ua.playerVersion[0],minor:ua.playerVersion[1],release:ua.playerVersion[2]};},hasFlashPlayerVersion:function(_6c){return hasPlayerVersion(_6c.split("."));},createSWF:function(_6d,_6e,_6f){if(ua.w3cdom&&_5){return createSWF(_6d,_6e,_6f);}else{return undefined;}},createCSS:function(sel,_71){if(ua.w3cdom){createCSS(sel,_71);}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(_72){var q=document.location.search||document.location.hash;if(_72==null){return q;}if(q){var _74=q.substring(1).split("&");for(var i=0;i<_74.length;i++){if(_74[i].substring(0,_74[i].indexOf("="))==_72){return _74[i].substring((_74[i].indexOf("=")+1));}}}return "";},expressInstallCallback:function(){if(_6&&_4){var obj=document.getElementById("SWFObjectExprInst");if(obj){obj.parentNode.replaceChild(_4,obj);_4=null;_6=false;}}}};}();
//Get current installed browser version
var flaInstalledVersion = flaDetect.getFlashPlayerVersion();
// Javascript code to detect mobile //
var uagent = navigator.userAgent.toLowerCase();
var mobile_browser = false;
var status = '';
var video_format = 'MP4';
var video_frames = 0;
var lc_name;
var showURL;
var objWidth;
var objHeight;
var curSpot=0;
var ThisURL=''; // should be found at the beginning
var OddcastDomain='http://vhss.oddcast.com';
function js_preg_match(search) {
var res = false;
var arrSearch = search.split("|");
for(i = 0; i < arrSearch.length; i++) {
if(uagent.search(arrSearch[i]) > -1)
return true;
}
return res;
}
function detectMobile() {
switch(true) {
case (uagent.search("iphone") > -1):
status = 'Apple';
mobile_browser = true;
break;
case (uagent.search("android") > -1):
status = 'Android';
mobile_browser = true;
//video_format = 'MP4';
video_frames = 8.333;
break;
case (uagent.search("opera mini") > -1):
status = 'Opera';
mobile_browser = true;
break;
case (uagent.search("blackberry") > -1):
status = 'Blackberry';
mobile_browser = true;
//video_format = '3GP';
video_frames = 25;
break;
case (js_preg_match("palm os|palm|hiptop|avantgo|fennec|plucker|xiino|blazer|elaine")):
status = 'Palm';
mobile_browser = true;
break;
case (js_preg_match("iris|3g_t|windows ce|opera mobi|windows ce; smartphone;|windows ce; iemobile")):
status = 'Windows Smartphone';
mobile_browser = true;
break;
case (js_preg_match("mini 9.5|vx1000|lge |m800|e860|u940|ux840|compal|wireless| mobi|ahong|lg380|lgku|lgu900|lg210|lg47|lg920|lg840|lg370|sam-r|mg50|s55|g83|t66|vx400|mk99|d615|d763|el370|sl900|mp500|samu3|samu4|vx10|xda_|samu5|samu6|samu7|samu9|a615|b832|m881|s920|n210|s700|c-810|_h797|mob-x|sk16d|848b|mowser|s580|r800|471x|v120|rim8|c500foma:|160x|x160|480x|x640|t503|w839|i250|sprint|w398samr810|m5252|c7100|mt126|x225|s5330|s820|htil-g1|fly v71|s302|-x113|novarra|k610i|-three|8325rc|8352rc|sanyo|vx54|c888|nx250|n120|mtk |c5588|s710|t880|c5005|i;458x|p404i|s210|c5100|teleca|s940|c500|s590|foma|samsu|vx8|vx9|a1000|_mms|myx|a700|gu1100|bc831|e300|ems100|me701|me702m-three|sd588|s800|8325rc|ac831|mw200|brew |d88|htc\/|htc_touch|355x|m50|km100|d736|p-9521|telco|sl74|ktouch|m4u\/|me702|8325rc|kddi|phone|lg |sonyericsson|samsung|240x|x320vx10|nokia|sony cmd|motorola|up.browser|up.link|mmp|symbian|smartphone|midp|wap|vodafone|o2|pocket|kindle|mobile|psp|treo")):
status = 'Mobile matched on piped preg_match';
mobile_browser = true;
break;
case (js_preg_match("text/vnd.wap.wml|application/vnd.wap.xhtml+xml")):
status = 'Mobile matched on content accept header';
mobile_browser = true;
break;
default :
status = 'Desktop / full capability browser';
}
}
if (flaInstalledVersion['major'] < 1)
detectMobile();
//alert(mobile_browser + ' :: ' + status);
// Javascript code to detect mobile End//
var agt=navigator.userAgent.toLowerCase();
var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_win = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
var is_mac = (agt.indexOf("mac")!=-1);
var JSGroup = is_ie&&is_win?1:2;
function getURLParam( name ){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^]*)";
var regex = new RegExp( regexS );
var results = regex.exec( ThisURL );
if( results == null )
return '';
else
return results[1];
}
function getThisURL(){
arr = document.getElementsByTagName("script");
for(i=0;i0){
showURL = showURL+"&playOnLoad=1";
}
if(JSGroup==1){
vh_mc.LoadMovie(0,showURL);
}else{
useFlashLC("loadMovie", showURL+"~_level0");
}
vh_mc = null;
}
function goToWorkshop(spot){
document.onmousemove = null;
if(curSpot==spot){
return;
}
var newRegExp = new RegExp("ss%3D","g");
tempShowURL = showURL.replace(newRegExp,"sp%3D"+spot+"%26ss%3D");
var newRegExp = new RegExp("&acc=","g");
tempShowURL = tempShowURL.replace(newRegExp,"&stretch=1&acc=");
var newRegExp = new RegExp("getshow","g");
tempShowURL = tempShowURL.replace(newRegExp,"getworkshop");
if(JSGroup==1){
if(!vh_mc) return;
vh_mc.LoadMovie(0,tempShowURL);
}else{
useFlashLC("loadMovie", tempShowURL+"~_level0");
}
vh_mc = null;
curSpot = spot;
}
function loadExtraJS(JS_URL){
var head = document.getElementsByTagName('head')[0];
var elementOverLay = document.createElement('script');
elementOverLay.src = JS_URL;
elementOverLay.type = 'text/javascript';
head.appendChild(elementOverLay);
}
function domainOfPage() {
domainName = document.location.hostname;
if(domainName.length<=0)
domainName = 'not_found';
return domainName;
}
// sets a cookie if doesn't exist
loadExtraJS('http://vhss.oddcast.com/setCookie.php');
var fname = 'AC_VHost_Embed_'+accId;
window[fname] = function() {
AC_VHost_Embed (accId,arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10], arguments[11]);
}
var isOverlay = false;
var globalOverlayString = '';
function AC_VHost_Embed (accountID, height, width, bgcolor, firstslide, loading, ss, sl, transparent, minimal, embedId, flashVersion, overlayStr, embedName) {
if(mobile_browser) {
var bg = OddcastDomain+'/images/Play.gif';
var topMargin = 125;
var leftMargin = 165;
var contentDir = '/ccs2/vhss/';
var hostContent = 'http://content.oddcast.com/vhss';
var account = new String(accId);
var hashContent = hex_md5(account.valueOf()).substring(0,3);
var assetPath= hostContent + contentDir+'user/'+hashContent+'/'+accountID+'/video/';
var videoPath= assetPath + 'video_'+ss+'.'+video_format.toLowerCase()+ '?rand=' + Math.random();
var jpg = assetPath + 'video_'+ss+'.jpg'+ '?rand=' + Math.random();
document.write(' \n');
document.write('
\n');
document.write('
\n');
} else {
flashVersion = (flashVersion =='' || typeof flashVersion == 'undefined' || flashVersion < 9) ? 9 : flashVersion;
objWidth = width;
objHeight = height;
lc_name = '1731839166';
embedId = embedId==''?'nothing':embedId;
embedName = (embedName =='' || typeof embedName == 'undefined') ? 'VHSS' : embedName;
if (transparent ==1){
bgcolor = '';
}
// flash 9
xmlScr = (flashVersion>8) ? 'playScene' : 'getshow';
player = (flashVersion>8) ? 'vhss_v5' : 'vhss_v3';
PlayerServer = (flashVersion>8) ? 'http://content.oddcast.com/vhss' : 'http://vhss.oddcast.com';
domString = '&pageDomain='+domainOfPage();
emb = (overlayStr && overlayStr != "_OVERLAYSTR_") ? 9 : 8;
playScene = 'http%3A%2F%2Fvhss.oddcast.com%2Fphp%2F'+xmlScr+'%2Facc%3D'+accountID+'%2Fss%3D'+ss+'%2Fsl%3D'+sl;
playScene = playScene + (flashVersion<9 ? '%3Fembedid%3D'+embedId : ''); // appends embedid if less than flash 9
url = PlayerServer+'/'+player+'.swf?doc='+playScene+'&acc='+accountID+'&bgcolor=0x'+bgcolor+domString+'&lc_name='+lc_name+'&fv='+flashVersion+'&is_ie='+(JSGroup==1?1:0)+(followCursorFlag>0?'&followCursor='+followCursorFlag:'')+'&emb='+emb;
url = url + (flashVersion>8 ? '&embedid='+embedId : ''); // appends embedid if it's flash 9
showURL = url;
loading = 1; // done after request not to allow admin not to have a loader
expressInstallUrl = OddcastDomain+'/expressInstall.swf';
if (overlayStr && overlayStr != "_OVERLAYSTR_"){
globalOverlayString = overlayStr;
loadExtraJS(OddcastDomain+'/admin/includes/vhss_embedOverlayFunctions.js');
isOverlay = true;
}
if(flashVersion>8){
flashVersionStr = flashVersion+'.0.115';
}else{
flashVersionStr = flashVersion+'.0.0';
}
var vhssFlashDiv = 'vhssFlashDiv' + ss + sl;
if (isOverlay) {
document.getElementById("divVHSS").innerHTML = "";
} else {
document.write("");
}
var vhostFlashvars = {};
var vhostFlashParams = {
scale: 'noborder',
bgcolor: bgcolor,
quality: 'high',
name: embedName,
allowscriptaccess: 'always',
swliveconnect: 'true'
};
if (transparent ==1)
vhostFlashParams.wmode = 'transparent';
var vhostFlashAttributes = { id: embedName };
vhostSwfobject.embedSWF(url, vhssFlashDiv, width, height, flashVersionStr, expressInstallUrl, vhostFlashvars, vhostFlashParams, vhostFlashAttributes);
if( !vhostSwfobject.hasFlashPlayerVersion('6.0.65') )
vhostSwfobject.createSWF( { data: url, width: width, height: height, id: embedName }, vhostFlashParams, vhssFlashDiv);
SWFFormFix(embedName);
}
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write(' \n');
}
if(JSFlag>0){
loadExtraJS(OddcastDomain+'/admin/includes/vhss_api_v2.js');
if(!is_mac){
loadExtraJS(OddcastDomain+'/admin/includes/vhss_api_cursor_'+(JSGroup==1?'pcie':'other')+'.js');
}
}
/* SWFObject v2.1
Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
This software is released under the MIT License
mikelee - 05/28/2009
made some naming changes to avoid conflict with instances of swfobject on client side. specifically to swfobject itself and ids on elements created by swfobject.
*/
var vhostSwfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="vhostSWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("