function searchValidation()
{
	if( document.mainForm.expressao.length > 0 )
	{	
		alert('aweeeeeeeeeeeeeee');
		//document.mainForm.submit();
		return true;
	}
	else
		alert('tem de preencher algo no campo de procura');
}

function selectBrands( select , url )
{
	for( i = 0 ; i < select.length ; i++ )
	{
		if( select.options[ i ].selected )
		{
			window.location = url + select.options[ i ].value;
			return true;
		}
	}
	
	return false;
}

function pop_window(url, _width, _height) 
{
	var popit = window.open(url,'console','nomenubar,notoolbar,nolocation,nodirectories,nostatus,scrollbars=yes,noresizable,width=500,height=500');
}

function selectedOption( select , value )
{
	for( i = 0 ; i < select.length ; i++ )
	{
		if( select.options[ i ].value == value )
		{
			select.options[ i ].selected = true;
			return 1;
		}
	}
}

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("navlist");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
				this.className=this.className.replace
				(" over", "");
				}
			}
		}
		navRoot = document.getElementById("navlist2");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
					document.mainForm.manufacturers_id.style.display='none';
				}
				node.onmouseout=function() {
				
				
				this.className=this.className.replace
				(" over", "");
				if (!dialog_openned) {
					document.mainForm.manufacturers_id.style.display='';
				}
				}
			}
		}
		
	}
}

function changeVideo(newVideo,newTitle)
{
	document.getElementById('container').innerHTML = "<b>" + newTitle + "</b><object width='425' height='350'><br /><param id='parammov' name='movie' value='http://www.youtube.com/v/" + newVideo + "'></param>\n<param name='wmode' value='transparent'></param><br /><embed id='video' src='http://www.youtube.com/v/" + newVideo + "' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'><br /></embed></object>";
}