var online=1;
var pageSize="760";
var onClr="ccaa00";
var offClr="990000";
var lastUpdate="Nov 2006";
var bgclr='ffffff';

var wotPlatForm="Unknown";
var wotBrowser="Unknown";
var bSetup="Unknown";

if (navigator.appVersion.indexOf("Mac") !== -1){wotPlatForm="Mac";}
else {wotPlatForm="Win";}

if (navigator.userAgent.indexOf("Safari") !== -1){wotBrowser="Safari";}
if (navigator.userAgent.indexOf("Firefox") !== -1){wotBrowser="Firefox";}
if (navigator.appVersion.indexOf("MSIE") !== -1){wotBrowser="MSIE";}
if (navigator.userAgent.indexOf("Netscape") !== -1){wotBrowser="Netscape";}
if (navigator.userAgent.indexOf("Opera") !== -1){wotBrowser="Opera";}

if ((wotBrowser=="Firefox")&&(wotPlatForm=="Mac")){bSetup="Mac_Firefox";}
if ((wotBrowser=="Firefox")&&(wotPlatForm=="Win")){bSetup="Win_Firefox";}

if ((wotBrowser=="Safari")&&(wotPlatForm=="Mac")){bSetup="Mac_Safari";}
if ((wotBrowser=="Safari")&&(wotPlatForm=="Win")){bSetup="Win_Safari";}

if ((wotBrowser=="MSIE")&&(wotPlatForm=="Mac")){bSetup="Mac_MSIE";}
if ((wotBrowser=="MSIE")&&(wotPlatForm=="Win")){bSetup="Win_MSIE";}

if ((wotBrowser=="Netscape")&&(wotPlatForm=="Mac")){bSetup="Mac_Netscape";}
if ((wotBrowser=="Netscape")&&(wotPlatForm=="Win")){bSetup="Win_Netscape";}

var ie6 = (document.all && document.getElementbyID) ? true : false;
var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns3 = (document.images) ? true : false;

if (ns4) {
 origWidth = innerWidth;
 origHeight = innerHeight;
}

function reDo() {if (innerWidth != origWidth || innerHeight != origHeight) {location.reload();}}

if (ns4) {onresize = reDo();}

function ifIE_local(){
if ((navigator.appVersion.indexOf("MSIE"))) {
document.write('<p><b>NB:</b> If you know your version of Flash to be fairly recent then it may be that ');
document.write('<b>Internet Explorer</b> is currently not configured to permit your browser to ');
document.write('use <b>&quot;Active Content&quot;</b>. ');
document.write('<p>To rectify this, in the <b>&quot;Tools&quot;</b> menu, go to <b>&quot;Internet Options&quot;</b> ');
document.write('select the <b>&quot;Advanced&quot;</b> tab and scroll down to the <b>&quot;Security&quot;</b> ');
document.write('heading and make sure that the following two entries are checked: ');
document.write('<b>&quot;Allow Active Content from CDs to run on My Computer&quot;</b> ');
document.write('and <b>&quot;Allow Active Content to run in files on My Computer&quot;</b> ');
document.write('(you may require permission first from your Systems Administrator).');
}
}

function myUnescape(theWord){
  var x=0;
  var outStr ="";
  var ch="";
  for (x=0; x<theWord.length; x++)
  {
  ch = theWord.substr(x,1);
  if (ch=='+') {ch=" "};
  outStr+=ch;
  }
  return outStr;
}

