
function show_big_img(file, height)
{
	if(!height) height=580;
	var width=560;
	var left=180;
	var top=100;

	wopener = window.open($('server_www').value+'image/detail/?image='+file, 'image', 'toolbar=0,location=0,status=1,resizable=1,scrollbars=0,width='+ width +',height='+ height +',top='+ top +',left='+ left);
	wopener.focus();
	
	return wopener;	
}

function SubmenuAction(show, id)
{
	if(show)
	{
		$('submenu_' + id).style.zIndex = '100';
		$('submenu_' + id).style.display = 'block';
	}
	else
	{
		$('submenu_' + id).style.zIndex = '10';
		$('submenu_' + id).style.display = 'none';
	}
}

var search_first_focus = 1;
function focusSearch(type)
{
	if (!type) type='';
	else type+='_';

	if(($(type+'search_word').value == 'search' || $(type+'search_word').value == 'search in channels'))
	{
		$(type+'search_word').value = '';
		if (!type) search_first_focus = 0;
	}
}

function chatMouseOver(obj, over)
{
	if(over == 1)
		obj.style.backgroundColor = '#ffe3d3';
	else if(over == 2)
		obj.style.backgroundColor = '#d3f3ff';
	else
		obj.style.backgroundColor = 'transparent';
}

function buttonMouseOver(obj, over)
{

	if(over == 1)
		obj.className = 'submit_button_on';
	else
	{
		obj.className = 'submit_button';
	}
}

function ImageBorder(obj, show)
{
	if(show)
		obj.style.border = '1px solid #ff6f1d';
	else
		obj.style.border = '1px solid gray';
}

function inputFocus(obj, on)
{
	if(on)
		obj.style.border = '1px solid #c7642b';
	else
		obj.style.border = '1px solid #808080';
}

function regType(type)
{
	if(type == 'company')
	{
		$('reg_type_person').style.color = '#8e8e8e';
		$('reg_type_company').style.color = '#ff6600';
		$('register_company').style.display = 'block';
		$('reg_type').value = 'company';
	}
	else
	{
		$('reg_type_person').style.color = '#ff6600';
		$('reg_type_company').style.color = '#8e8e8e';
		$('register_company').style.display = 'none';
		$('reg_type').value = 'person';
	}
}

