function pos_ext_search() {
	var ext_search_div=document.getElementById('ext_search');
	ext_search_div.style.left=(document.getElementById('content').offsetLeft+document.getElementById('content').offsetWidth-ext_search_div.offsetWidth)+'px';
	ext_search_div.style.top=(document.getElementById('search').offsetTop-ext_search_div.offsetHeight)+'px';	
}

function show_ext_search() {
	var ext_search_div=document.getElementById('ext_search');
	if (ext_search_div.parentNode.id=='search_form') {
		document.body.appendChild(ext_search_div);
		pos_ext_search();
	} else {
		get_ext_search();
	}
//	Effect.toggle('ext_search', 'slide');

/*
	new Effect.Opacity(
	   'ext_search', { 
	      from: 0.0, 
	      to: 1.0,
	      duration: 1.4
	   }
	);
	*/
}

function show_hide_options(el) {
	var options_el=document.getElementById(el.value+'_options');
	if (el.checked==true) {
		options_el.style.display='block';
		options_el.style.visibility='visible';
	} else {
		options_el.style.display='none';
		options_el.style.visibility='hidden';
	}
	pos_ext_search();
}

function form_submit() {
	get_ext_search();
	/*
	if (document.getElementById('search_word').value=='') {
		alert('Въведете дума за търсене!');
		return false;
	}
	*/
	return true;
}

function get_ext_search() {
	var ext_search_div=document.getElementById('ext_search');
	document.getElementById('search_form').appendChild(ext_search_div);
}

window.onload=function() {
	document.getElementById('logo').style.left=document.getElementById('content').offsetLeft+'px';
	$('logo').setStyle({visibility: 'visible'});
	/*
	new Effect.Opacity(
	   'logo', { 
	      from: 0.0, 
	      to: 1.0,
	      duration: 1.4
	   }
	);
	*/
}