function putdate(){
 var thisDate=new Date();
 var thismonth=thisDate.getMonth()+1;
 if (thismonth=="1") {monthname="January"}
 if (thismonth=="2") {monthname="February"}
 if (thismonth=="3") {monthname="March"}
 if (thismonth=="4") {monthname="April"}
 if (thismonth=="5") {monthname="May"}
 if (thismonth=="6") {monthname="June"}
 if (thismonth=="7") {monthname="July"}
 if (thismonth=="8") {monthname="August"}
 if (thismonth=="9") {monthname="September"}
 if (thismonth=="10") {monthname="October"}
 if (thismonth=="11") {monthname="November"}
 if (thismonth=="12") {monthname="December"}
 var year=thisDate.getYear();
 if (navigator.appVersion.lastIndexOf('Mac') != -1) 
  if (navigator.appName == ('Microsoft Internet Explorer')) 
  var year = (thisDate.getYear());
  else var year = (thisDate.getYear()+1900);
 if ((navigator.appName=="Netscape") && (navigator.appVersion.indexOf("Win") != -1))
      var year = (thisDate.getYear()+1900);
 currentDate=monthname+' '+thisDate.getDate()+', '+year+'';
 document.write(currentDate);
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is a required field.\n'; }
  } if (errors) alert('The following error(s) occurred (Please fill in any required fields):\n\n'+errors);
  document.MM_returnValue = (errors == '');
}

var flash4installed = false;
var flash5installed = false;

function hasFlash(){
var i,s;
if (flash4installed||flash5installed) return(1);
if (!navigator.plugins) return(0);
if (navigator.plugins["Shockwave Flash"]){
  var flashDescription = navigator.plugins["Shockwave Flash"].description;
  var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".")-1));
  if (flashVersion>=5) return(1);
}
return(0);
}

function writeHeader(wotSect,bgclr,imgFolderPath){
 document.write('<div align="center">');
 document.write('<table border="0" width="'+pageSize+'" cellpadding="0" cellspacing="0"><tr><td valign="top" bgcolor="#000000">');
 document.write('<table border="0" cellpadding="1" cellspacing="1" width="100%"><tr><td valign="top" bgcolor="#006699">');
 document.write('<table border="0" cellpadding="0" cellspacing="0" width="100%">');
 document.write('<tr>');
 document.write('<td valign="middle" width="760" align="center" class="headerColor">');

document.write('<div id="flashHeader">');
document.write('<div id="flash_headercontent">');
document.write('<p>You are seeing this message because our automatic Flash detector failed to recognise ');
document.write('your version of Flash. Version 4 (minimum) is required to navigate this site. ');
document.write('Please update your browser\'s Flash player by clicking ');
document.write('<a href="http://www.adobe.com'+'/go/getflash/" target="_blank" class="hLink">this link</a> and reloading this page.');
document.write('<p>If you <b>don\'t</b> want to install Flash, please use the text links at the foot of each page to jump ');
document.write('from section to section.');
document.write('<'+'/div>');
document.write('<'+'/div>');
document.write('<scr'+'ipt type="text/javas'+'cript">');
document.write('var so = new SWFObject("swfs/header.swf?sectid='+wotSect+'","header","760","68","4","#006699");');
document.write('so.write("flashHeader");');
document.write('<'+'/scr'+'ipt>');

 document.write('<'+'/td>');
 document.write('<'+'/tr>');
 document.write('<tr><td bgcolor="#111111"><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td><'+'/tr>');
 document.write('<tr><td class="dateLine"><scr'+'ipt>putdate();<'+'/script>&nbsp;&nbsp;<'+'/td><'+'/tr>');
 document.write('<tr><td bgcolor="#111111"><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td><'+'/tr>');
 document.write('<'+'/table><'+'/div>');
 document.write('<div align="center"><table width="760" border="0" cellpadding="0" cellspacing="0" class="pageBgnd">');
 document.write('<tr>');
 document.write('<td class="theLeft"><img src="images/spacer.gif" alt="" width="10" height="16" border="0"><'+'/td>');
 document.write('<td class="theLeft"><img src="images/spacer.gif" alt="" width="150" height="16" border="0"><'+'/td>');
 document.write('<td class="theLeftEdge"><img src="images/spacer.gif" alt="" width="10" height="16" border="0"><'+'/td>');
 document.write('<td><img src="images/spacer.gif" alt="" width="580" height="16" border="0"><'+'/td>');
 document.write('<td><img src="images/spacer.gif" alt="" width="10" height="16" border="0"><'+'/td>');
 document.write('<'+'/tr>');
 document.write('<tr>');
 document.write('<td class="theLeft"><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td>');
}

