/* 
 * gkk.js
 * for gkustomkuhl.com
 * author:  dev [at] miinx.com.au
 */

function initLinks() {
	if (document.getElementsByTagName) {
		var links = document.getElementsByTagName("a");
		for (var i=0; i<links.length; i++) {
			var lk = links[i];
			
			// "no go" message for pages still in dev. links on web home pg
			if (lk.className == "noGo") {
				lk.onclick = function() {
					alert("in development - please check back soon");
					return false;
				}
			} else {
				// no dotted borders
				lk.onclick = function() {
					this.blur();
					return true;
				}
			}
		}
	}
}

function initPopups() {
	if (window.location.pathname.indexOf("cycles/") != -1 || window.location.pathname.indexOf("kustoms/") != -1) {
		if (document.getElementsByTagName) {
			var popLks = document.getElementById("pix_container").getElementsByTagName("a");
			for (var i=0; i<popLks.length; i++) {
				var lk = popLks[i];
				lk.onclick = function() {
					popPic(this.href);
					return false;
				}
			}
		}
	}
}

function popPic(sPath) {
	imgWin = window.open('/poppic.htm?'+sPath, 'imgWin', 'resizable,menubar=0,titlebar=0,toolbar=0,statusbar,width=600,height=500');
	window.imgWin.focus();
}

addLoadEvent(initLinks);
addLoadEvent(initPopups);


