﻿// JScript File

function SelectAllCheckboxes(spanChk){

   // Added as ASPX uses SPAN for checkbox
   var oItem = spanChk.children;
   var theBox= (spanChk.type=="checkbox") ? spanChk : spanChk.children.item[0]; 
   xState=theBox.checked;
   elm=theBox.form.elements;

   for(i=0;i<elm.length;i++)
     if(elm[i].type=="checkbox" && 
              elm[i].id!=theBox.id)
     {
       //elm[i].click();
       if(elm[i].checked!=xState)
         elm[i].click();
       //elm[i].checked=xState;
     }
 }
 
 
 function HighlightSelected(colorcheckboxselected, RowState) 
 { 
  if (colorcheckboxselected.checked) 
    colorcheckboxselected.parentElement.parentElement.style.backgroundColor='#C7E2F7'; 
   else 
   { 
    if (RowState=='Alternate') 
      colorcheckboxselected.parentElement.parentElement.style.backgroundColor='#FFFFFF';
    else 
      colorcheckboxselected.parentElement.parentElement.style.backgroundColor='#E1F3FD'; 
    } 
  }
  
function doToggle(sTable, sField, iID)
{
	
	var oWnd;
	var sUrl;
	//sUrl = '/INP/Administration/Global/ToggleStatus.aspx?Table=' + sTable + '&Field=' + sField + '&' + 'ID=' + iID;
	sUrl = '/Administration/Global/ToggleStatus.aspx?Table=' + sTable + '&Field=' + sField + '&' + 'ID=' + iID;
	//alert(sUrl)
	oWnd = openWindowHidden(sUrl, 'wndTogglePopUp');
	return false;
}

function toggleCharPaging(sFormName,iStatus)
{
	var frm = eval("window." + sFormName);
	frm.DisableCharPaging.value = iStatus;
	frm.PageIndex.value = 0;
	frm.submit();
}

