var js_blessingu = {
	loading: '<img src="/bu-content/images/common/icon/loading.gif" width="16" height="16" />',
	removeTextBoxtips:function ($txt , $classname){
		$($txt).removeClassName( $classname);	
	},
	
	addTextBoxtips:function($txt , $classname){
		if($($txt).value==''){$($txt).addClassName($classname);}	
	},
	
	showTselect:function(element){
		if($(element).getStyle('display') == 'none'){
			$(element).setStyle({display:'block'});
		}else{
			$(element).setStyle({display:'none'});	
		}
	},
	
	setTvalue:function(txt_element, txt_value , htxt_element , htxt_value , div_element){
		$(txt_element).value = txt_value;
		$(htxt_element).value = htxt_value;
		this.showTselect(div_element);
	},
	
	showSearchDataCategory: function($portalID){
		if($('DATACAT'+$portalID+'_DIV').getStyle('display') == 'none'){
			$('MINMAX'+$portalID+'_BTN').removeClassName('portal_max_btn');
			$('MINMAX'+$portalID+'_BTN').addClassName('portal_min_btn');
			$('DATACAT'+$portalID+'_DIV').setStyle({display:'block'});
		}else{
			$('MINMAX'+$portalID+'_BTN').removeClassName('portal_min_btn');
			$('MINMAX'+$portalID+'_BTN').addClassName('portal_max_btn');
			$('DATACAT'+$portalID+'_DIV').setStyle({display:'none'});
		}	
		
	},
	
	getBookChList_Select:function($target_div , $theme, $selectedID, $chselect){
		//alert($selectedID);
		
		$($target_div).innerHTML = this.loading;
		new Ajax.Request("/bu-content/"+$theme+"/ajax_bible.php", 
		{     
		method:'post',
		parameters: 'action=getBookCh_Select&bookID='+$selectedID+"&theme="+$theme+"&ch="+$chselect,
		onSuccess: function(transport){       
		var response = transport.responseText || "no response text";
		//alert(response);
		var data = response.evalJSON(); 
		//alert(data.error);
			if(data.error == 'true'){
				//alert(data.msg);
				//alert("fail");
				$($target_div).innerHTML = 'error!';
			}else{   
				//alert("ok");
				$($target_div).innerHTML = data.output;
				
				
			}
			
		},     
		onFailure: function(){ alert('Something went wrong...') }   
		});
	
		
	},
	
	getBookChList_Select2:function($target_div , $theme, $selectedID, $chselect){
		//alert($selectedID);
		
		$($target_div).innerHTML = this.loading;
		new Ajax.Request("/bu-content/"+$theme+"/ajax_bible.php", 
		{     
		method:'post',
		parameters: 'action=getBookCh_Select2&bookID='+$selectedID+"&theme="+$theme+"&ch="+$chselect,
		onSuccess: function(transport){       
		var response = transport.responseText || "no response text";
		//alert(response);
		var data = response.evalJSON(); 
		//alert(data.error);
			if(data.error == 'true'){
				//alert(data.msg);
				//alert("fail");
				$($target_div).innerHTML = 'error!';
			}else{   
				//alert("ok");
				$($target_div).innerHTML = data.output;
				
				
			}
			
		},     
		onFailure: function(){ alert('Something went wrong...') }   
		});
	
		
	}
	
}