function validatorform()
{
	var addcomment_txtarea = document.getElementById('addcomment_txtarea');
	if(addcomment_txtarea.value != ''){
	return true;
	}
	alert('Empty Comment');
	return false;
}
$(function() {
	$("#addcomment_txtarea").autoResize();
	$("#statutupdated").corner("10px");
	function runDialogEffect(){
	$("#dialog").dialog({
			bgiframe: true,
			resizable: false,
			height:155,
			modal: true,
			overlay: {
				backgroundColor: '#111',
				opacity: 0.5
			},
			buttons: {
				"Add me": function() { 
					$('#testconfirmJQ').submit(); 
				},
				Cancel: function() {
					$(this).dialog('close');
				}
			}

		});
	}
	$("#dialog_added").dialog({
			bgiframe: true,
			modal: true,
			buttons: {
				Ok: function() {
					$(this).dialog('close');
				}
			}
	});
	$("#dialog_error").dialog({
			bgiframe: true,
			modal: true,
			buttons: {
				Ok: function() {
					$(this).dialog('close');
				}
			}
	});
	$("#dialog_error_double").dialog({
			bgiframe: true,
			modal: true,
			buttons: {
				Ok: function() {
					$(this).dialog('close');
				}
			}
	});
	function runDialogRemoveEffect(){
		$("#dialog_remove").dialog({
				bgiframe: true,
				resizable: false,
				height:100,
				modal: true,
				overlay: {
				backgroundColor: '#111',
				opacity: 0.5
			},
				buttons: {
				"Remove me": function() { 
					$('#testdeleteJQ').submit(); 
				},
				Cancel: function() {
					$(this).dialog('close');
				}
			}
		});
	}
	$("#dialog_removeconfirm").dialog({
			bgiframe: true,
			modal: true,
			buttons: {
				Ok: function() {
					$(this).dialog('close');
				}
			}
	});

	$('form').disableOnSubmit('input[type=submit],input[type=button]');
	function runEffectToggleWho(){
		$("#whosgoingto").toggle("blind","",500);
	}
	$("#listpanel").click(function() {
		runEffectToggleWho();
		return false;
	});
	function runEffectToggleComment(){
		$("#addcommenttxtarea").toggle("blind","",500);
	}
	$("#addcomentlink").click(function() {
		runEffectToggleComment();
		return false;
	});
	$("#addmetolist").click(function() {
		runDialogEffect();
		return false;
	});
	$("#removemefromthelist").click(function() {
		runDialogRemoveEffect();
		return false;
	});
	function runEffectToggleOptionsHide(){
		$("#hidenamediv").toggle("blind","",500);
	}
	$("#hidenameoptions").click(function() {
		runEffectToggleOptionsHide();
		return false;
	});
});
	function changeBackground() { 
	//alert('Change Background');
	document.getElementById('whosgoing').style.background="url('img/event/btn_whos_going_hover.gif') no-repeat left bottom";
	}
