function add_watch(partlistingid)
{
	var url = PATH_BASE+'/watches/add/'+partlistingid+'/';
	GB_show('Add to watches', url, 50, 400, watch_done);
}

function delete_watch(partlistingid)
{
	var url = PATH_BASE+'/watches/delete/'+partlistingid+'/';
	GB_show('Remove from watches', url, 50, 400, watch_done);
}

function watch_done()
{
	window.location.reload(true);
}

function contactseller(userid, partlistingid, sellerid)
{
	var url = PATH_BASE+'/messages/create/'+sellerid+'/'+partlistingid+'/';
	GB_show('Contact Seller', url, 420, 340, null, null, message_load);
}

function setimage(imagename)
{
	$('.main-image img').attr('src', imagename);
}

function remove_listing(partlistingid)
{
	var rm = confirm('Are you sure you want to remove this listing?');
	
	if (rm)
	{
	    var url = PATH_BASE+'listings/delete/'+partlistingid+'/';
		window.location = url;
	}
}

function sendtofriend(listingId) {
	var url = PATH_BASE+'/messages/create/'+partlistingid+'/';
	GB_show('Contact Seller', url, 420, 340, null, null, message_load);
}