function buttonWriter(buttonNum,wotSect,wotPage,imgFolderPath){
document.write('<td width="150" valign="top" class="theLeft"><div id="navcontainer"><ul id="navlist">');

var theRow="";
var theButtons=eval("theButtons"+wotSect);
var theButtonUrls=eval("theButtonsURLs"+wotSect);
for (var loop=0;loop<theButtons.length;loop++){
 if (buttonNum!=(loop+1)){
 
  var theRow='<li id="inactive">';
  theRow+='<a href="'+myUnescape(theButtonUrls[loop])+'.htm" id="notcurrent">'+myUnescape(theButtons[loop])+'<'+'/a>';
  document.write(theRow);
 }
 else{
  var theRow='<li id="active">';
  theRow+='<a href="'+myUnescape(theButtonUrls[loop])+'.htm" id="current">'+myUnescape(theButtons[loop])+'<'+'/a>';
  document.write(theRow);
 }
}

document.write('</ul></div><div align="center"><center><table width="150" border="0" cellspacing="0" cellpadding="0">');


document.write('<tr><td class="newsletter" align="center" valign="middle"><a href="newsletter/newsletter2007.pdf" title="Click to see it in a new window" ');
document.write('target="_blank" class="newsletter">Latest Newsletter<'+'/td><'+'/tr>');

document.write('<tr><td><img src="images'+'/spacer.gif" width="150" height="2" alt=""><'+'/td><'+'/tr>');

document.write('<tr><td align="center">');


document.write('<div align="center" id="logoPanel">');
document.write('<img src="images/logos/artscouncil.gif" width="80" height="79" alt="" hspace="0" vspace="4" border="0">');
document.write('<'+'/div>');


document.write('<div id="logoPanel">');
document.write('<div align="center"><center><table width="145" border="0" cellspacing="0" cellpadding="0">');
document.write('<tr><td align="center">');

document.write('<div id="logoHolder">');
document.write('<'+'/div>');
document.write('<scr'+'ipt type="text/javas'+'cript">');
document.write('var so = new SWFObject("swfs/cp_hmmm.swf","cp_hmmm","145","40","4","#006699");');
document.write('so.write("logoHolder");');
document.write('<'+'/scr'+'ipt>');

document.write('<'+'/td><'+'/tr><'+'/table><'+'/center><'+'/div>');
document.write('<'+'/div>');

document.write('<'+'/td><'+'/tr>');
document.write('<tr><td><img src="images'+'/spacer.gif" width="10" height="2" alt=""><'+'/td><'+'/tr>');
document.write('<tr><td class="smPartnerTxt"><a href="http://www.creative-partnerships.com/" title="Click to visit their site" ');
document.write('target="_blank" class="smPartnerTxt">Creative Partnerships<'+'/a><'+'/td><'+'/tr>');
document.write('<tr><td><img src="images'+'/spacer.gif" width="10" height="25" alt=""><'+'/td><'+'/tr>');
document.write('<'+'/table><'+'/center><'+'/div>');
document.write('<'+'/td>');
document.write('<td width="10" class="theLeftEdge"><img src="images/spacer.gif" alt="" width="10" height="20" border="0"><'+'/td>');
document.write('<td valign="top" width="100%">');
}

function writePic(picPath,wotPic,picW,picH,theTitle,boxed,isCap,theCap){
document.write('<img src="'+picPath+wotPic+'" alt="'+theTitle+'" width="'+picW+'" height="'+picH+'" hspace="0" vspace="0" border="0" title="'+theTitle+'" class="floatright">');
}

