function collections()
{
	
	var template = $("#template").html();
	var userid = $("#userid").text();

	//var usern = $("#user").val();
	var qstring = "functions/get_coll.php?user=" + userid;
	
	$("#loading").ajaxStart(function(){
		$(this).attr('src', 'pres/img/loading.gif')
	});
	
	$("#loading").ajaxStop(function(){
		$(this).attr('src', 'pres/img/loading_off.gif')
	});

	$.ajax({
	type: "GET",
	url: qstring,
	dataType: "xml",
	success: function(xml) {

		var error = $(xml).find('error').text();
		if (error != '')
		{
		showmessage(error);
		$("#welcome").show;
		}
		if (error == '')
		{
		$('#collections').html("");
		}
		$(xml).find('collection')
			.each(function(){

				var defaultview = $("#defaultview").text();
				var count = $(this).attr("count");
				var name = $(this).find('name').text();
				var colid = $(this).find('id').text();
				var note = $(this).find('note').text();
				var tags = $(this).find('tags').text();
				var icon = $(this).find('icon').text();
				$(".collection:first")
					.clone()
					.appendTo("#collections")
					.attr({title: colid})
					.addClass('collection')
					.addClass(defaultview);
				
				$("div[title=" + colid + "]").find(".name").text(name);
				$("div[title=" + colid + "]").find(".note").html(note);
				$("div[title=" + colid + "]").find(".tags").text(tags);
				$("div[title=" + colid + "]").find(".icon").html(icon);
				$("div[title=" + colid + "]").find(".icon img").css({width:"73px", float:"left", marginRight:"1px", border:"0px"});
				
			}); //close each(
			
					
		}//close success
	}); //close $.ajax(			
}; //close func