function launchDemoStage2Client(sessID,promotion_id,startTime,reseller_id) { var timer = new Date(); var CurHour = timer.getHours(); var CurMinute = timer.getMinutes(); var CurSecond = timer.getSeconds(); var title = 'DS3' + '_' + CurHour + CurMinute + CurSecond; var CurTime= CurHour +'/'+ CurMinute +'/'+ CurSecond; var openerURL=window.location.href; //alert(openerURL); var urlToEncr=openerURL+'||'+timer; //encrOpenerURL = escape(openerURL); var encrOpenerURL = Encrypt(urlToEncr); //alert(encrOpenerURL); window.open('http://www.demosondemand.com/DemoStage2/index_new.asp?sessID=' + sessID + '&promotion_id=' + promotion_id + '&startTime=' + startTime+ '&eo=' + encrOpenerURL+ '&reseller_id=' + reseller_id ,'DemoStage2','top=0,left=0,width=1006,height=750,toolbars=off'); } 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; }