	<!--
	//-------------------------------------------------------------
	// Select all the checkboxes (Hotmail style)
	// Note: Please note this will select all the check boxes on the
	// form.
	//-------------------------------------------------------------
	function SelectAllCheckboxes(spanChk){
	
	// Added as ASPX uses SPAN for checkbox 
	//var xState=spanChk.checked;
	var theBox=spanChk;
	
	// Old code for VS 2002 / .NET framework 1.0 code
	//-----------------------------------------------
	// In .NET 1.0 ASP.NET was using SPAN tag with
	// CheckBox control. 
	//
	//var oItem = spanChk.children;
	//var theBox=oItem.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)
		if(elm[i].type=="checkbox")
			{
			//if(elm[i].checked!=xState)
			//elm[i].checked=xState;
			elm[i].checked=true;
			}
	}
	// -->
	
//-------------------------------------------------------------	
//this function used fot the cmb lines 
//it clear the form to avoid new query inserted in the next view.
function ChangeNumOfLines(){
	with(window.document.forms[0]){
		var SelectedIndex = cmbLines.selectedIndex;
		reset();
		cmbLines.selectedIndex = SelectedIndex;
		submit();
	}
}
//-------------------------------------------------------------

//-------------------------------------------------------------	
//this function used for going to anchor. 
//to be called from vb
function gotoAnchor(anchorName){
	window.location.href = '#'+anchorName;
	return true;
}
//-------------------------------------------------------------

//-------------------------------------------------------------
//this function used to filter input in textbox
//use on OnKeyPressEvent
function numbersonly(){
		//alert(event.keyCode);
	if (event.keyCode==8 || event.keyCode == 46) {	return true;	}	//Delete & BackSpace
	if (event.keyCode==9 || event.keyCode==20)	{ return true;	}	//Tab & Caps
	//if (event.keyCode==45) { return true; }	// -
	if (event.keyCode<46||event.keyCode>57){
		//alert("You may only enter Numbers!");
		return false;
	}
	else{
		if (event.keyCode != 47){
			return true;
		}
		else{
		//alert("You may only enter Numbers!");
			return false;
		}
	}
}
//-------------------------------------------------------------

//-------------------------------------------------------------
//this function used to filter input in textbox
//use on OnKeyPressEvent
function integeronly(){
	//alert(event.keyCode);
	if (event.keyCode==8 || event.keyCode == 46) {	return true;	}	//Delete & BackSpace
	if (event.keyCode==9 || event.keyCode==20)	{ return true;	}	//Tab & Caps
	//if (event.keyCode==45) { return true; }	// -
   if (event.keyCode<46||event.keyCode>57){
		//alert("You may only enter Numbers!");
	  return false;
   } else{
	  if (event.keyCode != 47){
		 return true;
	  }
	  else{
		//alert("You may only enter Numbers!");
		 return false;
	  }
   }
}

function NonPetikSatu(){
//		alert(event.keyCode);
	if (event.keyCode == 39){
		return false;
	}
	else if (event.keyCode == 44){
		return false;
	}
	else{
		return true;
	}
}
	
//-------------------------------------------------------------

var popUp; 

function PopUp(url)
{
	window.open(url, '', 'width=1000,height=700,left=0,top=0,status=yes,scrollbars=yes');
}

function PopUpPrint(url)
{
	window.open(url, '', 'width=800,height=600,left=0,top=0,toolbar=yes,status=yes,scrollbars=yes,resizable=yes');
}
function showtr(TheTR, img)
{
	var DataTR = eval('document.all.' + TheTR);
	if (DataTR.style.display=="block" || DataTR.style.display=="" )
	{
		DataTR.style.display="none";
		
	}
	else
	{
		DataTR.style.display="block";
	}
}		
function set_focus(control_name)
{
	var control = document.getElementById(control_name);
	if( control != null ){ control.focus(); }
}