document.write('<div class="sidebar-elements">')
document.write('<h2>Reminders:</h2>')
document.write('<div id="reminders">')
var delay = 3000; //set delay between message change (in miliseconds)
var maxsteps=50; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(204,204,204); // start color (red, green, blue)
var endcolor=new Array(153,0,0); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div id="ticker" style="padding: 0px; font-weight: 30;">'; //set opening tag, such as font declarations

fcontent[0]="Thurs 25 March<br />Parents' Evening<br />Year 12";
fcontent[1]="2 - 16 April<br />Easter Holiday";

closetag='</div>';

var fwidth='150px'; //set scroller width
var fheight='85px'; //set scroller height

var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////


var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;


/*Rafael Raposo edited function*/
//function to change content
function changecontent(){
  if (index>=fcontent.length)
    index=0
  if (DOM2){
    document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
  index++
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

function linkcolorchange(step){
  var obj=document.getElementById("fscroller").getElementsByTagName("A");
  if (obj.length>0){
    for (i=0;i<obj.length;i++)
      obj[i].style.color=getstepcolor(step);
  }
}

/*Rafael Raposo edited function*/
var fadecounter;
function colorfade(step) {
  if(step<=maxsteps) {	
    document.getElementById("fscroller").style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step++;
    fadecounter=setTimeout("colorfade("+step+")",stepdelay);
  }else{
    clearTimeout(fadecounter);
    document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    setTimeout("changecontent()", delay);
	
  }   
}

/*Rafael Raposo's new function*/
function getstepcolor(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i<3;i++) {
    diff = (startcolor[i]-endcolor[i]);
    if(diff > 0) {
      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
    } else {
      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
    }
  }
  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}

if (ie4||DOM2)
  document.write('<div id="fscroller" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></div>');

if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent
document.write('</div>')
document.write('</div>')


document.write('<div class="sidebar-elements">')
document.write('<h2>Useful Links:</h2>')
document.write('<div class="buttons">')
document.write('<a href="http://learning.hazelwick.w-sussex.sch.uk" target="_blank"><img src="images/buttons/learning.gif" border="0" width="142" height="36" alt="Learning Zone" title="Learning Zone" /></a> <br />')
document.write('<a href="http://www.samlearning.com/" target="_blank"><img src="images/buttons/sam-learning.gif" border="0" width="142" height="36" alt="Sam Learning" title="Sam Learning" /></a> <br />')
document.write('<a href="http://www.huntcal.com/cgi/calview.cgi/hazelwick/hazelwick?vm=r" target="_blank"><img src="images/buttons/calendar.gif" border="0" width="142" height="36" alt="School Calendar" title="School Calendar" /></a> <br />')
//document.write('<a href="http://mail.hazelwick.w-sussex.sch.uk/exchange" target="_blank"><img src="images/buttons/email.gif" border="0" width="142" height="36" alt="School Webmail" title="School Webmail" /></a>')
document.write('<a href="http://mail.hazelwick.w-sussex.sch.uk/owa" target="_blank"><img src="images/buttons/webmail-staff.gif" border="0" width="142" height="36" alt="School Webmail - for staff" title="School Webmail - for staff" /></a>')
document.write('<a href="http://mail.wsgfl.org.uk/" target="_blank"><img src="images/buttons/webmail-pupils.gif" border="0" width="142" height="36" alt="School Webmail - for pupils" title="School Webmail - for pupils" /></a>')
document.write('<a href="school_prospectus.html"><img src="images/buttons/prospectus.gif" border="0" width="142" height="36" alt="School Prospectus" title="School Prospectus" /></a> <br />')
document.write('<a href="http://forum.hazelwick.w-sussex.sch.uk/mb/hazel" target="_blank"><img src="images/buttons/discussion-board.gif" border="0" width="142" height="36" alt="Discussion Board" title="Discussion Board" /></a> <br />')
document.write('<a href="http://ne-crawley-ask.wsgfl.org.uk" target="_blank"><img src="images/buttons/community_info.gif" border="0" width="142" height="36" alt="Community Info." title="Community Information" /></a> <br />')
<!--document.write('<a href="http://www.hazelwick.w-sussex.sch.uk/alumni.html"><img src="images/buttons/alumni.gif" border="0" width="142" height="36" alt="Hazelwick Alumni" title="Hazelwick Alumni" /></a> <br />')-->
<!--document.write('<a href="chttp://www.hazelwick.w-sussex.sch.uk/cyberbullying.html"><img src="images/buttons/cyberbullying.gif" border="0" width="142" height="36" alt="Cyber-Bullying" title="Cyber-Bullying" /></a> <br />')-->
document.write('</div>')
document.write('</div>')

document.write('<div class="sidebar-elements">')
document.write('<h2>Contact Details:</h2>')
document.write('Hazelwick School')
document.write('<br />Three Bridges')
document.write('<br />Crawley')
document.write('<br />West Sussex')
document.write('<br />RH10 1SX')
document.write('<br /> <br />')
document.write('T: 01293 403344')
document.write('<br />F: 01293 403446 <br/>')
document.write('E: <a class="email" href="mailto: office@hazelwick.w-sussex.sch.uk">Email Us</a><br />')
document.write('</div>')


document.write('<div class="sidebar-elements">')
document.write('<div class="buttons2">')
document.write('<a href="common_downloads/pdfs/ofsted.pdf" target="_blank"> <img src="images/buttons/OFSTED.gif" border="0" width="85" height="85" alt="Ofsted - Outstanding School" title="Ofsted - Outstanding School" style="margin-left: 30px" /></a><br />')
document.write('</div>')
document.write('</div>')

document.write('<div class="sidebar-elements">')
document.write('<div class="buttons2">')
document.write('<a href="http://www.adobe.com/products/acrobat/readstep2.html" target="_blank"><img src="images/buttons/acrobat.gif" border="0" width="88" height="31" alt="Download Adobe Acrobat Reader" title="Download Adobe Acrobat Reader" /></a> <br />')
document.write('<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank"><img src="images/buttons/flash.gif" border="0" width="88" height="31" alt="Download Adobe Flash Player" title="Download Flash Player" /></a> <br />')
document.write('</div>')
document.write('</div>')

//document.write('<div class="sidebar-elements">')
//document.write('<div class="up">') 
//document.write('<a href="#top"><img src="images/up_big.gif" width="36" height="34" alt="Back to Top" title="Back to //Top" /></a>')
//document.write('</div>')
//document.write('</div>');