function model_archive(use, use_id)
	{
	var use_status=$F(use);

	new Ajax.Request('index.php', {
	method: 'POST',
	parameters: 'task=model_edit&archive='+use_status+'&ajax_mode=y&model_id='+use_id
	, onSuccess: function (t) { alert('The model was updated successfully!'); }
	});
	}


// toggles button backgrounds
function h(which) 
	{ 
	which.style.backgroundColor="#e0e2e6"; 
	}

function l(which) { which.style.backgroundColor="#FAFAFA"; }


function photo_queue(img_type, img_name)
	{
	$(img_type).value=img_name;
	}

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

	return false;
	}

function follow_option(use)
	{
	if (use.value!='') 
		{
		window.location=use.value;
		}
	}

function process_next(contestant_id, round_id, photo_id)
	{
	new Ajax.Updater('update_container', 'index.php?c=contestant_lightbox&lbm=1&contestant_id='+contestant_id+'&round_id='+round_id+'&photo_id='+photo_id, {
	evalScripts: true,
	method: 'POST'
	});
	}

function countdown(round_id)
	{
	new Ajax.PeriodicalUpdater('countdown', 'index.php?c=countdown&ajax_mode=1&round_id='+round_id, {asynchronous:true, frequency:60,
	evalScripts: true,
	method: 'POST'
	});
	}

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+'');");
	}