/* Juntamos archivos abc.js cabecera.js  thickbox.js vcookie.js   */


/* abc.js   */
// Documento JavaScript
var browserName=navigator.appName;

function ImprimirArticulo() {
	window.print();
}

function menuactivo() {
	objMenu.className = "activo";
	if (browserName=="Konqueror") { 
	}
	else { 
		objMenu.innerHTML += "<span id='soml'></span><span id='somr'></span><span id='somlb'></span><span id='somrb'></span>";
	}
}
function submenuactivo() {
	objSubmenu.className = "activo";
	objSubmenu.innerHTML += "<span id='somsubl'></span><span id='somsubr'></span>";
}
function mnbgColor(menunavbgcolor) {
	colordefondodelmenu = "menunav" + " " + menunavbgcolor;
	document.getElementById('mnbgcolor').className = colordefondodelmenu;
}

function textomenor() {
	var clase = document.getElementById('articulo').className;
	
	switch (clase) {
		case 'txtmenos1':
		case 'txtmenos2':
				document.getElementById('articulo').className = 'txtmenos2';
				break;
		case 'txtmas1':
				document.getElementById('articulo').className = '';
				break;
		case 'txtmas2':
				document.getElementById('articulo').className = 'txtmas1';
				break;
		default:
			document.getElementById('articulo').className = 'txtmenos1';
			break;
				
	}
	//document.getElementById('articulo').className = 'txtmenos1';
}

function textomayor() {
	var clase = document.getElementById('articulo').className;
	
	switch (clase) {
		case 'txtmenos1':
				document.getElementById('articulo').className = '';
				break;
		case 'txtmenos2':
				document.getElementById('articulo').className = 'txtmenos1';
				break;
		case 'txtmas1':
		case 'txtmas2':
				document.getElementById('articulo').className = 'txtmas2';
				break;
		default:
			document.getElementById('articulo').className = 'txtmas1';
			break;
				
	}
	
	//document.getElementById('articulo').className = 'txtmas1';
}


function enviarticulo() {
	cerrarRectificarNoticia();
	document.getElementById('envialanoticia').style.display = 'block';
	document.getElementById('ops-enviar').className = 'activo';
}

function cerrarEnviarNoticia() {
	document.getElementById('envialanoticia').style.display = 'none';
	document.getElementById('ops-enviar').className = '';

}


function rectificarticulo() {
	cerrarEnviarNoticia();
	document.getElementById('rectificalanoticia').style.display = 'block';
	document.getElementById('ops-rectificar').className = 'activo';
}

function cerrarRectificarNoticia() {
	document.getElementById('rectificalanoticia').style.display = 'none';
	document.getElementById('ops-rectificar').className = '';
}

function FNhover() {
	document.getElementById('doczonasensible').className = 'verFN';
}
function FNout() {
	document.getElementById('doczonasensible').className = '';
}

function presentaMW() {
	/*document.getElementById('carga1_mapaweb').style.display = 'block';
	document.getElementById('carga2_mapaweb').style.display = 'block';
	codigodelmapa = document.getElementById('carga1_mapaweb').outerHTML;
	document.getElementById('carga2_mapaweb').innerHTML = codigodelmapa;
	document.getElementById('carga1_mapaweb').style.display = 'none';*/
	document.getElementById('carga1_mapaweb').style.display = 'block';
   eval('var objOrigen = document.getElementById ? document.getElementById("carga1_mapaweb") : document.all.carga1_mapaweb;');
   eval('var objDestino = document.getElementById ? document.getElementById("carga2_mapaweb") : document.all.carga2_mapaweb;');
    objDestino.appendChild(objOrigen);
	document.getElementById('pie-mapa').className= 'activo';
    }

function cerrarMW() {
	//document.getElementById('carga2_mapaweb').style.display = 'none';
	document.getElementById('carga1_mapaweb').style.display = 'none';
	document.getElementById('pie-mapa').className= '';
}

function abrebloqueMN2() {
	//document.getElementById('carga2_mapaweb').style.display = 'none';
	document.getElementById('mn2-mas-h2').className ='mn2-mas-h2-activo';
	document.getElementById('cajamn2').style.display= 'block';
}
function cierrabloqueMN2() {
	document.getElementById('mn2-mas-h2').className ='mn2-mas-h2';
	document.getElementById('cajamn2').style.display= 'none';
}



/*  cabecera.js    */
function menu(id) {
	if(objMenu = document.getElementById('mn-' + id)) {
		objMenu.className = "activo";
		if (browserName=="Konqueror") { 
		}
		else {
			objMenu.innerHTML += "<span id='soml'></span><span id='somr'></span><span id='somlb'></span><span id='somrb'></span>";
		}
	}
}

function submenu(id) {
	if(objSubmenu = document.getElementById('mn2-' + id)) {
		objSubmenu.className = "activo";
		objSubmenu.innerHTML += "<span id='somsubl'></span><span id='somsubr'></span>";
	}
}


/*  thickbox.js  */



/* vcookie.js   */

function URLEncode2(textobusq)
{	
var today = new Date();var day   = today.getDate();var month = today.getMonth()+1;var year  = today.getYear();var dia = today.getDay();
if (year < 1000) {year += 1900; }
if (month < 10) month = "0" + month;
if (day< 10) day = "0" + day;
var fechabusq2= ""+day+""+month+""+year;
	var SAFECHARS = "0123456789" +					
					"ABCDEFGHIJKLMNOPQRSTUVWXYZ" +	
					"abcdefghijklmnopqrstuvwxyz" +
					"-_.!~*'()";					
	var HEX = "0123456789ABCDEF";
	var plaintext = textobusq;
	var encoded = "";
	for (var i = 0; i < plaintext.length; i++ ) {
		var ch = plaintext.charAt(i);
	    if (ch == " ") {
		    encoded += "+";			
		} else if (SAFECHARS.indexOf(ch) != -1) {
		    encoded += ch;
		} else {
		    var charCode = ch.charCodeAt(0);
			if (charCode > 255) {
				encoded += "+";
			} else {
				encoded += "%";
				encoded += HEX.charAt((charCode >> 4) & 0xF);
				encoded += HEX.charAt(charCode & 0xF);
			}
		}
	} 
	document.buscadorcob.action = document.buscadorcob.action+fechabusq2+"/CRON,+,"+encoded+",+,+,+.html";
	return false;
};
function borrtexto2(){document.buscadorcob.searchText.value="";}
function valiBusc2(){var today = new Date();var day   = today.getDate();var month = today.getMonth()+1;var year  = today.getYear();var dia = today.getDay();
if (year < 1000) {year += 1900; }
if (month < 10) month = "0" + month;
if (day< 10) day = "0" + day;
var fechabusq= ""+day+""+month+""+year;
document.buscadorcob.Dia.value = fechabusq;
document.buscadorcob.q.value = document.buscadorcob.searchText.value;
URLEncode2(document.buscadorcob.searchText.value);}
function dasabilitarenter2() {var tecla = event.keyCode;
if ((tecla == 13)) { valiBusc2();
return true;
}
return tecla;}

