 function submitForm()
	{
	if(document.loginForm.onsubmit())
	{//this check triggers the validations
	document.loginForm.submit();
	}
}
function checkForm(){

	if (!isValid("email_address")){
	alert('Please provide your email address');
	return false

	}	
	if(!isValid("password")){
	
	alert('Please provide a password');
	return false;	
	}	
	return true;

}
		
	//This is where you define the text for the ? popups
	var displayTitlestr = "The display name used in your entry";
	disciplinestr = "Please select your Discipline";
	addressstr = "The  address and contact details of your venue";
	directionsstr = "Directions to your venue";
	allyearstr = "Are you open all year? Yes or No";
	artiststatementstr ="Your statement. No more that 60 words please";
	Parkingstr = "Information about parking at your venue";
	Timesstr ="Please select opening and closing times for each day";
	



var infoBox, TO;

 function prepBox(){
		infoBox = document.getElementById("infoBox");
}
 

function hideDiv(){
  	TO=setTimeout("infoBox.style.visibility='hidden';",500);
}

function showDiv(str, e){

	 
	clearTimeout(TO);

	 var mousey =   (e.clientY +10  );   
	 var mousex = (e.clientX  ) ;
	
	 
	
	 topofbox = ((mousey - parent.document.documentElement.scrollTop)) ; 
 	 window.status = topofbox;
 
	  infoBox.innerHTML = str;

 
	
	
	//**Move the div (firefox needs 'px'
	if (document.layers)
        {
     		infoBox.left = mousex;
        	infoBox.top = mousey;
    	}
	    else
        {
        	infoBox.style.left = mousex + 'px';
        	infoBox.style.top = mousey + 'px';
    	}
  

	//**Show the div
 	infoBox.style.visibility="visible";
	
	 
	 
}

function isValid(eleID){
	
ele = document.getElementById(eleID).value;

if ((ele == null) || (ele=="") || (ele==" ")){
	
return false ; 	
}else {
return true;	
}
}

function markSelect(eleID, val){

	try {

		ele = document.getElementById(eleID);
		ele.value=val;
	} catch(e){

	
	}

}

/* ----------- phil's scripts ------------- */
function changeTXT(what, msg){
	document.getElementById(what).innerHTML = msg;
}
<!-- random image generator -->
function changeIM(id, preFix, val){
	var id1 = id+'1';
	var id2 = id+'2';
	var id3 = id+'3';
	
	var randX = (Math.floor(Math.random()*val+1));
	var randX2 = (Math.floor(Math.random()*val+1));
	var randX3 = (Math.floor(Math.random()*val+1));
	
	var newURL = "images/randoms/"+preFix+randX+".jpg";	
	var newURL2 = "images/randoms/"+preFix+randX2+".jpg";
	var newURL3 = "images/randoms/"+preFix+randX3+".jpg";
	
	var newHTML =  "<img src='"+newURL+"  ' alt='NEOS participant image'>";
	var newHTML2 = "<img src='"+newURL2+" ' alt='NEOS participant image'>";
	var newHTML3 = "<img src='"+newURL3+" ' alt='NEOS participant image'>";
	<!--alert(newHTML);-->
	document.getElementById(id1).innerHTML=newHTML;
	document.getElementById(id2).innerHTML=newHTML2;
	document.getElementById(id3).innerHTML=newHTML3;
	return;
	
}

function getCounter(x, nD){
	today = new Date();
	BigDay = new Date(nD);
	msPerDay = 24 * 60 * 60 * 1000 ;
	timeLeft = (BigDay.getTime() - today.getTime());
	e_daysLeft = timeLeft / msPerDay;
	var daysLeft = Math.floor(e_daysLeft)+1;
	e_hrsLeft = (e_daysLeft - daysLeft)*24;
	var hrsLeft = Math.floor(e_hrsLeft);
	var minsLeft = Math.floor((e_hrsLeft - hrsLeft)*60);
	if(x=="D"){
			if(daysLeft==0){
				daysLeft="Today!";
			}
	return(daysLeft);
	}
	if(x=="H"){
	return(hrsLeft);
	}
	if(x=="M"){
	return(minsLeft);
	}
	if(x=="A"){
	return(daysLeft+ " " + hrsLeft + " " + minsLeft);
	}
}

<!--- test calendar javascripts ----->
var myM = new Date();
var	myMD = myM.getMonth();
var	myDay = myM.getDate();
var monthWidth = (window.screen.width)-70;
var thisMonthDayWidth = monthWidth / (32 - new Date(2009, myMD, 32).getDate());
var monthHolderWidth = (thisMonthDayWidth * 365) + (12 * 50) + 40 ;
var monthsNames = new Array('january', 'february', 'march', 'april', 'may', 'june', 'juny', 'august', 'september', 'october', 'november', 'december');

