function navon(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "on.src");
	}
}
function navoff(imgName) {
	if (document.images) {
		document[imgName].src = eval(imgName + "off.src");
	}
}
function valemail(field) {
	var noChar = " /:,;'\"\\";
	for (i=0; i < noChar.length; i++) {
		badChar = noChar.charAt(i);
		if (field.value.indexOf(badChar,0) > -1)
			return false;
	}
	atPos = field.value.indexOf("@",1)
	if (atPos == -1) {
		return false;
	}
	if (field.value.indexOf("@",atPos+1) > -1){
		return false;
	}
	periodPos = field.value.indexOf(".",atPos)
	if (periodPos == -1){
		return false;
	}
	if (periodPos+3 > field.value.length) {
		return false;
	}
	if (field.value == "") {
		return false;
	}
	return true;
}
function getspecs(wide,tall) {
	if ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.charAt(22) == "4") && (navigator.appVersion.charAt(24) == "5") && (navigator.appVersion.indexOf("Mac") != -1)) {
		if (status == "yes") {
			tall += 17;	
		} else {
			tall += 1;
		}
	}
	if ((navigator.appName == "Netscape") && (navigator.appVersion.indexOf("Mac") != -1) && (navigator.appVersion.charAt(0) >= "5") && (scroll == "yes")) {
		wide += 14;
	}
	leftpos = 0
	toppos = 0
	if (navigator.appVersion.charAt(0) >= "4") {
		leftpos = screen.width/2 - wide/2
		toppos = screen.height/2 - tall/2
	}
}
function openwin(desturl,winname,wide,tall,toolbar,scroll,status) {
	window.open(desturl, winname, 'width='+wide+',height='+tall+',left='+leftpos+',top='+toppos+',toolbar='+toolbar+',status='+status+',scrollbars='+scroll+',resizable=no');
}
function NewWinA(desturl,winname,wide,tall,toolbar,scroll,status) {
	getspecs(wide,tall);
	openwin(desturl,winname,wide,tall,toolbar,scroll,status);
}

function NewWinB(frm,desturl,winname,wide,tall,toolbar,scroll,status,recurl) {
	if(valform()) {
		getspecs(wide,tall);
		openwin(desturl,winname,wide,tall,toolbar,scroll,status);
		frm.target = winname;
		frm.action = desturl;
		frm.submit();
		frm.target = "";
		frm.action = recurl;
	}
}
function NewWinC(frm,desturl,winname,wide,tall,toolbar,scroll,status,recurl) {
	getspecs(wide,tall);
	openwin(desturl,winname,wide,tall,toolbar,scroll,status);
	frm.target = winname;
	frm.action = desturl;
	frm.submit();
	frm.target = "";
	frm.action = recurl;
}