function coolplayer_flash(id, src, mime, width, height, autoplay, url, info) {
    var result = '<object data="' + src + '" type="' + mime + '" ';
        result += 'width="' + width + '" height="' + height + '" class="coolplayer_moz">';
        result += '<param name="play" value="' + autoplay + '" />';
        result += '<param name="wmode" value="opaque" />';
        result += '<param name="quality" value="high" /></object>';
        result += '<!--[if IE]><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
        result += 'width="' + width + '" height="' + height + '">';
        result += '<param name="movie" value="' + src + '" />';
        result += '<param name="play" value="' + autoplay + '" />';
        result += '<param name="wmode" value="opaque" />';
        result += '<param name="quality" value="high" />';
        result += '</object><![endif]-->';
    document.getElementById('coolplayer_container_' + id).innerHTML = result;
    document.getElementById('coolplayer_info_' + id).innerHTML = '<a href="' + url + '">' + info + '</a>';
}

function coolplayer_qt(id, src, mime, width, height, autoplay, url, info) {
    var result = '<object data="' + src + '" type="' + mime + '" ';
        result += 'width="' + width + '" height="' + height + '" class="coolplayer_moz">';
        result += '<param name="autoplay" value="' + autoplay + '" /></object>';
        result += '<!--[if IE]><object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ';
        result += 'width="' + width + '" height="' + height + '">';
        result += '<param name="autoplay" value="' + autoplay + '" />';
        result += '<param name="src" value="' + src + '" />';
        result += '</object><![endif]-->';
    document.getElementById('coolplayer_container_' + id).innerHTML = result;
    document.getElementById('coolplayer_info_' + id).innerHTML = '<a href="' + url + '">' + info + '</a>';
}

function coolplayer_rm(id, src, mime, width, height, autoplay, url, info) {
    var result = '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ';
        result += 'width="' + width + '" height="' + height + '">';
        result += '<param name="src" value="' + src + '" />';
        result += '<param name="controls" value="Imagewindow" />';
        result += '<param name="console" value="clip' + id + '" />';
        result += '<param name="autostart" value="' + autoplay + '" />';
        result += '<embed src="' + src + '" type="audio/x-pn-realaudio-plugin" ';
        result += 'autostart="' + autoplay + '" console="clip' + id + '" ';
        result += 'width="' + width + '" height="' + height + '" ';
        result += 'controls="Imagewindow"></embed><br />';
        result += '</object>';
        result += '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ';
        result += 'width="' + width + '" height="42">';
        result += '<param name="src" value="' + src + '" />';
        result += '<param name="controls" value="ControlPanel" />';
        result += '<param name="console" value="clip' + id + '" />';
        result += '<param name="autostart" value="' + autoplay + '" />';
        result += '<embed src="' + src + '" type="audio/x-pn-realaudio-plugin" ';
        result += 'autostart="' + autoplay + '" console="clip' + id + '" ';
        result += 'width="' + width + '" height="42" ';
        result += 'controls="ControlPanel"></embed>';
        result += '</object>';
    document.getElementById('coolplayer_container_' + id).innerHTML = result;
    document.getElementById('coolplayer_info_' + id).innerHTML = '<a href="' + url + '">' + info + '</a>';
}

function coolplayer_wm(id, src, mime, width, height, autoplay, url, info) {
    var result = '<object data="' + src + '" type="' + mime + '" ';
        result += 'width="' + width + '" height="' + height + '" class="coolplayer_moz">';
        result += '<param name="autoplay" value="' + autoplay + '" /></object>';
        result += '<!--[if IE]><object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" ';
        result += 'width="' + width + '" height="' + height + '">';
        result += '<param name="autoplay" value="' + autoplay + '" />';
        result += '<param name="filename" value="' + src + '" />';
        result += '</object><![endif]-->';
    document.getElementById('coolplayer_container_' + id).innerHTML = result;
    document.getElementById('coolplayer_info_' + id).innerHTML = '<a href="' + url + '">' + info + '</a>';
}

function coolplayer_pdf(id, src, mime, width, height, autoplay, url, info) {
    var result = '<object data="' + src + '" type="' + mime + '" ';
        result += 'width="' + width + '" height="' + height + '" class="coolplayer_moz">';
        result += '</object>';
        result += '<!--[if IE]><object classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" ';
        result += 'width="' + width + '" height="' + height + '">';
        result += '<param name="src" value="' + src + '" />';
        result += '</object><![endif]-->';
    document.getElementById('coolplayer_container_' + id).innerHTML = result;
    document.getElementById('coolplayer_info_' + id).innerHTML = '<a href="' + url + '">' + info + '</a>';
}

function coolplayer_unknown(id, src, mime, width, height, autoplay, url, info) {
    var result = '<span class="coolplayer_info" style="width: ' + (parseInt(width) - 2) + 'px; ';
        result += 'height: ' + height + 'px; ';
        result += 'border-top: 0; border-bottom: 0; ';
        result += 'padding: 12px 0;">';
        result += 'This media can NOT be support to embed into the page, <br />';
        result += 'but you can download it by the following link.';
        result += '</span>';
    document.getElementById('coolplayer_container_' + id).innerHTML = result;
    document.getElementById('coolplayer_info_' + id).innerHTML = '<a href="' + url + '">' + info + '</a>';
}
