function delete_item( item_code, item_id )
{	
	var url; var msgN; var msg; msgN = 1; //default message
	if (item_code == "note") { url = "admin/delete_note_script.php?note_id="; }
	if (item_code == "link") { url = "admin/delete_link_script.php?link_id="; }
	if (item_code == "Job Type") { url = "admin/delete_type_script.php?id="; }
	if (item_code == "City") { url = "admin/delete_city_script.php?id="; msgN = 2; }
	if (item_code == "Area") { url = "admin/delete_area_script.php?id="; }
	if (item_code == "Listing") { url = "admin/delete_listing_script.php?id="; }
	if (item_code == "Inactive Listing") { url = "admin/delete_listing_script.php?status=0&id="; }
	if (item_code == "Content Page") { url = "admin/delete_content_script.php?content_name="; }
	if (item_code == "Blue Text") { url = "admin/delete_blue_text_script.php?bt_id="; }
	if (item_code == "Shelf Filler Text") { url = "admin/delete_shelf_filler_text_script.php?sf_id="; }
	if (item_code == "listing_join_candidates_list") { msgN = 3; }
	if (item_code == "subscription") { msgN = 4; }

	msg = "Are you sure you want to delete this " + item_code + "?";
	if (msgN == 2) { msg += "\nNote: This will also remove all underlying areas."; }
	if (msgN == 3) 
	{
		msg = "Are you sure you want to delete this listing?";
		url = "scripts/remove_listing.php?return=join_candidates_list&listing_id="
	}

	if (msgN == 4) 
	{
		msg = "Are you sure you want to unregister?";
		url = "scripts/unregister.php?user_id="
	}

	var ask = confirm( msg );
	if (ask) { window.location.href = "http://www.bsgworks.com/" + url + item_id; }
}
