

function checkMerchantAndProgram() {
	var merchantTemp=jQuery.noConflict()('#newLoyaltyProgramForm\\:merchant').val();
	var programTemp= jQuery.noConflict()('#newLoyaltyProgramForm\\:program').val();
		
	if(programTemp != "" && merchantTemp != "") {
		Richfaces.showModalPanel('helpPanelAddCard');
	}
}

function checkMerchantAndProgramAction() {
	var merchantTemp=jQuery.noConflict()('#newLoyaltyProgramForm\\:merchant').val();
	var programTemp= jQuery.noConflict()('#newLoyaltyProgramForm\\:program').val();
		
	if(programTemp != "" && merchantTemp != "") {
		teste();
	}
}


function disableSaveCommandLink(){
	var handleClick = "return false;";
    // creates a function from the "js" string
    var newclick = eval("(function(){" + handleClick + "});");
    // clears onclick then sets click
    
    // FIXME - by accessing the first position on the array we are hoping that all browsers build the dom tree exactly the same way. pray!!! 
    jQuery.noConflict()(jQuery.noConflict()('#newLoyaltyProgramForm a')[0]).attr('onclick', '').click(newclick);
    
    if(true) {
    	var i = 32;
    }
}

