function chkey(forma) {
	if (forma.qsm.value == '') {
		alert("Escribe un término a buscar.");
		forma.qsm.focus();
		return false;
	}
	var aver = forma.qsm.value;
	aver = aver.replace(/^\s*|\s*$/g,"");
	if (	aver.length < 3	) {
		alert("Favor de escribir término de más de 2 caracteres.");
		forma.qsm.value = aver;
		forma.qsm.focus();
		return false;
	}
	return true;
}


function cajaBuscSup_OnFocus() {
	document.getElementById("cajabusqSup").style.background="#ffffff";
}



function cajaBuscInf_OnFocus() {
	document.getElementById("cajabusqInf").style.background="#ffffff";
}


function hazFavorito(sitioDirec,scriptName,pagina,sitioEspecial) {
	var url;
	var url = sitioDirec+"/"+scriptName+".html";
	if (scriptName == "/") {
		var url = sitioDirec+""+scriptName+"";
	}
	if (scriptName.indexOf("de/")>0) {
		var url = sitioDirec+"/"+scriptName+".html";
	}
	if (scriptName.indexOf("cgi-bin/dw/")>0) {
		var url = sitioDirec+""+scriptName+"";
	}
	var title = pagina+" - " + sitioEspecial + " - Directorio Web.";
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} else {
		if( window.opera && window.print ) {
			var mbm = document.createElement('a');
			mbm.setAttribute('rel','sidebar');
			mbm.setAttribute('href',url);
			mbm.setAttribute('title',title);
			mbm.click();
		} else { 
			if (document.all) {
				window.external.AddFavorite(url,title);
			}
		}
	}
}


//function cambiaImagenes() {
//	var x;
//	x = Math.floor(Math.random()*4)+1 /*entre 1 y 5*/
//	document.getElementById("pendonI").style.backgroundImage = "url(../../../../../../../images/fotos/"+x+"-izq.jpg)";
//	document.getElementById("pendonD").style.backgroundImage = "url(../../../../../../../images/fotos/"+x+"-der.jpg)";
//}



