WMPObject = function(mov, id, w, h, as, ui) { this.mov = mov; this.id = id; this.width = w; if(ui=='none') { this.height = h - 64; } else { this.height = h; } this.autostart = as; this.uimode = ui; }
WMPObject.prototype.getHTML = function() { var wmpHTML = ""; var WMP7; if(-1 != navigator.userAgent.indexOf("MSIE")){ if(window.ActiveXObject) { try { WMP7 = new ActiveXObject("WMPlayer.OCX.7"); } catch(e) {} } if ( WMP7 ) { wmpHTML += ''; } else { wmpHTML += '
'; wmpHTML += ''; wmpHTML += ''; wmpHTML += 'The version of windows media player you are using is too old consider upgrading...
'; wmpHTML += ''; wmpHTML += '
'; wmpHTML += ' |
'; } } else if(-1 != navigator.userAgent.indexOf("Firefox")){ wmpHTML += ''; } else if(-1 != navigator.userAgent.indexOf("Safari")){ wmpHTML += ''; } else if(-1 != navigator.userAgent.indexOf("Opera")){ wmpHTML += ''; } else { wmpHTML += ''; } return wmpHTML; }
WMPObject.prototype.write = function() { document.write(this.getHTML()); }
var cypherboxWMP = new WMPObject(cypherboxwmp_src, cypherboxwmp_id, cypherboxwmp_width, cypherboxwmp_height,cypherboxwmp_autostart,cypherboxwmp_ui); cypherboxWMP.write();