//<![CDATA[
// 1
function MuestraDir(valor,ruta){
	//retira caracteres problemáticos
	valor = document.getElementById(valor).value;
	var a = /\xe0|\xe1|\xe2|\xe3|\xe4|\xe5/g;
	var A = /\xc0|\xc1|\xc2|\xc3|\xc4|\xc5/g;
	valor = valor.replace(a, 'a');
	valor = valor.replace(A, 'A');

	var e = /\xe8|\xe9|\xea|\xeb/g;
	var E = /\xc8|\xc9|\xca|\xcb/g;
	valor = valor.replace(e, 'e');
	valor = valor.replace(E, 'E');

	var i = /\xec|\xed|\xee|\xef/g;
	var I = /\xcc|\xcd|\xce|\xcf/g;
	valor = valor.replace(i, 'i');
	valor = valor.replace(I, 'I');

	var o = /\xf2|\xf3|\xf4|\xf5|\xf6/g;
	var O = /\xd2|\xd3|\xd4|\xd5|\xd6/g;
	valor = valor.replace(o , 'o');
	valor = valor.replace(O , 'O');

	var u = /\xf9|\xfa|\xfb|\xfc/g;
	var U = /\xd9|\xda|\xdb|\xdc/g;
	valor = valor.replace(u , 'u');
	valor = valor.replace(U , 'U');
	
	var s = /\s/g;
	valor = valor.replace(s , '%20');
	valor = valor.replace(/Ñ/gi,'N');
	valor = valor.replace(/ñ/gi,'n');
	
	if (valor == '[ejemplo....%20Dario%20Urzua%201830,%20Providencia]') {
		valor = 'Dario Urzua 1830, Providencia';
	} 

	window.location=ruta+'?d='+valor;
}
function LimpiaCaja(variable){
	if (document.getElementById(variable).value.indexOf('[',0) > -1 || document.getElementById(variable).value.indexOf(']',0) > -1){
		document.getElementById(variable).value = '';
	}
}
function if_enter(e) {
	if(e.keyCode == 13) {
		MuestraDir('buscaNombre',URLPrincipal);
	}
}
	function CreateBookmarkLink() {
		title = "Donde Estacionar"; 
		url = location.href;
		if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
		} else if( window.external ) { // IE Favorite
		window.external.AddFavorite(url, title); }
		else if(window.opera && window.print) { // Opera Hotlist
		return true; }
	}
//]]>
