function setActiveStyleSheet(title) {
	var i, a, main;
	for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
		if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
			a.disabled = true;
			if(a.getAttribute("title") == title) a.disabled = false;
		}
	}
}
function detecta(){	
	var izq = "";
	var der = "";
	izq = '<table align="right" id="izq" width="108" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">';
	izq +='	<tr>';
	izq +='		<td align="right" height="20" valign="top"><img src="http://bajio.delasalle.edu.mx/web3/contenidos/images/template_01a.jpg" alt=""></td>';
	izq +='	</tr>';
	izq +='	<tr>';
	izq +='		<td height="78"></td>';
	izq +='	</tr>';
	izq +='	<tr>';
	izq +='		<td height="9"></td>';
	izq +='	</tr>';
	izq +='	<tr>';
	izq +='		<td height="31"></td>';
	izq +='	</tr>';
	izq +='	<tr>';
	izq +='		<td height="2" bgcolor="#D4D2D3"></td>';
	izq +='	</tr>';
	izq +='	<tr>';
	izq +='		<td height="32"></td>';
	izq +='	</tr>';
	izq +='	<tr>';
	izq +='		<td height="100%" valign="top"><table width="100%" height="24" border="0" cellpadding="0" cellspacing="0">';
	izq +='				<tr>';
	izq +='					<td bgcolor="#EEEEEE"></td>';
	izq +='				</tr>';
	izq +='			</table></td>';
	izq +='	</tr>';
	izq +='	<tr>';
	izq +='		<td height="*"></td>';
	izq +='	</tr>';
	izq +='	<tr>';
	izq +='		<td height="24" valign="bottom"><img src="http://bajio.delasalle.edu.mx/web3/contenidos/images/template_35.jpg" width="108" height="24" alt=""></td>';
	izq +='	</tr>';
	izq +='	<tr>';
	izq +='		<td height="24" bgcolor="#C0C3CA"></td>';
	izq +='	</tr>';
	izq +='</table>';
	
	der = '<table align="left" id="der" width="92" height="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">';
	der +='	<tr>';
	der +='		<td align="left" height="98" width="92"><img src="http://bajio.delasalle.edu.mx/web3/contenidos/images/template_04a.jpg" alt=""></td>';
	der +='	</tr>';
	der +='	<tr>';
	der +='		<td height="9"></td>';
	der +='	</tr>';
	der +='	<tr>';
	der +='		<td height="31"></td>';
	der +='	</tr>';
	der +='	<tr>';
	der +='		<td width="280" height="9" bgcolor="#E7AA35"></td>';
	der +='	</tr>';
	der +='	<tr>';
	der +='		<td height="*"></td>';
	der +='	</tr>';
	der +='	<tr>';
	der +='		<td height="24" bgcolor="#C0C3CA"></td>';
	der +='	</tr>';
	der +='</table>';
	if(screen.width>800){
		document.getElementById("izquierdo").innerHTML = izq;
		document.getElementById("derecho").innerHTML = der;
		document.getElementById("main").width = 1000;
	}
}
function breadcrumbs(){
	sURL = new String;
	bits = new Object;
	var x = 0;
	var stop = 0;
	var output = "<a href=\"/\">Inicio</a> &nbsp;>&nbsp; ";

	sURL = location.href;
	sURL = sURL.slice(44,sURL.length);
	chunkStart = sURL.indexOf("/");
	sURL = sURL.slice(chunkStart+1,sURL.length)
	while(!stop){
		chunkStart = sURL.indexOf("/");
		if (chunkStart != -1){
			bits[x] = sURL.slice(0,chunkStart);				
			sURL = sURL.slice(chunkStart+1,sURL.length);				
		}else{
			stop = 1;
		}
		x++;
	}
	for(var i in bits){
		if(transform(bits[i])=="Noticias"){
			output += "<a href=\"../../noticias.php\" class=\"historial\">Noticias</a>&nbsp;>&nbsp;";
		}else if(bits[i]=="asistente_bu-squeda"){
			output += "";
		}else{
			output += "<a href=\"";
			for(y=1;y<x-i;y++){
				output += "../";
			}	
			output += bits[i] + "/\" class='historial'>" + transform(bits[i]) + "</a>&nbsp;>&nbsp;";
		}
	}
	document.write(output);
}
function transform(word){
	word = word.replace(/a-/g,"á");
	word = word.replace(/e-/g,"é");
	word = word.replace(/i-/g,"í");
	word = word.replace(/o-/g,"ó");
	word = word.replace(/u-/g,"ú");
	word = word.replace(/_/g," ");
	return word.capitalize();
}
String.prototype.capitalize = function(){
	return this.replace(/[a-záéíóú]*/g, function(a){
		return a.charAt(0).toUpperCase() + a.substr(1).toLowerCase();
	}
);
};

function activarCSS(title) {
	var links = document.getElementsByTagName("link");
	for (var i=0; i<links.length; i++) {
		if (links[i].getAttribute("title") == title) {
			links[i].disabled = false;
		} else {
			links[i].disabled = true;
		}
	}
}