var menu = new Array(
	["TOP","ALL","69","Página Principal","/"],
	["TOP","ALL","112","Novedades","/novedades.asp"],
	["TOP","ALL","113","Búsqueda","/busquedas.asp"],
	["TOP","ALL","115","Contáctenos","/contacto.asp"],
	["TOP","ALL","113","Artículos","/articulos.asp"],
	["MED","GRU","210","Grupo Energetico Aguaytía","/i_grupo01.htm"],
	["MED","ENE","142","Aguaytía Energy","/i_energy01.htm"],
	["MED","TER","107","Termoselva SRL","/i_term01.htm"],
	["MED","ETE","91","Eteselva SRL","/i_eteselva01.htm"],
	["MED","GAS","115","Gas Integral SRL","/i_gasintegral1.htm"],
	["LOW","GRU","170","Grupo Energetico Aguaytía","/i_grupo01.htm"],
	["LOW","GRU","107","Misión y Visión","/i_grupo02.htm"],
	["LOW","GRU","71","Ubicación","/i_grupo03.htm"],
	["LOW","GRU","135","Clasificación de Riesgo","/i_grupo08.htm"],
	["LOW","GRU","71","Historia","/i_grupo04.htm"],
	["LOW","GRU","152","Relaciones Comunitarias","/i_grupo05.htm"],
	["LOW","GRU","138","Seguridad y Medio Ambiente","/i_grupo07.htm"],
	["LOW","GRU","119","Estados Financieros","/i_grupo_estados.htm"],
	["LOW","ENE","115","Operaciones de gas","/i_energy01.htm"],
	["LOW","ENE","76","Proyectos","/i_energy02.asp"],
	["LOW","ENE","119","Estados Financieros","/i_energy04.htm"],
	["LOW","TER","87","Termoselva","/i_term01.htm"],
	["LOW","TER","76","Proyectos","/i_term04.asp"],
	["LOW","TER","119","Estados Financieros","/i_term05.htm"],	
	["LOW","ETE","119","Estados Financieros","/i_eteselva05.htm"],
	["LOW","ETE","85","Eteselva","/i_eteselva01.htm"],
	["LOW","ETE","138","Líneas de Transmisión","/i_eteselva02.htm"],
	["LOW","ETE","92","Subestaciones","/i_eteselva03.htm"],
	["LOW","ETE","76","Proyectos","/i_eteselva04.asp"],
	["LOW","GAS","138","Gas Integral","/i_gasintegral1.htm"]
	);
	
var header = new Array(
	["GRU","/images/layout/int_log.gif","/images/media/cab_inter"],
	["ETE","/images/layout/int_log_eteselva.gif","images/media/cab_eteselva"],
	["TER","/images/layout/int_log_termo.gif","images/media/cab_termo"],
	["ENE","/images/layout/int_log_energy.gif","images/media/cab_energy"],
	["ALL","/images/layout/int_log.gif","/images/media/cab_inter"],
	["GAS","/images/layout/int_log_gasintegral.gif","images/media/cab_gasintegral"]);
		
