window.onload = function() {
	if (!document.getElementsByTagName) return; 
	var anchors = document.getElementsByTagName("a"); 
	for (var i=0; i<anchors.length; i++) { 
		var anchor = anchors[i]; 
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") 
			anchor.target = "_blank"; 
	} 

	document.onkeydown = function(e) {
		var e = (e) ? e : event;
		if (e.ctrlKey && e.shiftKey && e.keyCode == 86) {
			var url = "http://validator.w3.org/check?verbose=1&uri=";
			url += encodeURIComponent(window.location.href);
			window.location.href = url;
		}
	}

	allThumbs = document.getElementById("Thumbs").getElementsByTagName("img");
	for (i = 0; i < allThumbs.length; i++) {
		allThumbs[i].onmouseover = function() {
			document.getElementById("Loading2").style.display = "inline";
			document.getElementById("GalleryMain").lastChild.onload = function() {
				document.getElementById("Loading2").style.display = "none";
			}
			document.getElementById("GalleryMain").lastChild.src = "Images/Harley" + this.id + ".jpg";
			allThumbs = document.getElementById("Thumbs").getElementsByTagName("img");
			for (i = 0; i < allThumbs.length; i++)
				allThumbs[i].className = "";
			this.className = "Current";
		}
	}
}
