function JSR(fUrl){this.fUrl=fUrl;this.noCIE='&noCIE='+(new Date()).getTime();this.headLoc=document.getElementsByTagName("head").item(0);this.scId='unId'+JSR.scriptCounter++;}JSR.scriptCounter=1;JSR.prototype.bST=function(){this.sO=document.createElement("script");this.sO.setAttribute("type","text/javascript");this.sO.setAttribute("src",this.fUrl+this.noCIE);this.sO.setAttribute("id",this.scId);}
JSR.prototype.rScrT=function(){this.headLoc.removeChild(this.sO);}
JSR.prototype.aScrT=function(){this.headLoc.appendChild(this.sO);}
var bellHD_videoExists=0;if(bellHD_videoExists==0){if((bellHD_butImg==undefined)||(bellHD_butImg.length<=3)){var bellHD_butImg='http://files.bellmedia.com/images/blank.gif';}
if((bellHD_butLeft==undefined)||(bellHD_butLeft.length=0)){var bellHD_butLeft='0px';}
if((bellHD_butTop==undefined)||(bellHD_butTop.length=0)){var bellHD_butTop='0px';}
function bellHD_addOnloadEvent(fnc){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",fnc,false);}
else if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",fnc);}
else{if(window.onload!=null){var oldOnload=window.onload;window.onload=function(e){oldOnload(e);window[fnc]();};}
else
window.onload=fnc;}}
function getThis(bellhd_myIda){var obj=new JSR('http://bellhd.com/player/udata-'+bellhd_myIda);obj.bST();obj.aScrT();}
function getThisA(data){bellhd_myU=data.results.bellhd_uId;bellhd_myV=data.results.bellhd_uV;var obj=new JSR('http://bellhd.com/player/vdata-'+bellhd_myU+'-'+bellhd_myV);obj.bST();obj.aScrT();}
function cBellHdDiv(){var divTag=document.createElement("div");divTag.id="bhdUnDivId";divTag.setAttribute("align","center");divTag.style.margin="0px auto";divTag.className="bhdUnDivCl";divTag.innerHTML='<div id="bellHD_acontainerDiv" style="z-index:1000000"><div id="bellHD_avideoDiv" style="display:none"></div><div id="bellHD_aplayDiv"></div><img src="'+bellHD_butImg+'" id="bellHD_butImg" style="display:none; position:absolute; left:0px; top:0px;"></div>';document.body.appendChild(divTag);bellHD_initiatePlayer();bellHD_updatePosition();bellHD_updateClass();}
bellHD_addOnloadEvent(cBellHdDiv);function bellHD_createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";}
function bellHD_readCookie(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;}
function bellHD_eraseCookie(name){bellHD_createCookie(name,"",-1);}
if(bellHD_readCookie('bellHD_view_'+bellHD_vId)==null){bellHD_createCookie('bellHD_view_'+bellHD_vId,'1',30);}
else{var bellHD_cookieVar=bellHD_readCookie('bellHD_view_'+bellHD_vId);}
var bellHD_vSWFvar='bellHD_videoSWF';var bellHD_vDIVvar='bellHD_avideoDiv';var bellHD_pSWFvar='bellHD_playSWF';var bellHD_pDIVvar='bellHD_aplayDiv';var bellHD_cDIVvar='bellHD_acontainerDiv';var bellHD_videoWidth;var bellHD_videoHeight;var bellHD_playerWidth;var bellHD_playerHeight;var bellHD_butPlay;var bellHD_butPlayImg;var bellHD_ver;var bellhd_pId;var bellhd_vidfile;if(bellHD_ver==1){var flashVer="10.0.22.87";}else{var flashVer="9";}
function bellHD_initiatePlayer(){document.getElementById(bellHD_vDIVvar).style.marginBottom='0px';document.getElementById(bellHD_pDIVvar).style.marginBottom='5px';document.getElementById(bellHD_pDIVvar).style.marginLeft='5px';document.getElementById('bellHD_butImg').style.top=bellHD_butTop;document.getElementById('bellHD_butImg').style.left=bellHD_butLeft;var bellHD_playButtonSWF=new SWFObject("http://bellhd.com/player/buttons/"+bellHD_butPlay+".swf",bellHD_pSWFvar,bellHD_playerWidth,bellHD_playerHeight,flashVer);bellHD_playButtonSWF.addParam("wmode","transparent");bellHD_playButtonSWF.addParam("swliveconnect","true");bellHD_playButtonSWF.addParam("allowscriptaccess","always");bellHD_playButtonSWF.addParam("menu","false");bellHD_playButtonSWF.addVariable('bellHD_butPlay',bellHD_butPlay);bellHD_playButtonSWF.addVariable('bellHD_playerWidth',bellHD_playerWidth);bellHD_playButtonSWF.addVariable('bellHD_playerHeight',bellHD_playerHeight);bellHD_playButtonSWF.addVariable('bellHD_butPlayImg',bellHD_butPlayImg);bellHD_playButtonSWF.write(bellHD_pDIVvar);if((bellHD_autoPlay.toLowerCase()=='yes')||(bellHD_autoPlay.toLowerCase()=='playonce')){if(((bellHD_autoPlay.toLowerCase()=='playonce')&&bellHD_cookieVar!='1')||(bellHD_autoPlay.toLowerCase()=='yes')){getThis(bellHD_ver);}}}
function bellHD_updatePosition(){if(bellHD_videoPosition=='bottomleft'){document.getElementById(bellHD_cDIVvar).style.position='fixed';document.getElementById(bellHD_cDIVvar).style.bottom='0px';document.getElementById(bellHD_cDIVvar).style.left='0px';}
else if(bellHD_videoPosition=='bottomright'){document.getElementById(bellHD_cDIVvar).style.position='fixed';document.getElementById(bellHD_cDIVvar).style.bottom='0px';document.getElementById(bellHD_cDIVvar).style.right='0px';}
else if(bellHD_videoPosition=='optislim'){document.getElementById(bellHD_cDIVvar).style.position='fixed';document.getElementById(bellHD_cDIVvar).style.bottom='100px';document.getElementById(bellHD_cDIVvar).style.right='0px';}
else if(bellHD_videoPosition=='topleft'){document.getElementById(bellHD_cDIVvar).style.position='fixed';document.getElementById(bellHD_cDIVvar).style.top='0px';document.getElementById(bellHD_cDIVvar).style.left='0px';}
else if(bellHD_videoPosition=='topright'){document.getElementById(bellHD_cDIVvar).style.position='fixed';document.getElementById(bellHD_cDIVvar).style.top='0px';document.getElementById(bellHD_cDIVvar).style.right='0px';}
else if(bellHD_videoPosition=='inline'){document.getElementById(bellHD_cDIVvar).style.position='absolute';document.getElementById(bellHD_cDIVvar).style.bottom='0px';document.getElementById(bellHD_cDIVvar).style.right='0px';document.getElementById(bellHD_cDIVvar).style.left='0px';}
else if(bellHD_videoPosition=='bottomcenter'){document.getElementById(bellHD_cDIVvar).style.position='fixed';document.getElementById(bellHD_cDIVvar).style.display='inline';document.getElementById(bellHD_cDIVvar).style.bottom='0px';document.getElementById(bellHD_cDIVvar).style.left='35%';}}
function bellHD_playSWF_DoFSCommand(command,args){if(command=="playMovie"){getThis(bellHD_ver);}}
function getVidB(e,ver){bellHD_vId=document.getElementById(e).id;bellHD_ver=ver;getThis(ver);}
function bellHD_videoSWF_DoFSCommand(command,args){if(command=="stopMovie"){bellHD_stopMovie();}
if(command=="sendWidth"){bellHD_videoWidth=args;}
if(command=="sendHeight"){bellHD_videoHeight=args;bellHD_updateVidDimensions();}
if(command=="sendTime"){bellHD_sendTime(args);}}
function bellHD_updateVidDimensions(){document.getElementById(bellHD_vSWFvar).width=bellHD_videoWidth;document.getElementById(bellHD_vSWFvar).height=bellHD_videoHeight;}
function bellHD_playMovie(data,bellHD_videoFile){document.getElementById(bellHD_vDIVvar).innerHTML='';if(data==undefined){data="1";}
if(data.results===undefined)return true;bellhd_pId=data.results.bellhd_pId;var bellhd_vidfile=data.results.bellhd_vidfile;bellhd_myV=data.results.bellhd_uV;var bellHD_videoSWF=new SWFObject("http://bellhd.com/player/swf/"+bellhd_vidfile+".swf?p_id="+bellhd_pId+"&a="+bellHD_ver,bellHD_vSWFvar,bellHD_videoWidth,bellHD_videoHeight,flashVer);bellHD_videoSWF.useExpressInstall('http://files.bellmedia.com/public/expressInstall.swf');bellHD_videoSWF.addParam("wmode","transparent");bellHD_videoSWF.addParam("swliveconnect","true");bellHD_videoSWF.addParam("allowscriptaccess","always");bellHD_videoSWF.addParam("menu","false");bellHD_videoSWF.addVariable('bellHD_vId',bellHD_vId);bellHD_videoSWF.addVariable('vers',bellhd_myV);bellHD_videoSWF.addVariable('pid',bellhd_pId);bellHD_videoSWF.addVariable('_vidName',bellHD_videoFile);bellHD_videoSWF.addVariable('videoWidth',bellHD_videoWidth);bellHD_videoSWF.addVariable('videoHeight',bellHD_videoHeight);bellHD_videoSWF.write(bellHD_vDIVvar);document.getElementById(bellHD_pDIVvar).style.display='none';document.getElementById(bellHD_vDIVvar).style.display='';}
function bellHD_stopMovie(){document.getElementById(bellHD_pDIVvar).style.display='';document.getElementById(bellHD_vDIVvar).style.display='none';}
function flipButton(to){if(to=='hide'){document.getElementById('bellHD_butImg').style.display='none';}else{document.getElementById('bellHD_butImg').style.display='';}}
if(bellHD_butStart==undefined){var bellHD_butStart=0;}
if(bellHD_butLast==undefined){var bellHD_butLast=0;}
function bellHD_sendTime(args){if((args>=bellHD_butStart)&&(args<=(bellHD_butStart+bellHD_butLast))){flipButton('show');}else{flipButton('hide');}}
bellHD_videoExists='1';}
function bellHD_updateClass(){document.getElementById(bellHD_cDIVvar).className='bellHD_ieClass';}
