function ShowHideCheckBox(obj1,obj2,obj3)
{
    var radio1=document.getElementById(obj1);
    alert(radio1);
    var radio2=document.getElementById(obj2);
    var checbox=document.getElementById(obj3);
    if(radio1.checked)
    {
        checbox.visible=true;
    }
    if(radio2.checked)
    {
        checbox.visible=false;
    }
    return false;
}
function showDiv(div)
{

	var d=document.getElementById(div);
	d.style.display="block";
	return false;
}
function hideDiv(div)
{

	var d=document.getElementById(div);
	
	d.style.display="none";
	return false;
}
function Blank(txt)
{
document.getElementById(txt).value="";
}
function EnableDisable(txt)
{
if(document.getElementById(txt).value!='')
{
document.getElementById(txt).disabled=!(document.getElementById(txt).disabled);
}
}

function closePopup()  
 {  
     document.getElementById("divSignin").style.display="none";      
        objDiv = document.getElementById("divg");  
        objDiv.style.display = "none";   
        return false;  
 }  
 function showPopup()  
 {  
     try  
     {    
         document.getElementById("divSignin").style.display="block";      
         objDiv = document.getElementById("divg");  
            objDiv.style.display = "block";   
            objDiv.style.width = document.body.scrollWidth;  
            objDiv.style.height= document.body.scrollHeight;           
            fnSetDivSigninLeft("divSignin");          
     }  
     catch(e)  
     {  
         alert(e);  
     }  
     return false     
 }  
 function fnSetDivSigninLeft(oElement)  
    {  
       var DivWidth = parseInt(document.getElementById(oElement).offsetWidth,10)  
       var DivHeight = parseInt(document.getElementById(oElement).offsetHeight,10)  
       document.getElementById(oElement).style.left = (document.body.offsetWidth / 2) - (DivWidth / 2)+200;  
       document.getElementById(oElement).style.top = (document.body.offsetHeight / 2) -  ( DivHeight / 2);  
       
       return false;       
    }  
	
function Action(dropdown)
     {

         var ddl = document.getElementById(dropdown);
         
        if(ddl.selectedIndex==0)
        {
        alert("Please Select A Action.");
        return false;
        }
       
      if(ddl.selectedIndex==1 ) 
      {
     
      return confirm('Do you want to enable selected record(s)?');
      }
     
      if(ddl.selectedIndex==2)
      {
         return confirm('Do you want to disable selected record(s)?');
      }
      
     
      if(ddl.selectedIndex==3)
      {
      return confirm('Do You want to delete selected record(s)?');
      }
       if(ddl.selectedIndex==4 || ddl.selectedIndex==5)
      {
      return confirm('Do you want to change Type?');
      }
    
}
function SelectAll(id,Gridview)
        {  
            //get reference of GridView control
          
            var grid = document.getElementById(Gridview); 
            //variable to contain the cell of the grid
            var cell;
          
            if (grid.rows.length > 0)
            {
                //loop starts from 1. rows[0] points to the header.
                for (i=1; i<grid.rows.length; i++)
                {
                    //get the reference of first column
                    cell = grid.rows[i].cells[0];
                    
                    //loop according to the number of childNodes in the cell
                    for (j=0; j<cell.childNodes.length; j++)
                    {           
                        //if childNode type is CheckBox                 
                        if (cell.childNodes[j].type =="checkbox")
                        {
                        //assign the status of the Select All checkbox to the cell checkbox within the grid
                            cell.childNodes[j].checked = document.getElementById(id).checked;
                        }
                    }
                }
            }
        }
        
        
        function SelectCheckBoxList(id,form)
        {  
           for (var c = 0; c < form.elements.length; c++)
                if (form.elements[c].type == 'checkbox')
                   
                form.elements[c].checked = document.getElementById(id).checked;
         }
           
      
        
        
        
        
        
        function showDivWithLabel(div,lbl)
{

	var d=document.getElementById(div);
	var l=document.getElementById(lbl);
	d.style.display="block";
	l.style.display="block";
	return false;
}
function hideDivWithLabel(div,lbl)
{

	var d=document.getElementById(div);
	var l=document.getElementById(lbl);
	d.style.display="none";
	l.style.display="none";
	return false;
}



 function showDivWithText(div)
{

	var d=document.getElementById(div);

	d.style.display="block";
	
	return false;
}
function hideDivWithText(div)
{

	var d=document.getElementById(div);

	d.style.display="none";
	
	return false;
}