function writePic1(picPath,picW,picH,theTitle,boxed,isCap,theCap){
document.write('<div id="floatRightPic">');
document.write('<img src="'+picPath+wotPic+'" alt="'+theTitle+'" width="'+picW+'" height="'+picH+'" hspace="0" vspace="0" border="0" title="'+theTitle+'" class="floatright">');
document.write('<'+'/div>');
}

function writeTitle(theTitle){
/*document.write('<div class="theTitle">'+theTitle+'<'+'/div>');*/
document.write('<div id="mainBoxHeaderIntro">'+theTitle+'<'+'/div>');
}

function writeFooter(){
 document.write('<'+'/td>');
 document.write('<td><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td>');
 document.write('<'+'/tr>');
 
 document.write('<tr>');
 document.write('<td class="theLeft"><img src="images/spacer.gif" alt="" width="10" height="25" border="0"><'+'/td>');
 document.write('<td class="theLeft"><img src="images/spacer.gif" alt="" width="150" height="25" border="0"><'+'/td>');
 document.write('<td class="theLeftEdge"><img src="images/spacer.gif" alt="" width="10" height="25" border="0"><'+'/td>');
 document.write('<td><img src="images/spacer.gif" alt="" width="580" height="25" border="0"><'+'/td>');
 document.write('<td><img src="images/spacer.gif" alt="" width="10" height="25" border="0"><'+'/td>');
 document.write('<'+'/tr>');
 
 document.write('<tr>');
 document.write('<td class="theLeftEdge" colspan="3"><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td>');
 document.write('<td colspan="2" bgcolor="#333333"><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td>');
 document.write('<'+'/tr>');

 document.write('<tr>');
 document.write('<td class="theLeftEdge" colspan="3"><img src="images/spacer.gif" alt="" width="10" height="2" border="0"><'+'/td>');
 document.write('<td class="footerBar" colspan="2"><img src="images/spacer.gif" alt="" width="10" height="2" border="0"><'+'/td>');
 document.write('<'+'/tr>');
 
 document.write('<tr>');
 document.write('<td class="theLeftEdge" colspan="3"><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td>');
 document.write('<td colspan="2" align="center" class="footerBar" valign="middle">');
 document.write('<a href="welcome.htm" class="smPageLink" title="Go There">Schoolzone</a> || ');
 document.write('<a href="curriculum.htm" class="smPageLink" title="Go There">Learning Zone</a> || ');
 document.write('<a href="extracurricular.htm" class="smPageLink" title="Go There">Kidszone</a> || ');
 document.write('<a href="themepark/index.htm" class="smPageLink" title="Go There">Learning Theme Park</a> || ');
 document.write('<a href="mailto:admin_birkdaleprimary@.schools.sefton.gov.uk" class="smPageLink" title="Click here to email us">Email Us</a>');
 document.write('<'+'/td><'+'/tr>');
 
 document.write('<tr>');
 document.write('<td class="theLeft"><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td>');
 document.write('<td class="theLeft"><img src="images/spacer.gif" alt="" width="150" height="1" border="0"><'+'/td>');
 document.write('<td class="theLeftEdge"><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td>');
 document.write('<td class="footerBar"><img src="images/spacer.gif" alt="" width="580" height="1" border="0"><'+'/td>');
 document.write('<td class="footerBar"><img src="images/spacer.gif" alt="" width="10" height="1" border="0"><'+'/td>');
 document.write('<'+'/tr>');
 
 document.write('<'+'/table><'+'/div>');
 document.write('<'+'/td><'+'/tr><'+'/table>');
 document.write('<'+'/td><'+'/tr><'+'/table><'+'/div>');
 document.write('<div align="center"><table border="0" width="'+pageSize+'" cellpadding="0" cellspacing="0">');
 document.write('<tr><td class="creditFooter">');
 document.write('site design by <a class="creditFooter" href="http://www.macdigital-uk.com/" ');
 document.write('target="_blank" title="Click to visit macDigital">macdigital<'+'/a>');
 document.write('<'+'/td><'+'/tr>');
 document.write('<'+'/table><'+'/div>');
}
