// JavaScript Document

function showNavOver(id,left,top){
	
		document.getElementById(id).style.left=left;
		document.getElementById(id).style.top=top;

}

function hideNavOver(id){
	
		document.getElementById(id).style.left='-1200px';

}

function showPopup(id,l) {
	
	document.getElementById(id).style.left='50%';
	document.getElementById(id).style.marginLeft=l;
	document.getElementById('fade').style.display='block';
}

function closeWindow(id) {
	
	document.getElementById(id).style.left="-5000px";
	document.getElementById('fade').style.display='none';
	
}



// Email concealer
// example of code to display email link:  <script>mail("keith","gmail",0,"")</ script>

var tld_ = new Array()
tld_[0] = "com";
tld_[1] = "org";
tld_[2] = "net";
tld_[3] = "ws";
tld_[4] = "info";

var topDom_ = 13;
var m_ = "mailto:";
var a_ = "@";
var d_ = ".";

function mail(name, dom, tl, params)
{
	var s = e(name,dom,tl);
	document.write('<a href="'+m_+s+params+'">'+s+'</a>');
}
function mail2(name, dom, tl, params, display)
{
	document.write('<a href="'+m_+e(name,dom,tl)+params+'">'+display+'</a>');
}
function e(name, dom, tl)
{
	var s = name+a_;
	if (tl!=-2)
	{
		s+= dom;
		if (tl>=0)
			s+= d_+tld_[tl];
	}
	else
		s+= swapper(dom);
	return s;
}
function swapper(d)
{
	var s = "";
	for (var i=0; i<d.length; i+=2)
		if (i+1==d.length)
			s+= d.charAt(i)
		else
			s+= d.charAt(i+1)+d.charAt(i);
	return s.replace(/\?/g,'.');
}


// 
