	<!--
	//-------------------------------------------------------------
	// 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 PopUpTVC(url)
{
	window.open(url, '', 'width=352,height=288,left=0,top=0,status=yes,scrollbars=yes,resizable=no');
}

function PopUpPrint(url)
{
	window.open(url, '', 'width=800,height=600,left=0,top=0,toolbar=yes,status=yes,scrollbars=yes,resizable=yes');
}
function set_focus(control_name)
{
	var control = document.getElementById(control_name);
	if( control != null ){ control.focus(); }
}
function populateDate(lang)
{
		
	var TheFontFace  = "Arial,Trebuchet MS";
	var TheFontColor = "#6b5306";
	var TheFontSize  = "2";
	var TheFontStyle = "normal"; 
	
	// Set the separator between the date elements;
	// usually use either - or /.
	
	var TheSeparator = "-";
	
	// Show or do not show the day of the week; set
	// yes to show, no not to show.
	
	var ShowDay ="yes";
	
	// Do Not Edit Below This Line
	// ==============================================
	if(lang=="en")
	    var Days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
	else
	    var Days = new Array("Minggu","Senin","Selasa","Rabu","Khamis","Jumat","Sabtu");
	
	var TheDate = new Date();
	
	var TheWeekDay = TheDate.getDay();
	var Day ="";
	if (ShowDay == "yes"){
		Day = Days[TheWeekDay];
		Day += ", ";}
	
	var TheMonth = TheDate.getMonth() + 1;
	if (TheMonth < 10) TheMonth = "0" + TheMonth;
	
	var TheMonthDay = TheDate.getDate();
	if (TheMonthDay < 10) TheMonthDay = "0" + TheMonthDay;
	
	var TheYear = TheDate.getYear();
	if (TheYear < 1000) TheYear += 1900;
	
	var FontTagLeft  = "";
	var FontTagRight = "";
	
	if (TheFontStyle == "bold"){
		FontTagLeft = "<b>";
		FontTagRight ="</b>";}
		
	if (TheFontStyle == "italic"){
		FontTagLeft = "<i>";
		FontTagRight ="</i>";}
		
	if (TheFontStyle == "bolditalic"){
		FontTagLeft = "<b><i>"; 
		FontTagRight = "</i></b>";}    
	
	var D = "";
	D += "<font color='"+TheFontColor+"' face='"+TheFontFace+"' size='"+TheFontSize+"'>";
	D += FontTagLeft+Day+TheMonthDay+TheSeparator+TheMonth+TheSeparator+TheYear+FontTagRight;
	D += "</font>";

	document.write(D);
}