<div class="pull-right">

	<?php $form=$this->beginWidget('BootActiveForm', array(
			'action'=>Yii::app()->createUrl($this->route),
			'method'=>'get',
			'htmlOptions'=>array('class'=>'form-inline'),
	)); ?>

	<?php 
	$this->widget('zii.widgets.jui.CJuiAutoComplete', array(
			'model'=>$model,
			'attribute'=>'account_name',
			'source'=>$this->createUrl('tAccount/accountAutoComplete'),
			'options'=>array(
					'minLength'=>'2',
					//'select'=>'js:function( event, ui ) {
					//	window.open("'.$this->createUrl('tAccount/index',array("tAccount[account_name]"=>"penj","q"=>"Search")).'","_self");
					//	return false;
					//}',
					//'select'=>'js:function( event, ui ) {
					//	alert("Testing: "+'.time().');
					//	return false;
					//}',
			),
			'htmlOptions'=>array(
					'class'=>'input-medium',
					'placeholder'=>'Search NoRef or Remark',
			),
	));

	?>

	<!-- 
	setTimeout(\"$('#mydialog').dialog('close') \",1200); 
	$("#'.CHtml::activeId($model,'nig').'").val(ui.item.label);
	+ui.item.label);
	-->


	<?php echo CHtml::htmlButton('<i class="icon-search"></i> Search', array('class'=>'btn','type'=>'submit')); ?>

	<?php $this->endWidget(); ?>

</div>