function showHeader(grupo){
	if(header.length==0){return;}
	var html="<table width=781 cellpadding=0 cellspacing=0 border=0 style=\"table-layout:fixed;\">";
	html+="<col width=345><col width=436>";
	for(var i=0;i<header.length;i++){
		if(header[i][0]==grupo){
			html+="<tr align=left valign=top>";
			html+="<td align=left valign=top><img src=\""+header[i][1]+"\" border=0></td>";
			html+="<td align=left valign=top>"+getSWF(header[i][2],436,89)+"</td>";
			html+="</tr>";
		}
	}
	html+="</table>";
	if(!document.getElementById("header_div")){document.write("<div id=\"header_div\"></div>");}
	document.getElementById("header_div").innerHTML=html;html=null;
}
function showMenuGrupo(grupo,leftOffset){
	if(grupo==null){return;}if(menu.length==0){return;}if(leftOffset==null){leftOffset=0;}
	if (menu.length==0){return;}
	var thisUrl = document.location.href.toString().toLowerCase();	
		var maxLength=700;var currentLength=leftOffset;var x=-1;
		var html="<div style=\"height:27px;width:100%;text-align:left;padding-left:"+leftOffset+"px;\">";
		for (var i=0;i<menu.length;i++){
			if((menu[i][0]=="LOW")&&(menu[i][1]==grupo)){
				x+=1;currentLength+=parseInt(menu[i][2]);
				if(currentLength>maxLength){
					html+="</div><div style=\"height:27px;width:725px;text-align:left;\">";
					currentLength=parseInt(menu[i][2]);
				}
				if(thisUrl.indexOf(menu[i][4].toString().toLowerCase())!=-1){
					html+="<span onclick=\"gotoPage('"+menu[i][4]+"');\" title=\""+menu[i][3]+"\" id=\"m"+menu[i][1]+x+"\" style=\"background-Position='0px -28px';\" >";
				}else{
					html+="<span onclick=\"gotoPage('"+menu[i][4]+"');\" title=\""+menu[i][3]+"\" id=\"m"+menu[i][1]+x+"\" onmouseover=\"tabActive(this,'1',28,1);\" onmouseout=\"tabActive(this,'0',28,1);\">";
				}
				html+="<img src=\"/images/layout/clearpixel.gif\" border=0 height=26 width=\""+menu[i][2]+"\">";
				html+="</span>";
			}		
		}
		html+="</div>";
		if (!document.getElementById("menugrupo_div")){document.write("<div id=\"menugrupo_div\"></div>");}
		document.getElementById("menugrupo_div").innerHTML=html;html=null;
}
function showMenuTop(index){
	if (menu.length==0){return;}if(index==null){index=-1;}
	var x=-1;
	var html="<div style=\"height:21px;width:781px;text-align:right;padding-rigth:16px;overflow:hidden;background-image:url(/images/layout/back_mtop.gif);\">";
	for (var i=0;i<menu.length;i++){
		if((menu[i][0]=="TOP")&&(menu[i][1]=="ALL")){
			x+=1;
			if(index!=x){
			html+="<span onclick=\"gotoPage('"+menu[i][4]+"');\" title=\""+menu[i][3]+"\" id=\"mtop"+x+"\" onmouseover=\"tabActive(this,'1');\" onmouseout=\"tabActive(this,'0');\">";
			html+="<img src=\"/images/layout/clearpixel.gif\" border=0 height=21 width=\""+menu[i][2]+"\">";
			html+="</span>";}
		}		
	}
	html+="</div>";
	if (!document.getElementById("menutop_div")){document.write("<div id=\"menutop_div\"></div>");}
	document.getElementById("menutop_div").innerHTML=html;html=null;
}
function showMenuMed(){
	if (menu.length==0){return;}
	var x=-1;
	var html="<div style=\"height:26px;width:781px;text-align:right;padding-rigth:16px;overflow:hidden;background-image:url(/images/layout/back_menu.gif);\">";
	for (var i=0;i<menu.length;i++){
		if(menu[i][0]=="MED"){
			x+=1;
			html+="<span onclick=\"gotoPage('"+menu[i][4]+"');\" title=\""+menu[i][3]+"\" id=\"mmedH"+x+"\" onmouseover=\"tabActive(this,'1',26);\" onmouseout=\"tabActive(this,'0',26);\">";
			html+="<img src=\"/images/layout/clearpixel.gif\" border=0 height=26 width=\""+menu[i][2]+"\">";
			html+="</span>";
		}		
	}
	html+="</div>";
	if (!document.getElementById("menumed_div")){document.write("<div id=\"menumed_div\"></div>");}
	document.getElementById("menumed_div").innerHTML=html;html=null;
}
	//["MED","GAS","115","Gas Integral SRL","/i_gasintegral1.htm"],
	function showMenuMedI(){
		if (menu.length==0){return;}
		var x=-1;
		var html="<div style=\"height:25px;width:745px;text-align:left;padding-left:30px;;overflow:hidden;\">";
		for (var i=0;i<menu.length;i++){
			if(menu[i][0]=="MED"){
				x+=1;
				if(esteGrupo==menu[i][1]){
					html+="<span onclick=\"gotoPage('"+menu[i][4]+"');\" title=\""+menu[i][3]+"\" id=\"mmed"+x+"\" style=\"background-Position='0px -27px';\">";
				}else{
					html+="<span onclick=\"gotoPage('"+menu[i][4]+"');\" title=\""+menu[i][3]+"\" id=\"mmed"+x+"\" onmouseover=\"tabActive(this,'1',27,1);\" onmouseout=\"tabActive(this,'0',27,1);\">";
				}
				html+="<img src=\"/images/layout/clearpixel.gif\" border=0 height=26 width=\""+menu[i][2]+"\">";
				html+="</span>";
			}		
		}
		html+="</div>";
		if (!document.getElementById("menumed_div")){document.write("<div id=\"menumed_div\"></div>");}
		document.getElementById("menumed_div").innerHTML=html;html=null;
	}		
