﻿// JScript File

function darkenBackroundOn(msg, img, autoHide)
{
    document.getElementById("darkBackgroundLayer").className = "darkenBackground";
    document.getElementById('divWait').style.display='block';   
    
    if(img != null)
        document.getElementById('waitIcon').src=img; 
        
    if(msg != null)
    {
        document.getElementById('waitMsg').innerHTML=msg; 
        
        if(autoHide == true)   
        {
            document.getElementById("waitImg").style.display = "none"    
            setTimeout("darkenBackroundOFF()", 7000);
        }
    }
}
function darkenBackroundOFF(refresh)
{
    document.getElementById("darkBackgroundLayer").className = "";
    document.getElementById('divWait').style.display = 'none';
    // Reset the original wait message
    //document.getElementById('waitMsg').innerHTML="Media upload in progress.<br />Please wait...";
    
    if(refresh == true)
        window.location.href=window.location.href
}

function tutorial(url)
{
    window.open("../Media/tutorialPlayer.aspx?url=" + url,"Tutorial","toolbar=0,resizable=0,width=720,height=660,left=300,top=200");
                
}