var ABOUT_IDX = 0;
var PROJECTS_IDX = 1;
var EMPLOYMENT_IDX = 2;
var SMALL_ART_IDX = 3;
var CONTACT_IDX = 4;

var V_TABS_ON = true;
var TAB_CURRENT_PAGE = PROJECTS_IDX;

var tab_ids = new Array();
var tab_labels = new Array();
var tab_location = new Array();

tab_ids [0] = "about";
tab_ids [1] = "projects";
tab_ids [2] = "employment";
tab_ids [3] = "small_art";
tab_ids [4] = "contact";

tab_labels [0] = "A<br>b<br>o<br>u<br>t<br>";
tab_labels [1] = "P<br>r<br>o<br>j<br>e<br>c<br>t<br>s<br>";
tab_labels [2] = "E<br>m<br>p<br>l<br>o<br>y<br>m<br>e<br>n<br>t<br>";
tab_labels [3] = "S<br>m<br>a<br>l<br>l<br><br>A<br>r<br>t<br>";
tab_labels [4] = "@<br><br>";

tab_location [0] = "http://www.mindread.com/about.html";
tab_location [1] = "http://www.mindread.com/index.html";
tab_location [2] = "http://www.mindread.com/portfolio";
tab_location [3] = "http://www.mindread.com/my_images.html";
tab_location [4] = "mailto:admin@mindread.com";

var vmouseover = "mouseover";
var vmouseout = "mouseout";
var vclick = "click";

// load images
var img1 = new Image();img1.src = 'http://www.mindread.com/images/vtab_top_inactive.gif';
var img2 = new Image();img2.src = 'http://www.mindread.com/images/vtab_top_active.gif';
var img3 = new Image();img3.src = 'http://www.mindread.com/images/vtab_top_hilite.gif';

function buildVTabs ( holder ) {
	
	var tabStr = "";

	for ( var i = 0; i < tab_ids.length; i++ ) {

		// Active Tab
		if ( TAB_CURRENT_PAGE == i ) {
			tabStr += "<img src='http://www.mindread.com/images/vtab_top_active.gif' border=0><table width=35 border=0 cellspacing=0 cellpadding=0>"
				+ "<tr valign=top><td align=center width=35 border=1><div class=vtab_content_active>"
				+ tab_labels[i]
				+ "</div></td></tr></table>";

		} else {
			// inactive

			tabStr += "<img id=" + tab_ids[i] + "_img src='http://www.mindread.com/images/vtab_top_inactive.gif' border=0><table width=35 border=0 cellspacing=0 cellpadding=0>"
				+ "<tr valign=top><td bgcolor=#AFC4F0 align=center width=35 border=1>"
				+ "<div id="+ tab_ids[i] +" class=vtab_content_inactive "
				+ " onmouseover='vTabAct(this, vmouseover );' onmouseout='vTabAct(this, vmouseout);' "
				+ " onclick='vTabAct(this, vclick);' location='" + tab_location[i] + "' > "
				+ tab_labels[i]
				+ "</div></td></tr></table>";
		}

	}

	holder.innerHTML = tabStr;

}

function vTabAct( elem, act ) {
	eval( ""+ act + "_vTab(elem)" );
}

function mouseover_vTab(elem) {
	elem.style.backgroundColor = "white";
	elem.style.color = "black";

	// do img top
	var elemImg = document.getElementById( elem.id + "_img" );
	if ( elemImg == null ) return;
	elemImg.src = "http://www.mindread.com/images/vtab_top_hilite.gif";


} 

function mouseout_vTab(elem) {
	elem.style.backgroundColor = "black";
	elem.style.color = "white";

	// do img top
	var elemImg = document.getElementById( elem.id + "_img" );
	if ( elemImg == null ) return;
	elemImg.src = "http://www.mindread.com/images/vtab_top_inactive.gif";

} 

function click_vTab(elem) {
	location=elem.getAttribute( "location" );
} 


function geovisit(){}
