//find and replace function
function replace(inString,oldText,newText) {
return (inString.split(oldText).join(newText));
}


function getHeader(){

if (parent != self){
  //in the framed version this sets the page width using a table
  var headerText='<table width="780" border="0" cellspacing="0" cellpadding="0"><tr><td>'
  document.write(headerText);
}
else {
//alert("Not Framed");
  var headerText='<table width="780" border="0" cellspacing="0" cellpadding="0">  <tr>     <td colspan=2><A HREF="../homepage.html"><img src="../Common/images/top.png" width="780" height="75" border="0"></A></td>  </tr>  <tr>    <td width="175" bgcolor="#65205B"></td>	<td align=right width=605 class="topnavbar"><a href="../homepage.html"><b>Home</b></a> - <a href="../general/bigquestions.html"><b>Big Questions</b></a> - <a href="../general/who.html"><b>Who</b></a> - <a href="../general/gettingstarted.html"><b>Getting Started</b></a>   - <a href="mailto:joint-reviews@audit-commission.gov.uk"><b>Contact Us</b></a><br><br>  </td>  </tr></table>'
  document.write(headerText);
}

}


function getFooter(strNext,strPrevious){
parent.strFrameNext=strNext
parent.strFramePrevious=strPrevious
//strFrameNext=strNext
//var strFramePrevious=strPrevious

//alert(parent.strNext)
if (parent != self){
//alert("Framed");
//var url = window.parent.frmRight.document.URL;
//var url = document.URL;
self.parent.frames['frmLeft'].location.reload()
var footerText ='</TD></TR></TABLE>'
document.write(footerText);

}
else {
//alert("Not Framed");



//var url = document.URL;


var footerText ='</TD></TR></TABLE><TABLE border="0" cellspacing="0" cellpadding="0" width=775><tr><td width=175 bgcolor="#65205B"></td><td align="right" colspan=4><table>                  <tr>		<td align="bottom"><div align="right"><img usemap="#m_00000010" src="../Common/images/previous.gif"  border="0"></div><map name="m_00000010">'

footerText=footerText +  '<area shape="rect" coords="68,0,107,16" href="' + strPrevious + '"><area shape="rect" coords="0,0,63,15" href="' + strNext + '"></map></td></tr></table></td></tr> <tr>	<td width=175 bgcolor="#65205B"></td><td bgcolor="#65205B"><div align="left"><a href="http://www.audit-commission.gov.uk" target="_blank" title="aclogo" alt="aclogo"><img src="../Common/images/ac-logo.gif" width="140" height="47" border="0"></A></div></td>           <td bgcolor="#65205B"><div align="left"><A href="http://www.doh.gov.uk/scg/socinsp.htm" target="_blank" title="ssilogo" alt="ssilogo"><img src="../Common/images/ssi-logo.gif" width="140" height="46" border="0"></A></div></td>                    <td bgcolor="#65205B"><div align="right"><A href="http://www.wales.gov.uk/index.htm"  target="_blank" title="waleslogo" alt="waleslogo"><img src="../Common/images/welsh-logo.gif" width="140" height="25" border="0"></A></div></td>        </tr> </table>'

document.write(footerText);
}

}


function getFramedFooter(strPrevious,strNext){
//alert(strNext)
var strTotal = replace(window.parent.frmRight.document.URL, '\\', '/')
var arrTotal = strTotal.split('/');
var iCount=arrTotal.length - 2
//alert(arrTotal.length)
var strDir=(arrTotal[iCount]);

strPrevious=strDir + '/' + strPrevious
strNext=strDir + '/' + strNext

var footerText ='</TD></TR></TABLE><TABLE border="0" cellspacing="0" cellpadding="0"  width=90% ><tr><td  bgcolor="#65205B" width="200"><img src="../Common/images/background.gif"  border="0" width=220 height="25"></td><td align="right" colspan=4><table>                  <tr>		<td align="bottom"><div align="right"><img usemap="#m_00000010" src="../Common/images/previous.gif"  border="0"></div><map name="m_00000010">'

footerText=footerText +  '<area shape="rect" coords="68,0,107,16" href="' + strPrevious + '" target="frmRight"><area shape="rect" coords="0,0,63,15" href="' + strNext + '" target="frmRight"></map></td></tr></table></td></tr> <tr>	<td  bgcolor="#65205B" ></td><td bgcolor="#65205B"><div align="left"><a href="http://www.audit-commission.gov.uk" target="_blank" title="aclogo" alt="aclogo"><img src="../Common/images/ac-logo.gif"  height="47" border="0"></A></div></td>           <td bgcolor="#65205B"><div align="left"><A href="http://www.doh.gov.uk/scg/socinsp.htm" target="_blank" title="ssilogo" alt="ssilogo"><img src="../Common/images/ssi-logo.gif"  height="46" border="0"></A></div></td>                    <td bgcolor="#65205B"><div align="right"><A href="http://www.wales.gov.uk/index.htm"  target="_blank" title="waleslogo" alt="waleslogo"><img src="../Common/images/welsh-logo.gif"  height="25" border="0"></A></div></td>        </tr> </table>'

document.write(footerText);

}