﻿

function ClearText(clientid)
{
	
	if(document.getElementById(clientid).value=="Enter search text")
	{
		document.getElementById(clientid).value='';
		document.getElementById(clientid).focus();
	}
}
function SetSearchText(clientid)
{
	if(document.getElementById(clientid).value=='')
	{
		document.getElementById(clientid).value='Enter search text';	
	}
}

function SetValidatorDisable(id)
{
  var myVal = document.getElementById(id); 
  ValidatorEnable(myVal, false); 
}
function SetValidatorEnable(id)
{
  var myVal = document.getElementById(id); 
  ValidatorEnable(myVal, true); 
}

//function TestCheckBox(ctl)
//{             
//  TargetBaseControl = document.getElementById(ctl);
// 
//  if(TargetBaseControl == null) return false;
// 
//  //get target child control.
//  var TargetChildControl = "chkSelect";  //Give the name of checkbox used in Template Field.
//       
//  //get all the control of the type INPUT in the base control.
//  var Inputs = TargetBaseControl.getElementsByTagName("input");
//       
//  for(var n = 0; n < Inputs.length; ++n)
//     if(Inputs[n].type == 'checkbox' &&
//        Inputs[n].id.indexOf(TargetChildControl,0) >= 0 &&
//        Inputs[n].checked)
//      return true;       
//       
//  alert('Select at least one Record from List !');
//  return false;
//}
