
function diasllevan(yr,m,d){

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
 {
 todayy+=1900
 }
var todaym=today.getMonth()
var todayd=today.getDate()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy
var paststring=montharray[m-1]+" "+d+", "+yr
var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1);
document.write (difference)
}

function fecha(){

now = new Date()
if(0 == now.getDay())
document.write("Ibagué, Domingo ")
else if(1 == now.getDay())
document.write("Ibagué, Lunes ")  
else if(2 == now.getDay())
document.write("Ibagué, Martes ")  
else if(3 == now.getDay())
document.write("Ibagué, Miércoles ")  
else if(4 == now.getDay())
document.write("Ibagué, Jueves ") 
else if(5 == now.getDay())
document.write("Ibagué, Viernes ")  
else if(6 == now.getDay())
document.write("Ibagué, Sábado ")  
document.write("  ")  
now = new Date()
document.write(now.getDate())  
now = new Date()
if(0 == now.getMonth())
document.write(" de Enero ") 
else if(1 == now.getMonth())
document.write(" de Febrero ")  
else if(2 == now.getMonth())
document.write(" de Marzo ")  
else if(3 == now.getMonth())
document.write(" de Abril ")
else if(4 == now.getMonth())
document.write(" de Mayo ") 
else if(5 == now.getMonth())
document.write(" de Junio ")
else if(6 == now.getMonth())  
document.write(" de Julio ")
else if(7 == now.getMonth())
document.write(" de Agosto ")
else if(8 == now.getMonth())
document.write(" de Septiembre ")
else if(9 == now.getMonth())
document.write(" de Octubre ")
else if(10 == now.getMonth())
document.write(" de Noviembre ")
else if(11 == now.getMonth())
document.write(" de Diciembre ")
document.write(" de ")
now = new Date()
document.write(now.getYear())
}

function openNewWindow(url, windowName, w, h,img) {

	if(this.which=1){
		win = open(url, windowName,'width='+w+',height='+h+',scrollbars=yes,resizable=yes');
	x = (screen.width/2) - (w/2);
		y = (screen.height/2) - (h/2);
		win.moveTo(x, y);
		win.focus();
		}
	}

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=355,height=290,left = 172,top = 109');");
}

function popUpBig(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=680,height=550,left = 172,top = 109');");
}


var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;
function habilitar_text(op,lay) {
  var x=document.getElementById([op]);
  if (x.options[x.selectedIndex].text=='Entre') {
     showlayer(lay);
  } else {
     hidelayer(lay);
  }
}
function hidelayer(lay) {
  if (ie4) {document.all[lay].style.visibility = "hidden";}
  if (ns4) {document.layers[lay].visibility = "hide";}
  if (ns6) {document.getElementById([lay]).style.display = "none";}
}
function showlayer(lay) {
  if (ie4) {document.all[lay].style.visibility = "visible";}
  if (ns4) {document.layers[lay].visibility = "show";}
  if (ns6) {document.getElementById([lay]).style.display = "block";}
}
