if(!self.getHTTPObject) {
function getHTTPObject() {
var xmlhttp;
var container;
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
} else {
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp = false;
}
}
}
return xmlhttp;
}
}
var rTimer;
var myDuration = 0;
var myRedirectURI = '';
function AfterComplete( ) {
//alert( 'this is when it would redirect' + myRedirectURI );
top.location.href=myRedirectURI;
}
var podPressHttp = getHTTPObject();
var podPressDivName = '';
var podPressPlayersToLoad = new Array();
function podPressPlayerToLoad(divname, oftype, dimensionSetting, mediaFile) {
if(oftype == '' ) {
return;
}
if(dimensionSetting == '' ) {
return;
}
if(mediaFile == '' ) {
return;
}
var cnt = podPressPlayersToLoad.length;
var x = new Array();
x['divname'] = divname;
x['oftype'] = oftype;
x['dimensionSetting'] = dimensionSetting;
x['mediaFile'] = mediaFile;
podPressPlayersToLoad[cnt] = x;
}
function podPressShowPlayersToLoad() {
if(podPressPlayersToLoad.length > 0) {
podPressShowHidePlayerDiv(podPressPlayersToLoad[0]['divname'], podPressPlayersToLoad[0]['oftype'], podPressPlayersToLoad[0]['dimensionSetting'], podPressPlayersToLoad[0]['mediaFile'], 'yes', 'no');
}
}
function podPressLoadPageIntoDiv(divname, params) {
podPressDivName = divname;
podPressHttp = getHTTPObject();
podPressHttp.open("GET", podPressBackendURL+'podpress_backend.php?'+params, true);
podPressHttp.onreadystatechange = function () { if (podPressHttp.readyState == 4) { podPressSetRedirect( ); document.getElementById(divname).innerHTML=podPressHttp.responseText; podPressPlayersToLoad.shift(); podPressShowPlayersToLoad(); } }
podPressHttp.send(null);
}
function podPressSetRedirect( ) {
//alert( "Dur:" + myDuration );
//alert( "URI:" + myRedirectURI );
clearTimeout(rTimer);
if ( ( myDuration > 0 ) && ( myRedirectURI!='' ) ) rTimer=setTimeout( "AfterComplete();", ( myDuration * 1000 ) );
}
function podPressShowHidePlayerDiv(divname, oftype, dimensionSetting, mediaFile, forceShow, autoPlay, RedirectURI, Duration ) {
if(document.getElementById(divname) == undefined) {
return false;
}
clearTimeout(rTimer);
//alert( "SDur:" + Duration );
//alert( "SURI:" + RedirectURI );
myRedirectURI=RedirectURI;
myDuration = Duration;
if(autoPlay != 'no') { autoPlay = 'yes'; }
if(document.getElementById(divname).title != '' && document.getElementById(divname).title != oftype) {
var prev_oftype = document.getElementById(divname).title;
if(document.getElementById(divname+'_label_'+prev_oftype) != undefined) {
document.getElementById(divname+'_label_'+prev_oftype).innerHTML=podPressText_PlayNow;
}
}
document.getElementById(divname).title = oftype;
if(forceShow == 'yes') {
document.getElementById(divname+'_label_'+oftype).innerHTML=podPressText_HidePlayer;
document.getElementById(divname).style.display='block';
podPressLoadPageIntoDiv(divname, 'podPressPlayerAutoPlay='+autoPlay+'&standalone=no&action=showplayer&dimension='+dimensionSetting+'&filename='+mediaFile);
} else {
if(document.getElementById(divname+'_label_'+oftype).innerHTML == podPressText_PlayNow) {
document.getElementById(divname+'_label_'+oftype).innerHTML=podPressText_HidePlayer;
document.getElementById(divname).style.display='block';
podPressLoadPageIntoDiv(divname, 'podPressPlayerAutoPlay='+autoPlay+'&standalone=no&action=showplayer&dimension='+dimensionSetting+'&filename='+mediaFile);
} else {
if(document.getElementById('winplayer') != undefined) {
if(document.getElementById('winplayer').controls) {
document.getElementById('winplayer').controls.stop();
}
document.getElementById(divname+'_label_'+oftype).innerHTML=podPressText_PlayNow;
document.getElementById(divname).style.display='none';
} else {
document.getElementById(divname+'_label_'+oftype).innerHTML=podPressText_PlayNow;
document.getElementById(divname).style.display='none';
document.getElementById(divname).innerHTML='';
}
}
}
}
function podPressCustomSelectVal(select_elm, prompt_text){
var val = prompt(prompt_text, '');
var option = document.createElement('option');
option.setAttribute('value', val);
option.innerHTML = val;
option.selected = true;
select_elm.appendChild(option);
}
if(ap_instances == undefined) {
var ap_instances = new Array();
var ap_clearID = setInterval( ap_registerPlayers, 100 );
}
function ap_registerPlayers() {
var objectID;
var objectTags = document.getElementsByTagName('object');
for(var i=0;i Recording Audio Comment';
document.getElementById('podPress_audioRecorder').style.display = 'block';
document.getElementById('podPress_audioRecorder').src = 'http://podpress.mobatalk.com/recorder/record_app_JS.asp?code='+podPressMobatalkID+'&retpath='+podPressBackendURL+'mobatalk_audio_comment.php';
}
function podPressAttachAudioComment(argURL, argSize, argDuration)
{
document.getElementById('podPress_audioRecorder').style.display = 'none';
document.getElementById('podPress_audioCommentURL').value = argURL;
document.getElementById('podPress_audioCommentSize').value = argSize;
document.getElementById('podPress_audioCommentDuration').value = argDuration;
document.getElementById('podPress_audioCommentStatus').innerHTML = '
Audio Comment Attached
';
}