var posArr = { 'x1':[27,731],'x2':[126,97],'x3':[221,10],'x4':[337,52],'x5':[539,87],'x6':[489,162] };
//var colArr = { 'c1':735,'c2':757,'c3':779 };
var colLeft = 735;
var pageHold = 'spacer';
var bsr;

function arrIn(buttName) {
	fixcursor('in');
	document.getElementById('border').style.top = posArr[buttName][0]+'px';
	document.getElementById('border').style.left = posArr[buttName][1]+'px';
	document.getElementById('border').style.visibility = 'visible';
	document.getElementById('r_text').src = 'IMAGES/'+buttName+'but.gif';
}

function arrOut() {
	fixcursor('out');
	document.getElementById('border').style.visibility = 'hidden';
	document.getElementById('r_text').src = 'IMAGES/'+pageHold+'but.gif';
}

function fixcursor(dir) {
	if (dir == 'out') {
		if (bsr == 'gecko ff3') 
			document.body.style.cursor='auto';
		else
			document.body.style.cursor='crosshair';
	} else {
		document.body.style.cursor='pointer';
	}
}

function clickIt(buttName,site) {
	pageHold = buttName;
	clearTimeout(timerId1);
	clearTimeout(timerId2);
	spurt1();
	var randomnumber = Math.floor(Math.random()*11);
	getAjax(url+'/cgi-bin/'+version+'/ajax.cgi?main='+buttName+'&site='+site+'&rand='+randomnumber,'bodycopy');
}

function swapColor(buttName,thisleft,thisColor) {
	colLeft = thisleft;
	document.getElementById('b1'+bgHold).style.visibility = 'hidden';
	document.getElementById('b2'+bgHold).style.visibility = 'hidden';
	document.getElementById('b4'+bgHold).style.visibility = 'hidden';
	document.getElementById('b5'+bgHold).style.visibility = 'hidden';
	document.getElementById('b1'+buttName).style.visibility = 'visible';
	document.getElementById('b2'+buttName).style.visibility = 'visible';
	document.getElementById('b4'+buttName).style.visibility = 'visible';
	document.getElementById('b5'+buttName).style.visibility = 'visible';
	//document.getElementById('scrollbox').style.background = "background-image: url('IMAGES/b3_"+buttName+".jpg')";
	document.getElementById('scrollbox').style.backgroundImage = "url('IMAGES/b3_"+buttName+".jpg')";
	//document.getElementById('scrollbox').style.backgroundImage = url('IMAGES/b3_'+buttName+'.jpg');
	//document.getElementById('scrollbox').style.backgroundImage = 'IMAGES/b3_'+buttName+'.jpg';
	document.body.style.backgroundColor = thisColor;
	document.body.style.backgroundImage = "url('IMAGES/bgnd_"+buttName+".gif')";
	bgHold = buttName;
}

function sendmessage() {
	var thisemail = escape(document.getElementById('zmail').value);
	var thismessage = escape(document.getElementById('message').value);
	var site = document.getElementById('site').value;
	getAjax(url+'/cgi-bin/'+version+'/contact.cgi?email='+thisemail+'&message='+thismessage+'&site='+site,'bodycopy');
}

function remove_focus() {
	if (document.links) {
		try {
			for (var i=0;i < document.links.length;i++) {
				document.links[i].blur();
			}
		} catch(e) {}
	}	
}
document.onClick = remove_focus();

function init() {
	getWindowCoords();
	startFollow();
	init2();
}

function startFollow() {
	document.onmousemove = followMe;
}

function followMe(evt) {
	var evt = (evt) ? evt : ((window.event) ? window.event : null);
	var vobject = document.getElementById('vert');
	var hobject = document.getElementById('hor');
	vobject.style.left = ((evt.clientX - vobject.offsetWidth)+1)+'px';
	hobject.style.top = ((evt.clientY - hobject.offsetHeight)+1)+'px';
	return;
}

getWindowCoords = (navigator.userAgent.toLowerCase().indexOf('opera')>0||navigator.appVersion.toLowerCase().indexOf('safari')!=-1)?function() {
	var canvasX = window.innerWidth;
	var canvasY = window.innerHeight;
	document.getElementById('vert').style.height = canvasY+'px';
	document.getElementById('hor').style.width = canvasX+'px';
}:function() {
	var canvasX = document.documentElement.clientWidth||document.body.clientWidth||document.body.scrollWidth;
	var canvasY = document.documentElement.clientHeight||document.body.clientHeight||document.body.scrollHeight;
	document.getElementById('vert').style.height = canvasY+'px';
	document.getElementById('hor').style.width = canvasX+'px'; 
}

window.onresize = getWindowCoords;

function css_browser_selector(u){var ua = u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1;},g='gecko',w='webkit',s='safari',h=document.getElementsByTagName('html')[0],b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3')?g+' ff3':is('gecko/')?g:/opera(\s|\/)(\d+)/.test(ua)?'opera opera'+RegExp.$2:is('konqueror')?'konqueror':is('chrome')?w+' chrome':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?'mobile':is('iphone')?'iphone':is('ipod')?'ipod':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win':is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; bsr = b[0]; c = b.join(' '); h.className += ' '+c; return c;};

css_browser_selector(navigator.userAgent);

function myVoid(){}
