	    function SetCheckedValue(strChkNames, totalChkBoxes, val) 
		    {
			    var len = 0;
			    if (totalChkBoxes != null)
			        {
				    len = totalChkBoxes;
			        }
			
			    var chkNamesArr = strChkNames.split("|");  
			
			    for(var i=0 ; i<len ; i++) 
			        {
				    document.getElementById(chkNamesArr[i]).checked = val;
			        }
            }
		


		function SetCheckAllValue(ChkName, val) 
		    {
		        document.getElementById(ChkName).checked = val;
		    }
		
		
		
		function ValidateForm(strChkNames, totalChkBoxes)
		    {
			    var len = 0;
			    if (totalChkBoxes != null)
			        {
				    len = totalChkBoxes;
			        }
				
			    var chkNamesArr = strChkNames.split("|");
			
			    for(i=0 ; i<len ; i++) 
			        {
				        if (document.getElementById(chkNamesArr[i]).checked==1)
				            {
					            if(confirm("Are you sure, you want to delete?"))
					                {
						                return true;
						                break;
						            }
					            return false;
					            break;
				            }			
                    }
			
                alert("Please select at least one row to delete");
                return false;
            }
            
        function ValidateConfirm(ChkName)
		    {		        
			    if (document.getElementById(ChkName).checked==1)
                    {
					    return true;
					}
				else
				    {
                    alert("Click on the Agreement Check box to Proceed");
                    }
                return false;
            }
		
		
		function ValidateForm_Enb(strChkNames, totalChkBoxes)
		    {
			    var len = 0;
			    if (totalChkBoxes != null)
			        {
				        len = totalChkBoxes;
			        }
				
			    var chkNamesArr = strChkNames.split("|");
			
			    for( i=0 ; i<len ; i++) 
			        {
				        if (document.getElementById(chkNamesArr[i]).checked==1)
				            {
					            if(confirm("Are you sure, you want to Enable?"))
					                {
						                return true;
						                break;
                                    }
					            return false;
					            break;
				            }
                    }
                alert("Please select at least one row to Enable.");
                return false;
            }	
		
		
		
		function ValidateForm_Dis(strChkNames, totalChkBoxes)
		    {
			    var len = 0;
			    if (totalChkBoxes != null)
			        {
				        len = totalChkBoxes;
			        }
				
			    var chkNamesArr = strChkNames.split("|");
			
			    for( i=0 ; i<len ; i++) 
			        {
				        if (document.getElementById(chkNamesArr[i]).checked==1)
				            {
					            if(confirm("Are you sure, you want to Disable?"))
					                {
						                return true;
						                break;
                                    }
					                return false;
					                break;
				            }
                    }
			
			    alert("Please select at least one row to Disable");
			    return false;			    
		    }	




					
		// JScript File

//here you place the ids of every element you want.

function ShowHidePanel(id,chkValue){
        
        if (chkValue==1) {
        
            showdiv(id);
        }
        else{
            hidediv(id);
        }
}

function ShowHideGroup(ids,chkValue){
        var idarr = ids.split("|");			
		for( i=0 ; i<length(idarr) ; i++) 
			{
			  if (chkValue==1)
			    {
			    showdiv(idarr[i]);
			    }
              else
                {
                hidediv(idarr[i]);
                }  
			}
		}




function hidediv(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'none';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'none';
		}
		else { // IE 4
			document.all.id.style.display = 'none';
		}
	}
}

function showdiv(id) {
	//safe function to show an element with a specified id
		
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.display = 'block';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.display = 'block';
		}
		else { // IE 4
			document.all.id.style.display = 'block';
		}
	}
}

function ShowHideTr(id,chkValue){
        
        if (chkValue==1) {
        
            showtr(id);
        }
        else{
            hidetr(id);
        }
}

function hidetr(id) {
	//safe function to hide an element with a specified id
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.visibility = 'collapse';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.visibility = 'collapse';
		}
		else { // IE 4
			document.all.id.style.visibility = 'collapse';
		}
	}
}

function showtr(id) {
	//safe function to show an element with a specified id
		
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById(id).style.visibility = 'visible';
	}
	else {
		if (document.layers) { // Netscape 4
			document.id.visibility = 'visible';
		}
		else { // IE 4
			document.all.id.style.visibility = 'visible';
		}
	}
}


/*visibility:hidden;
        visibility:collapse;
        visibility:visible ;*/