//suckerfish internet explorer hover fix
function startList(list) {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById(list);
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}
//window.onload = startList("main-nav");






function externalLink(url) {
	OpenWin = this.open(url, "child-window", "toolbar=no"+
	                                 ",dependent=yes"+
					 ",width=640"+
					 ",height=480"+
					 ",resizeable=yes"+
					 ",screenX=40"+
					 ",screenY=40"+
					 ",scrollbars=yes"+
					 ",location=yes");
}

function internalLink(url) {
	OpenWin = this.open(url, "sample", "toolbar=yes"+
	                                 ",dependent=yes"+
					 ",width=800"+
					 ",height=500"+
					 ",resizeable=yes"+
					 ",screenX=40"+
					 ",screenY=40"+
					 ",scrollbars=yes"+
					 ",location=no");
}


function internalLinkAll(url) {
	OpenWin = this.open(url, "sample", "toolbar=yes"+
	                                 ",dependent=yes"+
					 ",width=800"+
					 ",height=500"+
					 ",resizeable=yes"+
					 ",screenX=40"+
					 ",screenY=40"+
					 ",scrollbars=yes"+
					 ",location=yes");
}

function externalLinkAll(url) {
	OpenWin = this.open(url, "sample", "toolbar=yes"+
	                                 ",dependent=yes"+
					 ",width=800"+
					 ",height=500"+
					 ",resizeable=yes"+
					 ",screenX=40"+
					 ",screenY=40"+
					 ",scrollbars=yes"+
					 ",location=yes");
}

function clearField(me) {
	if (me.defaultValue==me.value) {
		me.value = "";
	}
}

function checkField(me) {
	if (me.value=="") {
		me.value = me.defaultValue;
		//window.alert("All fields are required, please enter the correct information in each field");
	}
	if (me.value.length>300) {
		window.alert("Max length for message exceeded, message has been truncated to 300 characters");
		me.value=me.value.substring(0,300);
	}
	var lc = me.value.toLowerCase();
	if (lc.indexOf("content-type:")>=0 || lc.indexOf("bcc:")>=0 || lc.indexOf("cc:")>=0) {
		me.value="";
		window.alert("Some content in you have provided is not permitted. Please ensure that your post does not contain text that may be used illicitly.");
		me.focus();
	}
}
