
function checkframes() {
	
// checks to see if this page has been loaded as part of a frameset
//  if not, redirects to the parent page

  var w = parent.frames.length;

   if (w == 0) location.replace('index.htm');
}

function MM_reloadPage(init) {  

//reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function openwindow(url, name,w,h) {

//  Opens a New Window to the required size and displays a given page

var w = window.open(url,name,
"width=" + w + ",height=" + h + ",status=yes,resizable,scrollbars");
}

function MM_preloadImages() { 

//v3.0
  var d=document; 
  if(d.images){ 
     if(!d.MM_p) d.MM_p=new Array();
     var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
	 for(i=0; i<a.length; i++)
         if (a[i].indexOf("#")!=0){ 
			    d.MM_p[j]=new Image; 
				d.MM_p[j++].src=a[i];
		 }
  }
}

function preloadhawl() {

 MM_preloadImages('images/sophie2.jpg','images/cowsheads.jpg',
                  'images/criaatfoot.jpg','images/printbutton.gif',
				  'images/students_gate.jpg','images/students.jpg',
		          'images/countryliving.gif','images/farmersguardian.gif',
		          'images/fw_logo.gif','images/gloucesterecho.gif',
				  'images/threepigs.gif','images/nodogs.gif',
		          'images/teachers.jpg','images/twogoats.gif','images/grahamgoodrich.gif');
 
}

