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 podPressHttp = getHTTPObject(); function podPressShowVideoPreview (strPlayerDiv, strMediaFile, numWidth, numHeight, strPreviewImg) { var refPlayerDiv = document.getElementById('podPressPlayerSpace_'+strPlayerDiv); if(refPlayerDiv == undefined) { return false; } refPlayerDiv.innerHTML = podPressGenerateVideoPreview (strPlayerDiv, strMediaFile, numWidth, numHeight, strPreviewImg); } function podPressGenerateVideoPreview (strPlayerDiv, strMediaFile, numWidth, numHeight, strPreviewImg, bPreviewOnly) { if (typeof numWidth == 'undefined') { numWidth = 320; } if (typeof numHeight == 'undefined') { numHeight = 240; } if (typeof strPreviewImg == 'undefined') { strPreviewImg = podPressDefaultPreviewImage; } if (typeof bPreviewOnly == 'undefined') { bPreviewOnly = false; } if(numHeight < 80) { strPreviewImg = podPressBackendURL+'images/vpreview_center_text.png'; } var strTopBgWidth = numWidth-14; var strBottomBgWidth = numWidth - 126; var strTableWidth = numWidth+14; var strDimensions = numWidth+':'+numHeight; var strResult = ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += ''; strResult += '
...
 '; strResult += 'previewImg 
.. ..
'; return strResult; } function podPressGeneratePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, strAutoStart, strPreviewImg) { if (typeof numWidth == 'undefined' || numWidth == '') { numWidth = 320; } if (typeof numHeight == 'undefined' || numHeight == '') { numHeight = 240; } if (typeof strAutoStart == 'undefined') { strAutoStart = 'false'; } if(strAutoStart == 'nopreview') { return ''; } var lenOfMedia = strMediaFile.length; if(strMediaFile.substring(lenOfMedia-8, lenOfMedia) == '.youtube') { var strExt = 'youtube'; strMediaFile = strMediaFile.substring(0, lenOfMedia-8) } else if(strMediaFile.substring(lenOfMedia-8, lenOfMedia) == '.torrent') { var strExt = 'torrent'; } else if(strMediaFile.substring(lenOfMedia-3, lenOfMedia-2) == '.') { var strExt = strMediaFile.substring(lenOfMedia-2, lenOfMedia); } else if(strMediaFile.substring(lenOfMedia-4, lenOfMedia-3) == '.') { var strExt = strMediaFile.substring(lenOfMedia-3, lenOfMedia); } else { var strExt = ''; } strExt = strExt.toLowerCase(); if(strExt != 'mp3' && strExt != 'flv' && strExt != 'yyoutube' && strAutoStart == 'false') { if(strExt == 'youtube') { strMediaFile = strMediaFile+'.youtube'; } return podPressGenerateVideoPreview (strPlayerDiv, strMediaFile, numWidth, numHeight, strPreviewImg); } switch (strExt) { case 'm4v': case 'm4a': case 'avi': case 'mpeg': case 'mpg': case 'mp4': case 'qt': case 'mov': switch (strExt) { case 'm4v': var strMimeType = 'video/x-m4v'; break; case 'm4a': var strMimeType = 'audio/x-m4a'; break; case 'avi': var strMimeType = 'video/avi'; break; case 'mpeg': case 'mpg': var strMimeType = 'video/mpeg'; break; case 'mp4': var strMimeType = 'audio/mpeg'; break; case 'qt': case 'mov': var strMimeType = 'video/quicktime'; break; } strResult = ''; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += '

'; break; case 'wma': case 'wmv': case 'asf': strResult = ''; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += '

'; break; case 'swf': if(strAutoStart == 'true') { strAutoStart = ''; } else { strAutoStart = ' play="false"'; } strResult = ''; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ''; break; case 'flv': if(strAutoStart == 'true') { strAutoStart = ''; } else { strAutoStart = '&autoStart=false'; } strResult = ''; strResult += ' '; strResult += ' '; strResult += '

'; break; case '.rm': strResult = ''; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += '

'; break; case 'ogg': if(strAutoStart == 'true') { strAutoStart = 'yes'; } else { strAutoStart = 'no'; } numWidth = '290'; numHeight = '65'; strResult = ''; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += '

'; break; case 'youtube': if(strAutoStart == 'true') { strAutoStart = 'yes'; } else { strAutoStart = 'no'; } strResult = ''; strResult += ' '; strResult += ' '; strResult += ' '; strResult += '

'; break; case 'mp3': default: if(strAutoStart == 'true') { var localCopyPlayerOptions = podPressMP3PlayerOptions+'autostart=yes&'; } else { var localCopyPlayerOptions = podPressMP3PlayerOptions+''; } strResult = ''; if(podPressMP3PlayerWrapper) { strResult += '
 '; } strResult += ''; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ' '; strResult += ''; if(podPressMP3PlayerWrapper) { strResult += '
'; } break; } return strResult; } function podPressShowHidePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, strAutoStart, strPreviewImg) { var refPlayerDiv = document.getElementById('podPressPlayerSpace_'+strPlayerDiv); var refPlayerDivLink = document.getElementById('podPressPlayerSpace_'+strPlayerDiv+'_PlayLink'); if(refPlayerDiv == undefined) { return false; } if (strAutoStart == 'force') { strAutoStart = 'true'; bForceShow = true; } else { bForceShow = false; } if(bForceShow) { refPlayerDivLink.innerHTML=podPressText_HidePlayer; refPlayerDivLink.parentNode.onclick = function(){ podPressShowHidePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, 'true'); return false; }; refPlayerDiv.style.display='block'; } else { if(refPlayerDivLink.innerHTML == podPressText_PlayNow) { refPlayerDivLink.innerHTML=podPressText_HidePlayer; refPlayerDiv.style.display='block'; } else { refPlayerDivLink.innerHTML=podPressText_PlayNow; refPlayerDiv.style.display='none'; if(document.getElementById('winplayer') != undefined) { if(document.getElementById('winplayer').controls) { document.getElementById('winplayer').controls.stop(); } } else { refPlayerDiv.innerHTML=''; } bForceShow = true; refPlayerDivLink.parentNode.onclick = function(){ podPressShowHidePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, 'force'); return false; }; return true; } } if(strAutoStart == 'nopreview') { refPlayerDivLink.innerHTML=podPressText_PlayNow; refPlayerDiv.style.display='none'; } var pos = strMediaFile.lastIndexOf('\.'); pos = pos+1; var strExt = strMediaFile.substring(pos); strExt = strExt.toLowerCase(); if(strExt == 'mp3') { ap_stopAll(); } refPlayerDiv.innerHTML=podPressGeneratePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, strAutoStart, strPreviewImg); } function podPressPopupPlayer(strPlayerDiv, strMediaFile, numWidth, numHeight) { var refPlayerDiv = document.getElementById('podPressPlayerSpace_'+strPlayerDiv); var refPlayerDivLink = document.getElementById('podPressPlayerSpace_'+strPlayerDiv+'_PlayLink'); if(refPlayerDiv != undefined) { refPlayerDivLink.innerHTML=podPressText_PlayNow; refPlayerDiv.style.display='none'; if(document.getElementById('winplayer') != undefined) { if(document.getElementById('winplayer').controls) { document.getElementById('winplayer').controls.stop(); } } else { refPlayerDiv.innerHTML=''; } refPlayerDivLink.parentNode.onclick = function(){ podPressShowHidePlayer(strPlayerDiv, strMediaFile, numWidth, numHeight, 'force'); return false; }; } var strResult = '\n'; strResult += '\n'; strResult += 'podPress Popup Player\n'; strResult += '\n'; strResult += '\n'; strResult += podPressGeneratePlayer(1, strMediaFile, numWidth, numHeight, 'true'); strResult += '\n'; strResult += ''; if (typeof numWidth == 'undefined' || numWidth == '') { numWidth = 320; } if (typeof numHeight == 'undefined' || numHeight == '') { numHeight = 240; } if(podPressMP3PlayerWrapper) { numWidth = numWidth + 50; } else { numWidth = numWidth + 10; } numHeight = numHeight + 50; newwindow=window.open('', 'podPressPlayer', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width='+numWidth+',height='+numHeight); newdocument=newwindow.document; newdocument.write(strResult); newdocument.close(); } function podPressGetBaseName(file) { var Parts = file.split('\\'); if( Parts.length < 2 ) { Parts = file.split('/'); } return Parts[ Parts.length -1 ]; } if(ap_instances == undefined) { function ap_registerPlayers() { var objectID; var objectTags = document.getElementsByTagName('object'); for(var i=0;i