function setWinWidth(){
	 self.moveTo(10, 295);
	 self.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
  window.left = "10px";
}

function findThisMonth(){
	<!-- feed in the variable value to the "month" class -->
	
	for(i=0;i<=11;i++){		
		document.getElementById("m"+i).style.width = (getMonthDays(i, "2009")*thisMonthDayWidth)+"px";
	};
	setStyleByClass("div","calendar","width",monthHolderWidth+"px");
	
	
	activeDiv = document.getElementById("m"+myMD);
	activeDiv.className = "c_month thismonth";
	getLeft(myDay, myMD, activeDiv);
	
}

function getLeft(day, month, myDiv){
	var curleft = curtop = 0;
	myMarker = document.getElementById("c_monthMarker");
	if (myDiv.offsetParent) {
		do {
			curleft += myDiv.offsetLeft;
			curtop += myDiv.offsetTop;
			}
			while (myDiv = myDiv.offsetParent);
	}
	
	dayDifPerc = retPercFromVal(day, getMonthDays(month, 2009));
	dayDif = retValFromPerc(dayDifPerc, monthWidth);
	myMarker.style.left = (curleft+dayDif)+"px";
	document.getElementById("mask").style.width = (curleft+dayDif-68)+"px";
	myMarker.innerHTML = "<p>"+monthsNames[myMD] + " " + day + "</p>";
	self.scrollTo(curleft+dayDif, 0);

}

function getMonthDays(iMonth, iYear)
{
	dayZ = 32 - new Date(iYear, iMonth, 32).getDate();	
	return (dayZ);
}

function getMonthWidth(m, y){
	monthWidth = daysInMonth(m, y) * dayWidth;
	alert(dayWidth);
	return(monthWidth);
}
	
function retPercFromVal(x, tot){
	return ((100.0/tot)*x);
}
function retValFromPerc(p, tot){
	return ((tot/100.0)*p);
}

/* ============= culled from http://developer.apple.com/internet/webcontent/examples/styley_source.html ============ */
// setStyleByClass: given an element type and a class selector,
// style property and value, apply the style.
// args:
//  t - type of tag to check for (e.g., SPAN)
//  c - class name
//  p - CSS property
//  v - value
var ie = (document.all) ? true : false;

function setStyleByClass(t,c,p,v){
	var elements;
	if(t == '*') {
		// '*' not supported by IE/Win 5.5 and below
		elements = (ie) ? document.all : document.getElementsByTagName('*');
	} else {
		elements = document.getElementsByTagName(t);
	}
	for(var i = 0; i < elements.length; i++){
		var node = elements.item(i);
		for(var j = 0; j < node.attributes.length; j++) {
			if(node.attributes.item(j).nodeName == 'class') {
				if(node.attributes.item(j).nodeValue == c) {
					eval('node.style.' + p + " = '" +v + "'");
				}
			}
		}
	}
}

var allPageTags = new Array();

function changeMonthClassWidth(theClass, newW) {  //Populate the array with all the page tags
	var allPageTags=document.getElementsByTagName("*");
	//Cycle through the tags using a for loop
	for (i=0; i<allPageTags.length; i++) {
		//Pick out the tags with our class name
		if (allPageTags[i].className==theClass) {
			//Manipulate this in whatever way you want
			allPageTags[i].style.width=newW+"px";
		}
	}
} 

function setEventLeft(obj, dayX, t){
	document.getElementById(obj).style.position = 'relative';	
	document.getElementById(obj).style.left = thisMonthDayWidth * dayX + "px";
	document.getElementById(obj).style.borderLeft = "2px solid #333";
	document.getElementById(obj).style.padding = "4px";
	document.getElementById(obj).style.width = "150px";
	document.getElementById(obj).style.fontSize = "small";
	document.getElementById(obj).style.backgroundColor = "#DDD";
	document.getElementById(obj).style.height = "1.1em";
	if(t==0){
	document.getElementById(obj).style.top = "-40px";
		}else{
	document.getElementById(obj).style.top = t+"px";
	}
	
}

function setSign(){
	var myRand = Math.floor(Math.random()*13) + 1;
	if(myRand<=9){
		myPreFix = "s_00";
	}else{		
		myPreFix = "s_0"
	}
	document.getElementById("NEOS_sign").style.background = "url(images/signs/"+ myPreFix + myRand + ".png) no-repeat bottom right";
}