// JavaScript Document
function navCurrIndex() {
//grab param query str
//alert(document.URL + " -> document.path");
	ret = -1;
	for (i=0; i<navpaths.length ;i++) {
		if(document.URL.indexOf(navpaths[i]) != -1) {
			ret = i;
			break;
			}
	}
	return ret; //the index of the curr nav section
}

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

function displayNav() {
	ret = "";
	for (i = 0; i < navtitles.length; i++) {
		if (i == navcurrindex)
			ret += navtitles[i] + "&nbsp;&nbsp;&nbsp;";
		else
			ret += "<a href='" + navpaths[i] + "'>" + navtitles[i] + "</a>&nbsp;&nbsp;&nbsp;";
	}
	return ret;
}
//var navdefault= "";
var navtitles=new Array("contact","web","art","cut-up");
var navpaths=new Array("/contact/","/portfolio/","/paintings/","/cut.htm");
var navcurrindex = navCurrIndex();
