
//// Funciones de menú:
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function sp_img_superior_menu_DoFSCommand(command, args)
{
	if (command == "mostrarMenu") mostrarMenu(args);
	if (command == "ocultarMenu") ocultarMenu(args);
}


var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function en_img_superior_menu_DoFSCommand(command, args)
{
	if (command == "mostrarMenu") mostrarMenu(args);
	if (command == "ocultarMenu") ocultarMenu(args);
}


function mostrarMenu(menu)
{
	var capa_menu = document.getElementById(menu);
	if (capa_menu != null){
		capa_menu.style.visibility = "visible";
		}
}

function ocultarMenu(menu)
{
	var capa_menu = document.getElementById(menu);
	if (capa_menu != null){
		capa_menu.style.visibility = "hidden";
		}
}

function cambiarIdioma(idioma)
{
	if (idioma == "en"){
		window.location = "en_principal.htm";
		}
	if (idioma == "pg"){
		window.location = "pg_principal.htm";
		}
	if (idioma == "sp"){
		window.location = "sp_principal.htm";
		}
}			  

//// Funciones de ventanas:
function abrirSeccion(seccion, imagen)
{
  var ventana = window.open("imagenes/"+ seccion +"/"+ imagen +".htm", imagen, "status,width=1010,height=700");
  ventana.moveTo(0, 0);
  ventana.focus();
}

function imprimir()
{
	imprimir("sp");
}

function imprimir(idioma)
{
	if (idioma == "sp"){
		var ventana = window.open("http://www.metalurgicaprogreso.com.ar/sp_impresion.htm", "asistente", "scrollbars,width=610,height=450");
		ventana.moveTo(200, 100);
		ventana.focus();
		}

	if (idioma == "en"){
		var ventana = window.open("http://www.metalurgicaprogreso.com.ar/en_impresion.htm", "asistente", "scrollbars,width=610,height=450");
		ventana.moveTo(200, 100);
		ventana.focus();
		}

	if (idioma == "pg"){
		var ventana = window.open("http://www.metalurgicaprogreso.com.ar/pg_impresion.htm", "asistente", "scrollbars,width=610,height=450");
		ventana.moveTo(200, 100);
		ventana.focus();
		}

	if (idioma == "imprimir"){
		window.print();
		}
}


function recomendar(idioma)
{
	if (idioma == "sp"){
		var ventana = window.open("http://www.metalurgicaprogreso.com.ar/sp_recomendar.htm", "recomendar", "status,width=610,height=450");
		ventana.moveTo(200, 100);
		ventana.focus();
		}

	if (idioma == "en"){
		var ventana = window.open("http://www.metalurgicaprogreso.com.ar/en_recomendar.htm", "recomendar", "width=610,height=450");
		ventana.moveTo(200, 100);
		ventana.focus();
		}

	if (idioma == "pg"){
		var ventana = window.open("http://www.metalurgicaprogreso.com.ar/pg_recomendar.htm", "recomendar", "width=610,height=450");
		ventana.moveTo(200, 100);
		ventana.focus();
		}
}


function iniciar()
{
	window.setTimeout(mostrarIcono, 6000);
}

function mostrarIcono(n)
{
	var tabla = document.getElementById("icono_01");
	if (tabla != null){
		tabla.style.display = '';
		}
}

function volver(url)
{
	if (window.opener == null){
		//// No hay opener o no se puede acceder:
		window.location = "http://www.metalurgicaprogreso.com.ar";
		}
	else{
		if (window.opener.closed){
			//// Hay opener pero no se puede acceder:
			window.opener.location = "http://www.metalurgicaprogreso.com.ar";
			}
		else{
			if (url.indexOf("principal") != -1){
				window.opener.location = "../../"+ url +".htm";
				window.close();
				return true;
				}
			if (url.indexOf("vidrio") != -1){
				window.opener.location = "../../../"+ url +".htm";
				window.close();
				return true;
				}
			window.opener.location = "../../../../"+ url +".htm";
			window.close();
			}
		}
}			  
