
function BrowserCheck() {
	var b = navigator.appName
	var agente=(navigator.userAgent);
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.platf = navigator.platform.toUpperCase()
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ns6 = (this.b=="ns" && this.v==6)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.ie6 = (this.version.indexOf('MSIE 6')>0)
	this.linux = (this.platf.indexOf('LINUX')>0)
	this.win = (this.platf.indexOf('WIN')>0)
	this.mac = (this.platf.indexOf('MAC')>0)
	this.konqueror = (agente.indexOf('Konqueror')>0);
	this.firefox = (agente.indexOf('Firefox')>0);
	this.galeon = (agente.indexOf('Galeon')>0);
	this.min = (this.ns||this.ie)
	this.comp = (this.ns5||this.ns6||this.ie5||this.ie6||this.konqueror||this.firefox||this.galeon||this.mac)
}
is = new BrowserCheck()

function openSubmenu(a)
{
	var subm = a.parentNode.getElementsByTagName("UL")[0];
		subm.style.display = (subm.style.display == "block") ? "none" : "block";
	a.parentNode.className = (subm.style.display == "block") ? "submenu" : "";
}

function javascript_css(quin){
	if(!is.ie6){
		document.write("<link rel= \"stylesheet\" type=\"text/css\" media=\"all\" href=\""+quin+"\" />");
	}
	else{
		document.write("<link rel= \"stylesheet\" type=\"text/css\" media=\"all\" href=\"css/javascript_ie6.css\" />");
	}
}
function goregion(){
	document.location=document.getElementById("region").value;
}

visSitemap=false;
function showsitemap(){
	sitemapobj=document.getElementById("sitemap")
	if(visSitemap) sitemapobj.style.display="none";
	else sitemapobj.style.display="block";
	visSitemap=!visSitemap;
}

function ShowF(id){
	document.getElementById(id).style.display="block";
}
function HideF(id){
	document.getElementById(id).style.display="none";
}

function findtr()
{
 tabla_busqueda=document.getElementById("tabla_busqueda");
 tata=tabla_busqueda.getElementsByTagName('tbody');
 for(i=0;i<tata.length;i++){
 	trs=tata[i].getElementsByTagName("tr");
	for(j=0;j<trs.length;j++){
	   trs[j].onmouseover=function(){roll(this);};
	   trs[j].onmouseout=function(){unroll(this);};
	   trs[j].onclick=function(){gourl(this)};
    }
 }
}
function findtd(){

}

function roll(quina){
	quina.style.backgroundColor="#EEEEEE";
}
function unroll(quina){
	quina.style.backgroundColor="#FFFFFF";
}
function gourl(quina){
	enlace='';
	links=quina.getElementsByTagName("a");
	if(links.length>0){
		enlace=links[links.length-1].getAttribute("href"); 
	}
	if(enlace!='') document.location=enlace;
	return false;
}

//window.onload = findtr