// JavaScript Document
function ocultarLayer(name) {
	//alert("mostrar");
	refLayer(name).visibility = "hidden";
	return true;
	}

// Definir una funcion para mostrar Layers
function mostrarLayer(name) {
	//alert("ocultar");
	refLayer(name).visibility = "visible";
	return true;
	}

// Definir una funcion para referenciar Layers
function refLayer(name) {
       return eval('document.getElementById("' + name + '").style');
}

function Get_xajax_functions(action,target,filepath,f){
    if(mostrarLayer('PreLoad') == true){
		xajax_SH_Loading('visible');
		if(action == "Ini"){
			xajax_Charger_MainDiv(9);
			
			xajax_Get_Str_File('articulo_div','http://www.ccparaguay.com.py/v4/agenda.php');
			xajax_Get_Str_File('cotizaciones_div','http://www.ccparaguay.com.py/v4/cotizaciones.php');
			xajax_Get_Str_File('news_div','http://www.ccparaguay.com.py/v4/news.php');
			//xajax_Get_Str_File('enlaces_div','http://www.ccparaguay.com.py/v4/pages/enlaces.php');
	    }else if(action == "Q_S"){
			xajax_Charger_MainDiv(10);
		}else if(action == "H"){
		 	xajax_Charger_MainDiv(3);
		}else if(action == "M_V"){
			xajax_Charger_MainDiv(1);
		}else if(action == "E_D"){
			xajax_Charger_MainDiv(2);
		}else if(action == "Camp"){
			xajax_Charger_MainDiv(6);
		}else if(action == "InfoPyme"){
			xajax_Charger_MainDiv(7);
		}else if(action == "CDO"){
			xajax_Charger_MainDiv(5);
		}else if(action == "Ini_Eve"){
			xajax_Charger_MainDiv(11);
			xajax_Get_Str_File('calendar_div','http://www.ccparaguay.com.py/v4/calendario.php');
			xajax_Get_Str_File('news_event_div','http://www.ccparaguay.com.py/v4/news_events.php');
		}else if(action == "Charger_File"){
			xajax_Get_Str_File(target,filepath);
		}else if(action == "Submit"){
			submitForm(f,target,filepath);
		}
	}
	return true;
}

function Acction(action,target,filepath,f){
	if(Get_xajax_functions(action,target,filepath,f) == true){
		//alert(Get_xajax_functions(action,target,filepath));
		ocultarLayer('PreLoad');
		xajax_SH_Loading('hidden');
	}
}
