function selectUserDenovios()
{
	document.formulario.next.disabled = true;
	location.href = "/index.php/frontendagent?stage=2&index="+document.getElementById('IDDENOVICOU').value ;
}


function selectDestination()
{	
	if ( document.homedestination.destination[document.homedestination.destination.selectedIndex].value != '-' && document.homedestination.destination[document.homedestination.destination.selectedIndex].value != ''  )
	{
		location.href = "/destino/"+document.homedestination.destination[document.homedestination.destination.selectedIndex].value;
		return false;
	}
	else
	{
		alert("Debe selecionar un destino");
		return false;
	}
	
}

function sharetofacebook()
{
	javascript:window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent( location.href )+'&t='+encodeURIComponent( document.title ),'sharer','toolbar=0,status=0,width=626,height=436');	
}


function quoteActivitie( act  )
{
	//parent.location.href = "http://www.travelite.cl/arma-tu-viaje.html?index=" + act;
	if ( window.opener != null  )
		window.opener.location.href = "http://www.travelite.cl/arma-tu-viaje.html?index=" + act;
	else
		document.location.href = "http://www.travelite.cl/arma-tu-viaje.html?index=" + act;
	setTimeout("window.close();",250);
}



$(document).ready(function()
{
	// Inicio
	var inicioRE = /inicio*/;			
	var parejasRE = /parejas*/;			
	var registroRE = /clients_register*/;
	var armaViajeRE = /arma-tu-viaje*/;	
	var agenteRE = /frontendagent*/;
	var datosRE = /datos-utiles*/;
	
	
	
	url = document.location.href.split("/");			
	
	if (inicioRE.test(document.location.href) || url[3] == "" )
		document.getElementById("main_menu_inicio").className = document.getElementById("main_menu_inicio").className + ' current';		
	if (parejasRE.test(document.location.href)  )
		document.getElementById("main_menu_buscador_de_parejas").className = document.getElementById("main_menu_buscador_de_parejas").className + ' current';
	if (registroRE.test(document.location.href))
		document.getElementById("main_menu_registro").className = document.getElementById("main_menu_registro").className + ' current';		
	if (armaViajeRE.test(document.location.href)  )
		document.getElementById("main_menu_arma_tu_viaje").className = document.getElementById("main_menu_arma_tu_viaje").className + ' current';
	if (agenteRE.test(document.location.href)  )
		document.getElementById("main_menu_agente").className = document.getElementById("main_menu_agente").className + ' current';
	if (datosRE.test(document.location.href)  )
		document.getElementById("main_menu_datos_utiles").className = document.getElementById("main_menu_datos_utiles").className + ' current';		
	
	
});

