function delete_item(url, query, confirm_message)
	{
	if (confirm(confirm_message))
		{
		window.location=url+query;
		}

	return false;
	}

function pop_up(URL, popup_width, popup_height) 
	{

	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width='+popup_width+',height='+popup_height+'');");
	}

function toggle_tattoo(use)
	{
	if ($F(use)=='Yes')
		{
		return $('tattoos').show();
		}

	$('tattoos').hide();
	}

function toggle_state()
	{
	if ($F($('country'))=='United States')
		{
		$('state').show();
		$('no_state').hide();
		}
	else
		{
		$('state').hide();
		$('no_state').show();
		}
	}

function toggle_interested_models(use)
	{
	if ($F(use)=='Yes')
		{
		return $('interested_model_website').show();
		}

	$('interested_model_website').hide();
	}

function change_status(use, shoot_id)
	{
	var use_status=$F(use);

	new Ajax.Request('index.php', {
	evalScripts: true,
	method: 'POST',
	parameters: 'task=preferences&status='+use_status+'&shoot_id='+shoot_id
	, onSuccess: function (t) 
		{ 
		window.location="index.php?task=preferences"; 
		}
	});
	}

function change_accept(use, model_id, photog_id)
	{
	var accepted=$F(use);

	new Ajax.Request('index.php', {
	evalScripts: true,
	method: 'POST',
	parameters: 'task=preferences&accepted='+accepted+'&model_id='+model_id+'&photog_id='+photog_id
	, onSuccess: function (t) 
		{ 
		window.location="index.php?task=preferences"; 
		}
	});
	}

function toggle_tabs(tab, hide_errors)
	{
	$('home').hide();
	$('refer_models').hide();
	$('shipping').hide();
	$('upload_images').hide();
	$('contact').hide();
	if (hide_errors&&$$('div.error_wrapper')[0]) 
		{ 
		$$('div.error_wrapper')[0].remove(); 
		}

	$(tab).show();
	}