﻿// JScript File
function playVideo()
{
    document.getElementById("VideoFrameInner").innerHTML = strVideo;
    if(document.all){
       document.getElementById("video").Play();
    }
    else{
       try{document.video.Play();}
       catch(e){}  
    }
}

function stopVideo()
{
    if(document.all){
       document.getElementById("video").Stop();
    }
    else{
       try{document.video.Stop();}
       catch(e){}   
    }
    document.getElementById("VideoFrameInner").innerHTML = "&nbsp;";
}

function toggleVideo(){
    
    if(!isVideoAction)
    {
        var i = 0;
        isVideoAction = 1;
        if(isVideoOpen)
        { 
            document.getElementById("VideoSwitch").innerHTML = "Click To Open &raquo;";
            stopVideo();
            for(i = 255; i>12; i--)
                setTimeout("document.getElementById('VideoFrameOuter').style.height = '" + i + "px'", 1 * (255-i));
            isVideoOpen = 0;
        }
        else
        {
            document.getElementById("VideoSwitch").innerHTML = "Click To Close &raquo;";
            for(i = 12; i<255; i++)
                setTimeout("document.getElementById('VideoFrameOuter').style.height = '" + i + "px'", 1 * i);
            setTimeout("playVideo()", 1 * i);
            isVideoOpen = 1;
        }
        setTimeout("isVideoAction = 0", 2 * i);
    }
}

