	/**
	 * @author Manuel Gerardo Martinez O.
	 * @version 1.0 WebSite Codifer, Para JV Publicidad
	 * @copyright 2009	 
	 */
	 
var btMn=new Array();
btMn['Home']='Home';
//btMn['Catalogo']='Catalogo';
btMn['Noticias']='Noticias';
btMn['Servicios']='Servicios';
btMn['NuestraE']='NuestraE';
btMn['contact']='contact';

var contenedor='Contenido';
var contC='contC';
var isExplorer = (document.all ? true : false);
function newXMLHttp(){
	/*
	*Creación del objeto XMLHttp
	*/	
	var oXMLHttp = false;
	
	if(typeof XMLHttpRequest != 'undefined'){
		return new XMLHttpRequest();
	}else if (window.ActiveXObject){
		var allVers = ["MSXML2.XMLHttp.5.0","MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0","MSXML2.XMLHttp","Microsoft.XMLHttp"];			
		for (var i = 0; i<allVers.length; i++){
			try{
				var oXMLHttp = new ActiveXObject(allVers[i]);
				return oXMLHttp;
			}catch(err){
					oXMLHttp = false;
				}
		}			
	}
	throw new Error("No fue posible crear el objeto XMLHttp");
}

function nilalaman(){	
	for(key in btMn){		
		obj=document.getElementById(key);		
		if(obj.className=='tabOn'){		
			obj.className='tabOff';			
		}
		if(isExplorer){								
			this.style.top = 161+"px";			
		}else{		
			this.style.top = '154px';
		}
	}

	this.className='tabOn';
	mn=btMn[this.id];	
	
	if(mn=='Home'){
		getIndex();
		}		
	//if(mn == 'Catalogo'){
		//getRequestCtg();
		//}
	if(mn == 'Noticias' ){
		getRequestNews();
		}
	if(mn=='Servicios'){
		getRequestsetSltd();
		}
	if(mn=='NuestraE'){
		getRequestmsv();
		}
	if(mn=='contact'){
		getContact();
		}
}
/******************************************/
function getIndex(){	
					window.location='index.php';
}


/*function getRequestCtg(){		
	var XMLHttp = newXMLHttp();
	XMLHttp.open("GET","catalogo/ctg.php",true);
	XMLHttp.onreadystatechange = function(){
		if(XMLHttp.readyState == 4){
				if(XMLHttp.status == 200){
					displayCustomerInfo(XMLHttp.responseText);					
				}else{
					displayCustomerInfo("Error al ejecutar la petición: " + XMLHttp.statusText);
				}
		}
	};
	XMLHttp.send(null);
}*/


function getRequestmsv(){	
	var XMLHttp = newXMLHttp();
	var is_ie6 = (  
          window.external && typeof window.XMLHttpRequest == "undefined"
		  
     );
	

	XMLHttp.open("GET","Nemp/nemp.php",true);
	XMLHttp.onreadystatechange = function(){
		if(XMLHttp.readyState == 4){
				if(XMLHttp.status == 200){
					displayCustomerInfo(XMLHttp.responseText);					
				}else{
					displayCustomerInfo("Error al ejecutar la petición: " + XMLHttp.statusText);
				}
		}
	};
	XMLHttp.send(null);
}

function getRequestNews(){	
	var XMLHttp = newXMLHttp();
	XMLHttp.open("GET","Noticias/noticias.php",true);
	XMLHttp.onreadystatechange = function(){
		if(XMLHttp.readyState == 4){
				if(XMLHttp.status == 200){
					displayCustomerInfo(XMLHttp.responseText);					
				}else{
					displayCustomerInfo("Error al ejecutar la petición: " + XMLHttp.statusText);
				}
		}
	};
	XMLHttp.send(null);
}

	/*************
	*
	* Ver servicios
	*
	/*************/
	
function getRequestsetSltd(){	
	var XMLHttp = newXMLHttp();
	XMLHttp.open("GET","Servicios/leo.php",true);
	XMLHttp.onreadystatechange = function(){
		if(XMLHttp.readyState == 4){
				if(XMLHttp.status == 200){
					displayCustomerInfo(XMLHttp.responseText);					
				}else{
					displayCustomerInfo("Error al ejecutar la petición: " + XMLHttp.statusText);
				}
		}
	};
	XMLHttp.send(null);
}	
	/*function setSltd(){		
		top.frames["aavv"].location = "Servicios/leo.php";
	}
	//Fin Ver Servicios*/


	function getContact(){
		top.frames["aavv"].location = "Servicios/srv.php?lang=en";
	}

///////////////////////////////////////////////////////////////////////////////////////////




function mIn(){	
	if(this.className!='tabOn'){
		this.className='tabHover';		
		
		//rePosTop(this,154,2);
		if(isExplorer){								
				this.style.top = 161+"px";			
		}else{		
			this.style.top = '154px';
		}
	}
}

function mOut(){
	if(this.className!='tabOn')	{
		this.className='tabOff';
		//rePosTop(this,145,1);
		
		if(isExplorer){								
				this.style.top = 161+"px";			
		}else{			
			this.style.top = '154px';
		}
	}
}

function rePosTop(Object,posFin,inc){	
	if(parseInt(Object.style.top) < posFin){		
		Object.style.top = (parseInt(Object.style.top)+inc)+'px';
		  setTimeout(function() {rePosTop(Object,posFin, 1);}, 30);
	}	
}

function iniMn(){			
		if(!isExplorer){
			obj=document.getElementById('results');		
			obj.style.top = 175+"px";
			obj.style.left = 120+"px";
		}
	for(key in btMn){
	
		elemento=document.getElementById(key);		
			
		if(isExplorer){				
				elemento=document.getElementById(key);		
				elemento.style.top = 161+"px";	
				
				objmn = document.getElementById('dmn');
				objmn.style.background = 'none';
		}	
		elemento.onclick=nilalaman;	
		elemento.onmouseover=mIn;
		elemento.onmouseout=mOut;
		
	}

	tabContenedor=document.getElementById(contenedor);
	tabContCentro=document.getElementById(contC);	
}