//list of all image names to be used for mouseover effects
names = new Array(
    "nav-browse",
	"nav-aquire",
	"nav-blog",
	"nav-contact" );

//crap 'cause some browsers (MSIE) do not support image.src!
if (parseInt(navigator.appVersion) >= 3) {
  Browser = true;
}
else {
  Browser = false;
}

button = new Array();

//pre-load images
if (Browser) {
	for (i = 0; i < names.length; i++){
		b = names[i];
		button[b] = new Image();
		button[b].src = '/site-assets/' + b + ".gif";
		b = names[i] + '-over';
		button[b] = new Image();
		button[b].src = '/site-assets/' + b + ".gif";
		} // end for
	} // end if

//change images
function wiggle(n,s) {
	if (Browser) {
		index = n;
		if (s == 'o') { 
			index += '-over';
			}
		document[n].src = button[index].src;
		} // end if
	return true;
	} // end wiggle

// dynamically adjust size of textarea
function sz(t) {
	a = t.value.split('\n');
	b=1;
	for (x=0;x < a.length; x++) {
		if (a[x].length >= t.cols) b+= Math.floor(a[x].length/t.cols);
		}
	b+= a.length;
	if (b > t.rows) t.rows = b;
	}

function showsearch() {
	document.getElementById('search').style.opacity='1';
	document.getElementById('search').style.filter="alpha(opacity='100')";
	document.getElementById('search').style.zIndex="99";
	document.forms['search'].tags.focus();
	return false;
	}

function showform(f) {
	document.getElementById('bod').style.opacity='0.06';
	document.getElementById('bod').style.filter="alpha(opacity='6')";
	document.getElementById(f).style.opacity='1';
	document.getElementById(f).style.filter="alpha(opacity='100')";
	document.getElementById(f).style.zIndex="99";
	document.forms[f].content.focus();
	return false;
	}
	
function hideform(f) {
	document.getElementById('bod').style.opacity='1';
	document.getElementById('bod').style.filter="alpha(opacity='100')";
	document.getElementById(f).style.opacity='0';
	document.getElementById(f).style.filter="alpha(opacity='0')";
	document.getElementById(f).style.zIndex="-99";
	return false;
	}
