// JavaScript Document
function popUpavances(URL) 
{
	avances = window.open(URL, 'avances','toolbar=0,scrollbars=1,location=0,statusbar=0 ,menubar=0,resizable=0, width=700,height=500,left = 122,top = 112');
}
function popUpFixture(URL) 
{
	fixture = window.open(URL, 'fixture','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0, width=700,height=350,left = 122,top = 112');
}
function popUpservicios(URL) 
{
	servicios = window.open(URL, 'servicios','toolbar=0,scrollbars=0,location=0,statusbar=0 ,menubar=0,resizable=0, width=650,height=430,left = 122,top = 112');
}
function popUpaccesos(URL) 
{
	mapa = window.open(URL, 'mapa','toolbar=0,scrollbars=0,location=0,statusbar=0 ,menubar=0,resizable=0, width=790,height=431,left = 0,top = 112');
}
function popUpvideo(URL) 
{
	mapa = window.open(URL, 'mapa','toolbar=0,scrollbars=0,location=0,statusbar=0 ,menubar=0,resizable=0, width=340,height=300,left = 122,top = 112');
}
function getObject(obj) 
{ 
	var theObj;  
	if(document.all) 
	{  
		if(typeof obj=="string") 
		{  
		  return document.all(obj);  
		} 
		else 
		{  
		return obj.style;  
		}  
	}  	
	if(document.getElementById) 
	{  
	   if(typeof obj=="string") 
	   {  
	   return document.getElementById(obj);  
	   } 
	   else 
	   {  
	   return obj.style;  
	   }  
	}  
return null; 
} 
function Contar(entrada,salida,texto,caracteres) 
{ 
  var entradaObj=getObject(entrada);  
  var salidaObj=getObject(salida);  
  var longitud=caracteres - entradaObj.value.length;
  if(longitud <= 0) 
  {    
  longitud=0;   
  texto='<span class="disable"> '+texto+' </span>';    
  entradaObj.value=entradaObj.value.substr(0,caracteres);  
  } 
  salidaObj.innerHTML = texto.replace("{CHAR}",longitud);  
}