function getDate() {
// Get today's current date.
var now = new Date();

// Array list of days.
var days = new Array('Domingo','Lunes','Martes','Mi&eacute;rcoles','Jueves','Viernes','Sabado');

// Array list of months.
var months = new Array('Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Sept','Octubre','Noviembre','Diciembre');

// Calculate the number of the current day in the week.
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

// Calculate four digit year.
function fourdigits(number)	{
	return (number < 1000) ? number + 1900 : number;
								}

// Join it all together
//today =  days[now.getDay()] + " " + date + " de " +         months[now.getMonth()] + " de " + (fourdigits(now.getYear())) ;
today =  days[now.getDay()] + " " + date + " " +         months[now.getMonth()] + " " + (fourdigits(now.getYear())) ;

// Print out the data.
document.write(today);

//  End -->
}

function NewWindow(mypage, args, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+scroll;

	mypage += escape(args);
	
	win = window.open(mypage, myname, winprops);	
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus();
	 }
	
}

// Radio Button Validation
function valButton(btn) {
var cnt = -1;
for (var i=btn.length-1; i > -1; i--) {
   if (btn[i].checked) {cnt = i; i = -1;}
   }
if (cnt > -1) return btn[cnt].value;
else return null;
}


function searchForm(form) {
    form.action='http://www.primerahora.com/XStatic/primerahora/template/busqueda.aspx';
	form.submit();
}

function buscarForm(form) {
    form.action='busqueda.aspx';
	form.submit();
}


function triviaForm(form) {
var btn = valButton(form.RadioTrivia);
if (btn == null) 
alert('Seleccione una respuesta.');
else {
	  NewWindow('../template/triviapopup.aspx?intTriviaId=' + form.tv.value + '&intAnswerId=' + btn,'','winTrivia','580','300','yes');
	}
}

function voteForm(form) {
var btn = valButton(form.RadioSondeo);
if (btn == null) 
alert('Seleccione una respuesta.');
else {
    form.action='../template/sondeo.aspx';
	form.submit();
	}
}

	function selectColumnista(combo){ //v3.0
				document.location.href='indexcolumna.aspx?co=' + combo.options[combo.selectedIndex].value;
			}		

function tv(form) {	
		parent.document.location.href='../template/tv.aspx?zipcode=' + form.zipcode.value;
}

function cine(form) {	
		parent.document.location.href='../template/cine.aspx?zipcode=' + form.zipcode.value;
}

function MM_jumpParent(selObj,restore){ //v3.0
	parent.location.href= selObj.options[selObj.selectedIndex].value;
	if (restore) selObj.selectedIndex=0;
}	