﻿

function OpenPop(popUrl, w, h, popParams)
{
    url = popUrl + "?" + popParams;    
    window.open(url, "Img", "width=" + w + ",height=" + h + ",toolbar=no,menubar=no,scrollbars=no,resizable=no");
}

function CollapseExpand(divName, source, imageFolder)
{
    elem = document.getElementById(divName);
    ExpandCollapse = document.getElementById(source);
    if(elem.style.display=="none")
    {
        elem.style.display="block";
        ExpandCollapse.src= imageFolder + "icon_collapse.gif";
    }
    else
    {
        elem.style.display="none";
        ExpandCollapse.src= imageFolder + "icon_expand.gif";
    }
}


function WriteBeginMarquee() {
    document.write('<marquee direction=\"up\" scrolldelay=\"1\" scrollamount=\"1\">');
}

function WriteEndMarquee() {
    document.write('</marquee>');
}



function RenderCommunicationVideo(name, height) {
    document.write('<object id="' + name + '" width="100%" height="' + height + '" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject">');
    document.write('<param name="autostart" value="False">');
    document.write('<param name="ShowControls" value="True">');
    document.write('<param name="AutoRewind" value="False">');
    document.write('<param name="EnableFullScreenControls" value="True">');
    document.write('<embed type="application/x-oleobject" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="100%" height="' + height + '" autostart="False" showcontrols="True" EnableFullScreenControls="True" autorewind="True"></embed>');
    document.write('</object>');
}


function RenderWebTV(w, h, videoUrl) {
    document.write('<object width="' + w + '" height="' + h + '" classid="CLSID:22d6f312-b0f6-11d0-94ab-080c74c7e95" standby="Loading Windows Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">');
    document.write('<param name="autostart" value="False">');
    document.write('<param name="ShowControls" value="True">');
    document.write('<param name="ShowStatusBar" value="False">');
    document.write('<param name="ShowDisplay" value="False">');
    document.write('<param name="AutoRewind" value="False">');
    document.write('<param name="Filename" value="' + videoUrl + '">');
    document.write('<embed type="application/x-oleobject" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/" width="'  + w +  '" height="' + h + '" src="' + videoUrl + '" showstatusbar="False" autostart="False" showcontrols="True" showdisplay="False" autorewind="True">');
    document.write('</embed>');
    document.write('</object>');
}


function RenderFlashVideo(w, h, videoUrl) {
    document.write('<object width="' + w + '" height="' + h + '">');
    document.write('<param name="movie" value="' + videoUrl + '"></param>');
    document.write('<param name="allowFullScreen" value="false"></param>');
    document.write('<param name="allowscriptaccess" value="always"></param>');
    document.write('<embed src="' + videoUrl + '" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="false" width="' + w + '" height="' + h + '"></embed>');
    document.write('</object>');
}
