// This Function is used for testing DS3 session form PlayerDev folder
function launchDemoStage3Test(sessID,promotion_id,startTime)
{
var session_id=sessID;
var initialW = 250;
var initialH = 200;
var x = (screen.width/2)-initialW/2;
var y = (screen.height/2)-initialH/2;
var params = "toolbar=no,resizable=yes,width=" + initialW +
",height=" + initialH + ",top=" + y + ",left=" + x + " ";
if(session_id>0)
{
window.open('/PlayerDev/DemoStage3/index.asp?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime,'DemoStage3',params);
}
else
{
window.open('/PlayerDev/DemoStage3/DS3_popup.html?sessionId=' + session_id,'DemoStage3', params);
}
}
function launchDemoStage3(sessID,promotion_id,startTime)
{
var session_id=sessID;
var initialW = 250;
var initialH = 200;
var x = (screen.width/2)-initialW/2;
var y = (screen.height/2)-initialH/2;
var params = "toolbar=no,resizable=yes,width=" + initialW +
",height=" + initialH + ",top=" + y + ",left=" + x + " ";
var openerURL=window.location.href;
//alert(openerURL);
//encrOpenerURL = escape(openerURL);
var encrOpenerURL = Encrypt(openerURL);
//alert(encrOpenerURL);
window.open('/html5/?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime + '&eo=' + encrOpenerURL,'DemoStage3'+sessID,params);
}
// The Given below function is Used from DemoStage3Admin for launching DS3 session.
function launchDemoStage3Staging(sessID,promotion_id,startTime)
{
var session_id=sessID;
var initialW = 250;
var initialH = 200;
var x = (screen.width/2)-initialW/2;
var y = (screen.height/2)-initialH/2;
var params = "toolbar=no,resizable=yes,width=" + initialW +
",height=" + initialH + ",top=" + y + ",left=" + x + " ";
var openerURL=window.location.href;
//alert(openerURL);
//encrOpenerURL = escape(openerURL);
var encrOpenerURL = Encrypt(openerURL);
//alert(encrOpenerURL);
window.open('http://www.demosondemand.com:8090/DemoStage3/index.asp?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime + '&eo=' + encrOpenerURL,'DemoStage3', params);
}
function launchDemoStage3Production(sessID,promotion_id,startTime)
{
var session_id=sessID;
var initialW = 250;
var initialH = 200;
var x = (screen.width/2)-initialW/2;
var y = (screen.height/2)-initialH/2;
var params = "toolbar=no,resizable=yes,width=" + initialW +
",height=" + initialH + ",top=" + y + ",left=" + x + " ";
var openerURL=window.location.href;
//alert(openerURL);
//encrOpenerURL = escape(openerURL);
var encrOpenerURL = Encrypt(openerURL);
//alert(encrOpenerURL);
window.open('http://www.demosondemand.com/DemoStage3/index.asp?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime + '&eo=' + encrOpenerURL,'DemoStage3',params);
}
// The Given below function is Used from DemoStage3Admin for launching DS2 session.
function launchDS2Staging(sessID,promotion_id,startTime)
{
var openerURL=window.location.href;
//alert(openerURL);
//encrOpenerURL = escape(openerURL);
var encrOpenerURL = Encrypt(openerURL);
//alert(encrOpenerURL);
window.open('http://www.demosondemand.com:8090/DemoStage2/index_new.asp?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime + '&eo=' + encrOpenerURL,'DemoStage2','top=0,left=0,width=1006,height=750,toolbars=off,status=no,menubar=no,location=no');
}
function launchD2Production(sessID,promotion_id,startTime)
{
var openerURL=window.location.href;
//alert(openerURL);
//encrOpenerURL = escape(openerURL);
var encrOpenerURL = Encrypt(openerURL);
//alert(encrOpenerURL);
window.open('http://www.demosondemand.com/DemoStage2/index_new.asp?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime + '&eo=' + encrOpenerURL,'DemoStage2','top=0,left=0,width=1006,height=750,toolbars=off,status=no,menubar=no,location=no');
}
function Encrypt(text)
{
output = "";
for (i = 0; i < text.length; i++)
{
ch = text.charCodeAt(i).toString();
if ( ch.length == 1 ) { ch = "00" + ch; }
else if ( ch.length == 2 ) { ch = "0" + ch; }
else if ( ch.length == 3 ) { ch = "" + ch; }
else { ch = "" + ch.toString().substring(0,2); }
output += "" + ch;
}
return output;
}
// HTML5 Player
function launchHTML5(sessID,promotion_id,startTime)
{
var session_id=sessID;
var initialW = 250;
var initialH = 200;
var x = (screen.width/2)-initialW/2;
var y = (screen.height/2)-initialH/2;
var params = "toolbar=no,resizable=yes,width=" + initialW +
",height=" + initialH + ",top=" + y + ",left=" + x + " ";
var openerURL=window.location.href;
//alert(openerURL);
//encrOpenerURL = escape(openerURL);
var encrOpenerURL = Encrypt(openerURL);
//alert(encrOpenerURL);
window.open('/HTML5/index.aspx?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime + '&eo=' + encrOpenerURL,'HTML5',params);
}
function launchHTML5Staging(sessID,promotion_id,startTime)
{
var session_id=sessID;
var initialW = 250;
var initialH = 200;
var x = (screen.width/2)-initialW/2;
var y = (screen.height/2)-initialH/2;
var params = "toolbar=no,resizable=yes,width=" + initialW +
",height=" + initialH + ",top=" + y + ",left=" + x + " ";
var openerURL=window.location.href;
//alert(openerURL);
//encrOpenerURL = escape(openerURL);
var encrOpenerURL = Encrypt(openerURL);
//alert(encrOpenerURL);
window.open('http://www.demosondemand.com:8090/HTML5/index.aspx?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime + '&eo=' + encrOpenerURL,'HTML5', params);
}
function launchHTML5Production(sessID,promotion_id,startTime)
{
var session_id=sessID;
var initialW = 250;
var initialH = 200;
var x = (screen.width/2)-initialW/2;
var y = (screen.height/2)-initialH/2;
var params = "toolbar=no,resizable=yes,width=" + initialW +
",height=" + initialH + ",top=" + y + ",left=" + x + " ";
var openerURL=window.location.href;
//alert(openerURL);
//encrOpenerURL = escape(openerURL);
var encrOpenerURL = Encrypt(openerURL);
//alert(encrOpenerURL);
window.open('http://www.demosondemand.com/HTML5/index.aspx?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime + '&eo=' + encrOpenerURL,'HTML5',params);
}
function launchHTML5Player_old_fg(sessID,promotion_id,startTime,reseller_id)
{
var session_id=sessID;
var initialW = 250;
var initialH = 200;
var x = (screen.width/2)-initialW/2;
var y = (screen.height/2)-initialH/2;
var params = "toolbar=no,resizable=yes,width=" + initialW +
",height=" + initialH + ",top=" + y + ",left=" + x + " ";
var openerURL=window.location.href;
//alert(openerURL);
//encrOpenerURL = escape(openerURL);
var encrOpenerURL = Encrypt(openerURL);
//alert(encrOpenerURL);
window.open('http://www.demosondemand.com/HTML5/index.aspx?sessID=' + sessID + '&promotion_id=' + promotion_id +'&reseller_id='+reseller_id+ '&startTime=' + startTime + '&eo=' + encrOpenerURL,'HTML5',params);
}
function launchHTML5Player(session_id, promotion_id,startTime,reseller_id )
{
var initialW = 250;
var initialH = 200;
var x = (screen.width/2)-initialW/2;
var y = (screen.height/2)-initialH/2;
var params = "toolbar=0,resizable=1,scrollbars=0,status=0,menubar=0,width=" + initialW + ",height=" + initialH + ",top=" + y + ",left=" + x + " ";
//var params = "toolbar=no,resizable=yes,width=" + initialW + ",height=" + initialH + ",top=" + y + ",left=" + x + " ";
var timer = new Date();
var CurHour = timer.getHours();
var CurMinute = timer.getMinutes();
var CurSecond = timer.getSeconds();
var title = 'DS3' + '_' + CurHour + CurMinute + CurSecond;
var openerURL="";
var encrOpenerURL="";
if(document.getElementById("frame_type_alk")!=null)
{
openerURL = document.getElementById("frame_type_alk").value;
encrOpenerURL = openerURL + Encrypt('||'+timer);
}
if(openerURL == "")
{
openerURL = window.location.href;
encrOpenerURL = Encrypt(openerURL + '||'+timer);
}
//url = "http://www.demosondemand.com/html5/index.aspx?sessID=" + session_id + '&promotion_id=' + promotion_id +'&startTime='+ startTime + '&reseller_id=' + reseller_id + '&eo=' + encrOpenerURL;
url = "https://www.demosondemand.com/dod_staging/app.js/html5/sessID/" + session_id + '/promotion_id/' + promotion_id +'/startTime/'+ startTime + '/reseller_id/' + reseller_id + '?eo=' + encrOpenerURL;
var win = window.open(url, title, params);
win.focus();
}