	  var today = new Date();
      var max=0;
      
      function textlist()
      {
      max=textlist.arguments.length;
      for (i=0; i<max; i++)
      this[i]=textlist.arguments[i];
      }
      
	  function linklist()
	  {
	  max=linklist.arguments.length;
      for (i=0; i<max; i++)
      this[i]=linklist.arguments[i];
	  }
      tl=new textlist
      ( 
	  	<!--Put ticker text here, each line, except last, ending with a comma-->
		  "The Blue Class are visiting Cardiff Castle on Friday 13th November", 
		  "Matt Mohan is our current student of the week",
	      "Thank-you to Claire Wrixon, who raised £232 for the school",
	      "Congratulations to Georgina for winning the weekly award",
	      "Congratulations to Fynnley for winning the weekly award"
    	<!--End of ticker text-->
      );
	  ll=new linklist
      ( 
	    <!-- List links in same order. List between inverted commas. A comma after each except the last one. If no link, put in "#"-->
	    <!-- http://www.google.com/calendar/embed?src=m.baker%40belgrave-school.org&ctz=Europe/London&pvttk=7e8ed7174d135c009395a8cfc07a0ac4 -->
	       "#",    
	       "#",
	       "#",
	       "#",
		   "#"
	    <!-- end links-->
	    );
	   var x=0; pos=0;
      var l=tl[0].length;
      
	  function textticker()
      {
	  var tickcontent =document.getElementById("tickdiv");
	  
	  tickcontent.innerHTML = tl[x].substring(0,pos)+"_";
	  tickcontent.href =  ll[x];
       if(pos++==l) { 
	   pos=0; 
	   setTimeout("textticker()",5000); x++;
        if(x==max) x=0; l=tl[x].length; } else
        {setTimeout("textticker()",100);}
      }
		
		function newbg(thecolor)
				{
				document.getElementById ("pageContent").style.background=thecolor;
		    	document.getElementById ("contactform").style.background=thecolor;
				}
		
		function isValidEmail(str) {
		   	return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
		}
		
		function checkForm(objform) {
			var returnStatus = 1;
		
			//CHECK Name
			if (objform.Name.value == "") {
				alert ("To continue you must enter your Name");
				return false;
			}
		  //CHECK Phone
			if (objform.Phone.value == "") {
				alert ("To continue you must enter your Telephone Number");
				return false;
			}
			//CHECK Email
			if (objform.Email.value == "") {
				alert ("To continue you must enter your Email Address");
				return false;
			}
			//CHECK valid Email
			if (!isValidEmail(objform.Email.value)) {
				alert ("To continue you must enter a valid Email Address");
				return false;
			}
		}
		
		
		function myPopup(url,windowname,w,h,x,y){
		window.open(url,windowname,"resizable=1,toolbar=0,location=0,scrollbars=0,menubar=0,status=0,directories=0,width="+w+",height="+h+",left="+x+",top="+y+"");
		}



      