 function dialogDelete(path){
	$("#dialogDelete").dialog("destroy");
	$("#dialogDelete").dialog({ 
	    modal: true,
	    overlay: { 
	        opacity: 0.2, 
	        background: "shadow" 
	    },
		title: "Warning",
		buttons: { 
        "Ok": function() { 
            $(this).dialog("close");
            window.location=path;
        }, 
        "Cancel": function() { 
        	$("#dialogDelete").dialog("destroy");
        } 
    }
});
}

 function dialogMsg(msg, Title){
		$("#dialog").dialog("destroy");
		$("#dialog_left").html('<img src="/style/site_images/'+Title+'.jpg" border="0" width="100px"/>');
		$("#dialog_right").html(msg);
		$("#dialog").dialog({ 
	    modal: true,
	    width: 350,
	    height: 240,
	    zIndex:50000,
	    overlay: { 
	        opacity: 0.9, 
	        background: "shadow" 
	    },
			title: Title,
			buttons: { 
	        "Close": function() { 
	    	$("#dialog").dialog("destroy");					
	        } 
	    }
	});
}

 function dialogAddUser(path, UserID, user){

		var msg = user + ' will have to confirm that you are colleagues.';
		$("#add_user").dialog("destroy");
		$("#dialog_left_add_user").html('<img src="/image/index/users_id/'+UserID+'" border="0"/>');
		$("#dialog_right_add_user").html(msg);		
		$("#add_user").dialog({
		    modal: true,
		    overlay: {
		        opacity: 0.2, 
		        background: "shadow" 
		    },
			title: "Add " + user + ' as a colleague?',
			buttons: { 
	        "Ok": function() { 
	            $(this).dialog("close");
	            window.location=path;
	        }, 
	        "Cancel": function() {
	            $(this).dialog("close");
	        } 
	    }
	});
}

function dialogElement(elementId, Title){
	$("#" + elementId).dialog("destroy");
	$("#" + elementId).dialog({ 
	    modal: true,
	    width: 500,
	    zIndex:50000,
	    overlay: { 
	        opacity: 0.9, 
	        background: "shadow" 
	    },
			title: Title,
			buttons: { 
	        "Close": function() { 
	    		$("#" + elementId).dialog("destroy");					
	        } 
	    }
	});
}


