// Email.js version 5
var tld_ = new Array()
tld_[0] = "com";
tld_[1] = "org";
tld_[2] = "net";
tld_[3] = "ws";
tld_[4] = "info";
tld_[5] = "edu";
tld_[6] = "us";
tld_[10] = "co.uk";
tld_[11] = "org.uk";
tld_[12] = "gov.uk";
tld_[13] = "ac.uk";
var topDom_ = 13;
var m_ = "mailto:";
var a_ = "@";
var d_ = ".";

function cotinga(name, dom, tl, params)
{
	var s = e(name,dom,tl);
	document.write('<a href="'+m_+s+params+'">'+s+'</a>');
}
function cotinga2(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,'.');
}



// ipopfn.js
<!-- hide from older browsers
function iPop(img,w,h,ttl)
{
	iPopURL = 'ipop.html' // set as location of ipop.html
	url = iPopURL + '?' + img + (ttl ? '&'+escape(ttl) : '')
	var scroll=0;
	var ht = window.screen.availHeight;
	var wd = window.screen.availWidth;
//	alert("availHeight="+ht+",availWidth="+wd);
	if (w>wd)
	{
		w=wd;
		h=h+16;
		scroll=1;
		}
//	alert("After width check: width="+(w)+",height="+(h)+",scrollbars="+scroll); 
	if (h>(ht-50))
	{
		if (w<=wd)
		{	h=ht-50;
//		alert("After 2nd width check: width="+(w)+",height="+(h)+",scrollbars="+scroll); 
			if (w<=(wd-16))
			{	w=w+16;
//		alert("After 3rd width check: width="+(w)+",height="+(h)+",scrollbars="+scroll); 
				}
			
				else
				{w=wd
					}

			}
		else
		{	h=ht-50;
			}
		scroll=1;
		}
//	alert("After height check: width="+(w)+",height="+(h)+",scrollbars="+scroll); 
	l = (screen.width-w)/2
	t = (screen.height-h)/2-50

//	alert("width="+(w)+",height="+(h)+",left="+l+",top="+t+",scrollbars="+scroll);  
	attribs = 'width='+(w)+',height='+(h)+',left='+l+',top='+t+',scrollbars='+scroll+',resizable=1'
//
	var imgWin = open(url,'imgWin',attribs)	
	if (navigator.appName != "Netscape")
	//For IE, need to add pixels to window size
	{	imgWin.resizeTo(w+12,h+86)
		}
	imgWin.moveTo(l,t)
	imgWin.focus()
}



// PopWindow.js
<!-- invoke with <a href="javascript:PopWindow('url to be displayed',width,height,toolbaroption,locationoption,menuoption)">
<!--
function PopWindow(url,w,h,tool,loc,menu) 
{
prefs = 'toolbar='+(tool)+',location='+(loc)+',menubar='+(menu)+',width='+(w)+',height='+(h)
mywin = window.open(url,"win",'directories=0,status=1,scrollbars=1,resizable=1,'+prefs); mywin.focus(); 
		}	
		
// printfn.js
function printthis()
{
this.print();
}

// noenter.js
function noenter() {
  return !(window.event && window.event.keyCode == 13); }

