function goto (x) {
	window.location.href = (getTag(x, "A", "href"));
}

var url = 'http://www.autovogue.com/';
function doOver (x, img) {
	changeTag(x, 'IMG', 'src', url+'images/layout/bottom/'+img);
}

function doOut (x, img) {
	changeTag(x, 'IMG', 'src', url+'images/layout/bottom/'+img);
}

function getTag (x, t, a) {
	for (i = 0; i < x.childNodes.length; i++) {
		tag = x.childNodes[i];
		//alert(tag); 
		
		if (tag.tagName == t) {
			return tag.attributes[a].value;
		}else{
			if (tag.childNodes.length > 0) {
				if (d = getTag(tag, t, a)) {
					return d;
				}
			}
		}
	}
	return false;
}

function changeTag (x, t, a, str) {
	for (i = 0; i < x.childNodes.length; i++) {
		tag = x.childNodes[i];
		if (tag.hasChildNodes()) {
			return changeTag(tag, t, a, str);
		} else {
			if (tag.tagName == t) {
				tag.attributes[a].value = str;
				return true;
				break
			}
		}
	}
	return false;
}

var domain = 'autovogue.com';
function email(user) {
	document.write('<a href="mailto:' +user+ '@' +domain+ '" title="Email ' +user+ '@' +domain+ '!">'+user+ '@' +domain+ '</a>');
}
