function prepYahoo() {	var lis = document.getElementById('hotels-list').getElementsByTagName('li');	for (i=0; i<lis.length; i++) {		if (lis[i].parentNode.id == 'hotels-list') {			var ul = lis[i].getElementsByTagName('ul')[0];			var dlis = lis[i].getElementsByTagName('li');			var li = document.createElement('li');			var a = document.createElement('a');			a.href = '';			a.containerElem = lis[i];			a.onclick = function () {				useYahoo(this.containerElem);				return false;			}			a.className = 'altChoice';			a.appendChild(document.createTextNode('use Yahoo! Maps instead? '));			dlis[2].className = 'hiddenChoice';			dlis[3].className = 'hiddenChoice';			dlis[4].className = 'hiddenChoice';			li.appendChild(a);			ul.appendChild(li);		}	}}function useYahoo(container) {	var h = container.getElementsByTagName('h4')[0];	var dlis = container.getElementsByTagName('li');	h.innerHTML = 'Yahoo! Maps Directions';	dlis[0].className = 'hiddenChoice';	dlis[1].className = 'hiddenChoice';	var a = dlis[5].getElementsByTagName('a')[0];	a.onclick = function () {		useGoogleMaps(this.containerElem);		return false;	}	a.removeChild(a.lastChild);	a.appendChild(document.createTextNode('use Google Maps instead?'));	dlis[3].className = '';	dlis[4].className = '';}function useGoogleMaps(container) {	var h = container.getElementsByTagName('h4')[0];	var dlis = container.getElementsByTagName('li');	h.innerHTML = 'Google Maps';	dlis[0].className = '';	dlis[1].className = '';	var a = dlis[5].getElementsByTagName('a')[0];	a.onclick = function () {		useMapQuest(this.containerElem);		return false;	}	a.removeChild(a.lastChild);	a.appendChild(document.createTextNode('use Yahoo! Maps instead?'));	dlis[3].className = 'hiddenChoice';	dlis[4].className = 'hiddenChoice';}window.onload = prepYahoo();
