

function rollover(sName) {
	ele=document.getElementById(sName);
	if (ele !=null){
		ele.style.backgroundImage = "url('img/nav/navbg.gif')";
	}
}
function rollout(sName) {
	ele=document.getElementById(sName);

	if (ele !=null){
		ele.style.backgroundImage = "";
	}
}
function srollover(sName) {
	ele=document.getElementById(sName);
	if (ele !=null){
		ele.style.backgroundImage = "url('img/nav/snavbg.gif')";
	}
}
function srollout(sName) {
	ele=document.getElementById(sName);

	if (ele !=null){
		ele.style.backgroundImage = "";
	}
}

function getImage(id) {
	if (document.images && document.images[id])
		return document.images[id];
	else
		return null;
}
function setImg(id,i,src) {
	if (src!=null) {
		var img=getImage(id+i);
		if (img) img.src=src;
	}
}
function getElement(sName) {
	return document.getElementById(sName);
}
function popWindow(w,h) {
	var wclwin=window.open("","wclwin","toolbar=no,location=no,directories=no,margin=0,status=no,menubar=no,scrollbars=yes,resizable=no,width="+w+",height="+h);
	wclwin.focus();
}
function isInteger(sName) {
	var sVal=getElement(sName).value;
	var re=/(^\d+$)/;
	return (re.test(sVal));
}
String.prototype.ltrim=new Function("return this.replace(/^\\s+/,'')");
String.prototype.rtrim=new Function("return this.replace(/\\s+$/,'')");
String.prototype.trim=new Function("return this.replace(/^\\s+|\\s+$/g,'')");
function makeElink(user,host,domain) {
	
	var atsign = "&#64;";
	var addr = user + atsign + host + domain;
	document.write("<" + "a" + " " + "href=" + "mail" + "to:" + addr + ">" + addr + "<\/a>");
}