function tabActive(obj,accion,offsetOn,offsetOff){
	if(obj.id==thisTab){return;}if(offsetOn==null){offsetOn=21;}if(offsetOff==null){offsetOff=0;}
	if(accion=="1"){obj.style.backgroundPosition="0px -"+offsetOn+"px";}else{obj.style.backgroundPosition="0px -"+offsetOff+"px";}
}
function setTabActive(){
	if(esteGrupo==null){return;}if(esteGrupo==""){return;}
	//if(!document.getElementById(thisTab)){return;}
	//document.getElementById(thisTab).style.backgroundPosition="0px 5px";
}
function showFooter(){
	var html="<div id=footer><div class=container><div id=gotoTop>";
	html+="<a href=\"#top\"><img src=\"/images/layout/b_subir.gif\" title=\"subir...\" border=\"0\" width=\"64\" height=\"30\"></a>";
	html+="</div>";
	html+="<div id=menubajo>";
	html+="----------------------------------------------------------------------------------------------------------------------------<br>";
	html+="| <a href=\"/\">Home</a> ";
	html+="| <a href=\"/i_grupo03.htm\">Grupo Energ&eacute;tico Aguaytia</a> ";
    html+="| <a href=\"/i_energy01.htm\">Aguaytia Energy</a>"; 
    html+="| <a href=\"/i_term01.htm\">Termoselva</a> ";
    html+="| <a href=\"/i_eteselva01.htm\">Eteselva</a>";
    html+="| <a href=\"/i_gasintegral1.htm\">Gas Integral</a> |<br>";
    html+="| <a href=\"/novedades.asp\">Novedades</a> ";
    html+="| <a href=\"/busquedas.asp\">Búsqueda</a> ";
    html+="| <a href=\"/contacto.asp\">Contáctenos</a> ";
    html+="| <a href=\"/articulos.asp\">Artículos</a> |<br>";
	html+="</div></div></div>";
	html+="<div id=terminos>";
	html+="<table width=781 cellpadding=0 cellspacing=0 border=0 style=\"table-layout:fixed;\">";
	html+="<tr valign=top>";
	html+="<td align=left>";
	html+="<a href=\"/terminosdeuso.htm\">Términos y Condiciones de Uso</a>";
	html+="</td>";
	html+="<td align=right>";
	html+="<a href=\"http://www.interzone.net/\" title=\"Este sitio ha sido desarrollado por Interzone SAC\" target=\"_new\"><img src=\"/images/creditos/interzone_log.gif\" border=\"0\"></a>";
	html+="</td>";
	html+="</table>";
	html+="</div>"
	if (!document.getElementById("footer_div")){document.write("<div id=\"footer_div\"></div>");}
	document.getElementById("footer_div").innerHTML=html;html=null;	

}
function gotoPage(destUrl){
	if(destUrl==null){return;}if(destUrl==""){return;}
	document.location.href=destUrl;
}

