// JavaScript Document
function IrIdioma(idioma) 
{
	var str = document.location.href;
	
	//SI VOY A ESPANIOL
	if (idioma==1) {		
		pos	 = str.lastIndexOf('/');		
		str2 = str.substring(0,pos);
		str3 = str.substring(pos, str.length);		
		pos2 = str2.lastIndexOf('/');		
		str4 = str.substring(0, pos2);				
		strvoy = str4 + '/esp' + str3;
		document.location.href = strvoy;		
	}
	
	//SI VOY A INGLES	
	if (idioma==2) {		
		pos	 = str.lastIndexOf('/');		
		str2 = str.substring(0,pos);
		str3 = str.substring(pos, str.length);		
		pos2 = str2.lastIndexOf('/');		
		str4 = str.substring(0, pos2);				
		strvoy = str4 + '/eng' + str3;
		document.location.href = strvoy;		
	}
	
	//SI VOY A PORTUGUES
	if (idioma==3) {		
		pos	 = str.lastIndexOf('/');		
		str2 = str.substring(0,pos);
		str3 = str.substring(pos, str.length);		
		pos2 = str2.lastIndexOf('/');		
		str4 = str.substring(0, pos2);				
		strvoy = str4 + '/por' + str3;
		document.location.href = strvoy;		
	}
}