﻿//#region Copyright Zerone Consulting Private Limited
//
// All rights are reserved. Reproduction or transmission in whole or in part, in
// any form or by any means, electronic, mechanical or otherwise, is prohibited
// without the prior written consent of the copyright owner.
//
// Filename        : LiveProgramListing.js
// Purpose         : LiveProgramListing
// Creation Date   : 27/July/2009
// Author          : Abdul Gafoor
//
// Change History  :
// Changed by      :                                     Date : 
// Purpose         :
//
//#endregion


// Purpose  : set hidden variable
// Auther   : Abdul Gafoor
// Created  : 27/July/2009
function ShowDeactivatedLivePrograms( chk )
{
    document.getElementById("ctl00_cplhContent_hdnShowDeactivated").value = chk.checked;
}

// Purpose  : Set Deactivated LivePrograms
// Auther   : Abdul Gafoor
// Created  : 21/July/2009
function SetDeactivatedLivePrograms()
{
    try
    {
        var val = document.getElementById("ctl00_cplhContent_hdnShowDeactivated").value;
        var chks = document.getElementById("ctl00_cplhContent_gvLivePrograms").getElementsByTagName("INPUT");
        var chk = null;
        
        for( var i=0; i < chks.length; i++ )
        {
            if ( chks[i].id.indexOf("chkShowDeactivated") >= 0 )
            {
                chk = chks[i];
            }
        }
            
        if ( chk != null && val.toLowerCase() == "true" )
        {
            chk.checked = true;
        }
        else
        {
            chk.checked = false;
        }
    }

    catch(ex)
    {
    }
}


// Purpose  : Sorting HomePage Gridview based on Dropdown Change
// Auther   : Abdul Gafoor
// Created  : 12/August/2009
function SortGridPrg(ddlSort)
{
  var sortfield = document.getElementById(ddlSort).value; 
  location.href("LivePrograms.aspx?sortby="+sortfield);  
}