/*  ********************************************************************************
	Write Flash v.1.0
	********************************************************************************/
	function swfAddExtension(src,ext){if(src.indexOf('?')!=-1){return src.replace(/\?/,ext+'?');}else{return src+ext;}}
	function swfGetObjectR(objAttrs, params, embedAttrs){ 
		var str = '<object ';
		for (var i in objAttrs)
		  str += i + '="' + objAttrs[i] + '" ';
		str += '>';
		for (var i in params)
		  str += '<param name="' + i + '" value="' + params[i] + '" /> ';
		str += '<param name=\"wmode\" value="\transparent\"><embed ';
		for (var i in embedAttrs)
		  str += i + '="' + embedAttrs[i] + '" ';
		str += ' ><param name=\"wmode\" value="\transparent\"></embed></object>';
		return str;
	}
	function swFlRunContent(){
		var ret=swfGetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");
		var str = swfGetObjectR(ret.objAttrs, ret.params, ret.embedAttrs);
		return str;
	}
	function swfSwRunContent(){
	  var ret=swfGetArgs(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);
	  var str = swfGetObjectR(ret.objAttrs, ret.params, ret.embedAttrs);
	  return str;
	}
	function swfGetArgs(args,ext,srcParamName,classid,mimeType){
	  var ret = new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();
	  for (var i=0; i < args.length; i=i+2){
	    var currArg = args[i].toLowerCase();    
	    switch (currArg){	
	      case "classid":
	        break;
	      case "pluginspage":
	        ret.embedAttrs[args[i]] = args[i+1];
	        break;
	      case "src":
	      case "movie":	
	        args[i+1] = swfAddExtension(args[i+1], ext);
	        ret.embedAttrs["src"] = args[i+1];
	        ret.params[srcParamName] = args[i+1];
	        break;
	      case "onafterupdate":
	      case "onbeforeupdate":
	      case "onblur":
	      case "oncellchange":
	      case "onclick":
	      case "ondblClick":
	      case "ondrag":
	      case "ondragend":
	      case "ondragenter":
	      case "ondragleave":
	      case "ondragover":
	      case "ondrop":
	      case "onfinish":
	      case "onfocus":
	      case "onhelp":
	      case "onmousedown":
	      case "onmouseup":
	      case "onmouseover":
	      case "onmousemove":
	      case "onmouseout":
	      case "onkeypress":
	      case "onkeydown":
	      case "onkeyup":
	      case "onload":
	      case "onlosecapture":
	      case "onpropertychange":
	      case "onreadystatechange":
	      case "onrowsdelete":
	      case "onrowenter":
	      case "onrowexit":
	      case "onrowsinserted":
	      case "onstart":
	      case "onscroll":
	      case "onbeforeeditfocus":
	      case "onactivate":
	      case "onbeforedeactivate":
	      case "ondeactivate":
	      case "type":
	      case "codebase":
	        ret.objAttrs[args[i]] = args[i+1];
	        break;
	      case "width":
	      case "height":
	      case "align":
	      case "vspace": 
	      case "hspace":
	      case "class":
	      case "title":
	      case "accesskey":
	      case "name":
	      case "id":
	      case "tabindex":
	        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
	        break;
	      default:
	        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
	    }
	  }
	  ret.objAttrs["classid"] = classid;
	  if (mimeType) ret.embedAttrs["type"] = mimeType;
	  return ret;
	}
	function writeSWF(swf,width,height){
		var html = swFlRunContent(
			"codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0",
			"width",width,
			"height",height,
			"src",swf,
			"quality","high",
			"wmode","transparent",
			"pluginspage","http://www.macromedia.com/go/getflashplayer",
			"movie",swf);
		document.write(html);
		html=null;
	}
	function getSWF(swf,width,height){
		var html = swFlRunContent(
			"codebase","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0",
			"width",width,
			"height",height,
			"src",swf,
			"quality","high",
			"wmode","transparent",
			"pluginspage","http://www.macromedia.com/go/getflashplayer",
			"movie",swf);
		return html;
		html=null;
	}
/*	********************************************************************************/	
function getPageSize(){
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = window.innerWidth + window.scrollMaxX;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		if(document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth; 
		} else {
			windowWidth = self.innerWidth;
		}
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}
	if(xScroll < windowWidth){	
		pageWidth = xScroll;		
	} else {
		pageWidth = windowWidth;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}	
function getPageScroll(){
	var xScroll, yScroll;
	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
		xScroll = self.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
		xScroll = document.documentElement.scrollLeft;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
		xScroll = document.body.scrollLeft;	
	}
	arrayPageScroll = new Array(xScroll,yScroll) 
	return arrayPageScroll;
}	
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}