function createWMPEmbedMarkup(src, width, height, baseurl) { var x = document.createElement("embed"); x.setAttribute("FileName", src); x.setAttribute("type", "application/x-mplayer2"); x.setAttribute("width", width); x.setAttribute("height", height); x.setAttribute("ShowStatusBar", "0"); x.setAttribute("AutoStart", "1"); x.setAttribute("DisplaySize", "0"); x.setAttribute("EnableFullScreenControls", "1"); x.setAttribute("ClickToPlay", "1"); x.setAttribute("AutoSize", "0"); if (!baseurl) { if (document.location.protocol == "file:") { var loc = decodeURIComponent(document.location.toString().replace(/file:\/\/localhost\//i, "file:///").replace(/file:\/\/\//i, "").replace(/file:\/\//i, "").replace(/\//g, '\\')); loc = loc.substring(0, loc.lastIndexOf('\\') + 1); if (loc.charAt(1) != ':' && loc.indexOf("\\\\") != 0) { loc = "\\\\" + loc; } x.setAttribute("BaseURL", loc); } } else { // If the caller specified a base url, use it. x.setAttribute("BaseURL", baseurl); } var p = document.createElement("p"); // wrap the node in an element so innerHTML can be used. (only Opera has outerHTML) p.appendChild(x); return p; } /*document.write(createWMPEmbedMarkup("mms://www.hardrockfm.com/video-hrfm", "480", "288").innerHTML);*/ document.write(createWMPEmbedMarkup("mms://61.8.70.166/video-hrfm", "480", "288").innerHTML); */ ?>