/////////////////////////////////////
function AniadirFavoritos() {
 window.external.AddFavorite("http://www.duro-felguera.jp/index.html", "ドウーロ・フェルゲーラ株式会社アジア");
}
/////////////////////////////////////
function Imprimir() {
  window.print();
}
/////////////////////////////////////
function irA(idMenu,idRecurso) {
 if (idRecurso==0) {
  location.href="index.asp";
 } else {
  var direccion="index.asp?MP="+idMenu;
  location.href=direccion;
 }
}

/////////////////////////////////////
function volver() {
 history.back(-1);
}
///////////////////////////////////////////////////////////

function CambiarCSS(accion){

	 var cssAnterior = document.getElementById("cssPortal").href;
	 if (accion == "mas") {
		 switch (cssAnterior) {
		 	case "css/portal/portal.css":
				document.getElementById("cssPortal").href = "css/portal/portal_xl.css";
			break;

			case "css/portal/portal_s.css":
				document.getElementById("cssPortal").href = "css/portal/portal.css";
			break;
		 }
	 }else if (accion == "menos") {
	 	switch (cssAnterior) {
		 	case "css/portal/portal.css":
				document.getElementById("cssPortal").href = "css/portal/portal_s.css";
			break;

		 	case "css/portal/portal_xl.css":
				document.getElementById("cssPortal").href = "css/portal/portal.css";
			break;
		 }
	 }
}
////////////////////////////////////////////////////////////////////////////////

function abrirAsociacion(iAportacion)
{
	windowa = window.open('popup/asociardoc.asp?idAportacion=' + iAportacion,'AsociarImagen','resizable=no, top=80, left=180, width=350, height=150, status=no');
}

////////////////////////////////////////////////////////////////////////////////
function borrarComentario()
{
	document.getElementById("textoAportacion").value = '';
}


/////////////////////////////////////////////////////////////////////////////
function ConsultarEmpresas(sFormulario,iLineaNegocio){ 
    	document.frames.cargardatos.RecargarEmpresas(iLineaNegocio);
	    document.forms[sFormulario].empresa.options[0].text="Cargando datos ..."
	    setTimeout("CargarEmpresas('"+sFormulario+"',0);",500);     
}


function CargarEmpresas(sFormulario, iLineaNegocio){
	
	if (!document.frames["cargardatos"].loaded){
	    setTimeout("CargarEmpresas('"+sFormulario+"', "+iLineaNegocio+")",100);
	    return;
	}
	
    	document.forms[sFormulario].empresa.options[0].text="Cargando datos ..."
    	var oArrayEmpresas = document.frames["cargardatos"].aEmpresas;
      
              document.forms[sFormulario].empresa.options.length=1;      
   
                for(i=0;i<oArrayEmpresas.length;i++){                	
	     	document.forms[sFormulario].empresa.options[i+1] = new Option(oArrayEmpresas[i][1],oArrayEmpresas[i][0]);
	     	if (oArrayEmpresas[i][0] == iLineaNegocio){
	  		document.forms[sFormulario].empresa.options[i+1].selected = true; 
	                }
	}
    	document.forms[sFormulario].empresa.options[0].text="- Seleccione -";           
}



