function ConfirmDelete(item)
{
  return confirm("Are you sure you want to remove this "+ item +"?");
  
}


function ConfirmDeclineFriend()
{
  return confirm("Are you sure you want to decline?");
  
}


function showPlayer() {
    playerDiv = document.getElementById("player");
    if (playerDiv != null) { // we're on a video page
        playerDiv.style.visibility = "visible";    
       // UnPauseVideo();
        leaderboard1_div = document.getElementById("Leaderboard1");
        if (leaderboard1_div != null) {
            leaderboard1_div.style.visibility = "visible";    
           // UnPauseVideo();
        }
    } else {
//        bodyContent_div = document.getElementById("body_content");
//        if (bodyContent_div != null) {
//            bodyContent_div.style.visibility = "visible";    
//        }
    }
}

function hidePlayer() {
    playerDiv = document.getElementById("player");
    if (playerDiv != null) { // we're on a video page
        playerDiv.style.visibility = "hidden";    
        PauseVideo();
        leaderboard1_div = document.getElementById("Leaderboard1");
        if (leaderboard1_div != null) {
            leaderboard1_div.style.visibility = "hidden";    
            PauseVideo();
        }
    } else {
//        bodyContent_div = document.getElementById("body_content");
//        if (bodyContent_div != null) {
//            bodyContent_div.style.visibility = "hidden";    
//        }
    }
}

function showLogInWindow()
{
    hidePlayer();
    var manager = GetRadWindowManager();
    var window1 = manager.GetWindowByName("LoginDialog");
     window1.SetSize(420,680);
    window1.Show();                    
}
// This is a javascript handler for the player and is always needed.
function thisMovie(movieName) {
    var isIE = navigator.appName.indexOf("Microsoft") != -1;
    return (isIE) ? window[movieName] : document[movieName];
}

function PauseVideo() {
    thisMovie("mdc_player").PauseVideo();
}

function PauseSplash() {
    //for homepage
    thisMovie("mdc_player2").PauseSplash();
}

function UnPauseVideo() {
    thisMovie("mdc_player").UnPauseVideo();
}

function StopAutoLoadNext()
{
    var movie = thisMovie("mdc_player")
    if (movie != null)
        movie.StopAutoLoadNext();
}

function ToggleAutoLoadNext(state) {

    var movie = thisMovie("mdc_player")
    if (movie != null) {

        if (state == true) {
          
            movie.StartAutoLoadNext();
        } else {
        
               movie.StopAutoLoadNext();
        }

    }
      
}

function GetVideoTime()
{
    var time = 	thisMovie("mdc_player").GetVideoTime();
    return time;
}

function InitializeRequest(sender, args) {
 document.body.style.cursor = "wait";    
}
function EndRequest(sender, args) {
 document.body.style.cursor = "default";    
}

	

function mdcwindow(_page, _width, _height)
 {
 
var leftPos = 0
var topPos = 0
if (screen) 
{
leftPos = (screen.width / 2) - (_width/2)
topPos = (screen.height / 2) - (_height/2)
}

 win = window.open(_page, "MDC_Pop", "menubar=no,resizable=1,statusbar=no,toolbar=no,location=no,toolbar=0,width="+ _width +",height="+ _height +",left="+leftPos+",top="+topPos+",menu=no");
 
 //win = window.open(_page, "MDC_Pop", "menubar=no,resizable=1,statusbar=no,toolbar=no,location=no,toolbar=0,menu=no,width=100,height=400");
 

}


function mdcwindowscroll(_page, _width, _height)
 {
 
var leftPos = 0
var topPos = 0
if (screen) 
{
leftPos = (screen.width / 2) - (_width/2)
topPos = (screen.height / 2) - (_height/2)
}

 win = window.open(_page, "MDC_Pop", "menubar=no,resizable=1,statusbar=no,toolbar=no,location=no,toolbar=0,scrollbars=1,width="+ _width +",height="+ _height +",left="+leftPos+",top="+topPos+",menu=no");
 
 //win = window.open(_page, "MDC_Pop", "menubar=no,resizable=1,statusbar=no,toolbar=no,location=no,toolbar=0,menu=no,width=100,height=400");
 

}