		//----------------------------------------
		// There is an issue with .NET's Textbox server control, 
		// that if the user decides to press the enter key from within the 
		// textbox containing the same criteria, the form will not postback 
		// (as of v1.1 of the .NET Framework, this does not seem to have been resolved)!
		// Physically pressing the submit button is the only way around this.
		// This is the javascript solution to the issue.
		//---------------------------------------
		var isIE;
		if (navigator.appName == 'Microsoft Internet Explorer'){isIE = true;} 
		function getButton() 
		{  
			
			//Capture Netscape events  
				if(!isIE) { 
					document.captureEvents(Event.KEYDOWN); 
				} 
				document.onkeydown = submitText
		  	}

		function submitText(evt){ 
				var theButtonPressed; 
				if (isIE){
					theButtonPressed = window.event.keyCode; 
				}else{
					theButtonPressed = evt.which; 
				} 
				if (theButtonPressed == 13) { 
					if(isIE){ 
						with(event){ 
							cancelBubble = true; 
							returnValue = false; 
						} 
					} 
				document.getElementById('SearchDataGrid').click(); 
				} 
			} 
		function confirmDelete (frm, deleteName) {
			return confirm("Are you sure you want to delete the selected items");
		}


	//-------------------------------------------------------------
	// Select all the checkboxes
	//-------------------------------------------------------------
	function select_deselectAll (chkVal, idVal, selectAllId, deleteId) {
		var frm = document.forms[0];
		if (idVal.indexOf(deleteId) != -1 && chkVal == true){
			var AllAreSelected = true;
			for (i=0; i<frm.length; i++) {
				if (frm.elements[i].id.indexOf(deleteId) != -1 && frm.elements[i].checked == false){ 
					AllAreSelected = false;
					break;
				} 
			 } 
			 if(AllAreSelected == true){
				for (j=0; j<frm.length; j++) {
					if (frm.elements[j].id.indexOf (selectAllId) != -1) {
						frm.elements[j].checked = true;
						break;
					}
				}
			}
		} else {
			for (i=0; i<frm.length; i++) {
				if (idVal.indexOf (selectAllId) != -1) {
					//Verify it is only for the column you clicked SelectAll.
					if (frm.elements[i].getAttribute('Name').indexOf(deleteId)!= -1) {
						if(chkVal == true) {
							frm.elements[i].checked = true;
						} else {
							frm.elements[i].checked = false; 
						}
					}
				} else if (idVal.indexOf(deleteId) != -1 && frm.elements[i].checked == false) {
					for (j=0; j<frm.length; j++) {
						if (frm.elements[j].id.indexOf (selectAllId) != -1) { 
							frm.elements[j].checked = false;
							break; 
						} 
					} 
				} 
			} 
		} 
		}
		
		function isChecked(checkVal) {
			if (checkVal) 
				return "Yes";
			else 
				return "No";
		}
