﻿if (window.location.pathname.indexOf('index.htm')<0 && window.name!='TextArea') {document.location='./index.htm'}

var titleArray = new Array()
titleArray=[
[0,'home','Home Page for Acorn Education Services of Bristol, UK'],
[1,'about-us','About Acorn Education Service of Bristol - Acorn Education Services, Bristol UK'],
[2,'guardianship-info','Acorn Education Guardianship Services - Acorn Education Services, Bristol UK'],
[3,'guardianship-categories','Guardianship Categories offered by Acorn Education - Acorn Education Services, Bristol UK'],
[4,'guardianship-fees','Guardianship Fees for 2011 - 2012 - Acorn Education Services, Bristol UK'],
[5,'school-selection','School Selection Advice with Acorn Education Service - Acorn Education Services, Bristol UK'],
[6,'links-to-schools','Links to a few of the Schools in the South West of England - Acorn Education Services, Bristol UK'],
[7,'academic-support','Academic Support for Students through Acorn Education - Acorn Education Services, Bristol UK'],
[8,'testimonials','What People are Saying about Acorn Education Services - Acorn Education Services, Bristol UK'],
[9,'online-brochure','Download an Online Brochure from Acorn Education Services - Acorn Education Services, Bristol UK'],
[10,'application-form','Guardianship Application Form - Acorn Education Services, Bristol UK'],
[11,'contactus','Acorn Education Services Contact Us Page - Acorn Education Services, Bristol UK']
]

var thisPage=window.location.pathname
if (thisPage.indexOf('index')<0) {
  for (i=0; i<12; i++) {
    thisTitle=titleArray[i][1]
    if (thisPage.indexOf(thisTitle)>0) {
      window.parent.document.title=titleArray[i][2];
      setNavBar(i);
      break;
    }
  }
}

function WinHt()
{
	var winH = 730;
	if (parent.document.body && parent.document.body.offsetHeight) {
		winH = parent.document.body.offsetHeight;
	}
	if (parent.document.compatMode=='CSS1Compat' &&
		parent.document.documentElement && parent.document.documentElement.offsetHeight )
	{
	winH = parent.document.documentElement.offsetHeight;
	}
	if (parent.window.innerHeight) {
		winH = parent.window.innerHeight;
	}
return winH;
}

function MM_Resize() {
  var wHeight=WinHt()
  document.getElementById('divWrapper').style.height=eval(wHeight)+'px';
  document.getElementById('divInner').style.height=eval(wHeight-2)+'px';
  document.getElementById('divBody').style.height=eval(wHeight-104)+'px';
  document.getElementById('divFrame').style.height=eval(wHeight-117)+'px';
}

function setNavBar(id) {
  objId=window.parent.document.getElementById('NavBar'+id)
  objId.className='nav2'
  for (i=0; i<12; i++) {
    objId=window.parent.document.getElementById('NavBar'+i)
    if (i!=id) {if (objId.className=='nav2') {objId.className='nav'}}
  }
  setFocus('TextArea')
}

function setFocus(fcs) {window.parent.document.getElementById(fcs).focus()}


