function get_page(address)
{
	var pos = address.lastIndexOf("/")+1;
	var page = address.substring(pos);

	return page;
}

function active_section()
{
	var current_page = get_page(document.location.href);	
	if (current_page=='') current_page = 'index.php';
	
	var links = document.getElementsByTagName('a');
	for (var i=0;i<links.length;i++)
	{
		var enlace = links[i];
		
		if (get_page(enlace.href)==current_page)
		{
			enlace.style.fontWeight="bold"; 
		}
	}
}

function center_window (win,width,heigth)
{
	win.moveTo((screen.width-width)/2,(screen.height-heigth)/2);
}

function openDialog(url,name,width,height){
	 
	win=window.open(url,name,"height="+height+",width="+width+",location=no,menubar=no,resizable=yes,scrollbars=auto,status=no");
	 
	center_window(win,width,height);
	win.focus();
	lastwin = win;
}
 
function validate_url()
{
	window.open("http://validator.w3.org/check?uri="+document.location.href,"validate");	
}

