var layout_selector_targer_id;


function show_layout_selector(mode)
{
	if (mode == 1) layout_selector_targer_id = 'premade_layout_id'
	if (mode == 2) layout_selector_targer_id = 'based_on_premade_layout_id'
	
	$('layout_selector').show()
}


function select_layout(n)
{
	$('input_' + layout_selector_targer_id).value = n
	$('current_' + layout_selector_targer_id).src = '/images/skins/layout/' + n + '.jpg'
	$('layout_selector').hide()
}


function switch_project(li) 
{
	var op = li.options[li.selectedIndex];
	var a = $(li).parents('tr').find('a').get(0); 
	a.href = '/member/switch_project/' + op.getAttribute('tag')
}
