$(function(){
	
	
	
	/**
	 * Script handling the red card / yellow links for 3 star users
	 */
	if($('#showCard').attr('id')){
		$('a[id=showCard]').bind('click',
				function(event){
					var toUserIdVal = $(event.target).attr('toUserId');
					var cardTypeVal = $(event.target).attr('cardType');
					var messageVal = cardTypeVal+' card';
					$.get('login_showCardToUser.htm',
							{	toUserId: toUserIdVal, 
								cardType: cardTypeVal, 
								message: messageVal
							},
							function(data){
											if(containsOpenHTMLTagBracket(data)){
												alert(getProperty('alert_error_maybeSessionTimedOut'));
											}else if(data == 'true'){       
												alert(getProperty('alert_success_shownCard'));
											}else if(data == 'false'){
												alert(getProperty('alert_error_noPrivileges'));
											}
										  }
						  );
				}
			);
		
	}
	
	
})