var whatsnewlevels = new Array("1","4","2","4","2");
var whatsnewarray = new Array("24|Live Local Election Results|http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=1211|See the results as they come in - from about 9pm on May 1st 2003 the results will appear here|bullet-nominations.gif|Live Local Election Results","29|Publication Scheme|http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=995|The Freedom of Information Act 2000 requires all public authorities to publish a “Publication Scheme” leading towards greater openness in central and local government.|bullet-freedom.gif|Publication Scheme","2|Latest News|/cgi-bin/pressreleases.cgi|Our dedicated <a href=http://www.canterbury.gov.uk/cgi-bin/a2z.cgi?qstring=p&qtype=letter#41>Press Office</a> add new information virtually every day to make sure you are fully informed about what your council is up to.|bulletnews.gif|The latest news, direct from our Press Office.","21|The Future of Kingsmead|http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=1084|The Kingsmead and Northgate areas need major investment. We would like your ideas on what could be done over the next 5 years.|bullet-kingsmead.gif|The outlined kingsmead development site","28|Local Plan Review Update|http://www.localplan.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=69|The revised Deposit Draft Local Plan is out for public consultation from 31 March 2003, until 5pm on 12 May 2003.|bulletkeyhole.gif|Local Plan Review Update","30|Access for disabled|http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=582|Find out all the latest news and information relating to disabled access issues within the Canterbury District|bullet-disabled.gif|Access for disabled","26|Census figures|http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=1122|Following the release of the headline Census datasets earlier this year, the next sets of figures for Canterbury district are now publicly available.|bullet-census.gif|Census Figures","4|Where to Park?|/cgi-bin/buildpage.cgi?mysql=153|<FONT face=Arial size=1>Car parking <A href=/cgi-bin/buildpage.cgi?mysql=153>information</A> for Canterbury, Herne Bay and Whitstable.</FONT>|bulletcarpark.gif|Information on Parking within our district","5|Roadworks Update|http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=186|What's happening on our roads. Have a look at our <A href=/cgi-bin/buildpage.cgi?mysql=186>latest roadwork information</A>|bulletcone.gif|Get the latest on the Districts roads...","13|Best Value Performance Plan|http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=218|find out how we have performed over the last year and what we hope to acheive in future years.|bulletegov.gif|Best Value Performance Plan","14|Planning Applications|http://www.canterbury.gov.uk/cgi-bin/planning.cgi|Get details of all planning applications submitted to the City Council. A search feature enables you to search applications by date of submission, area and description.|bullet-planningdatabase.gif|Planning Applications","3|Pay by Direct Debit|http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=266|If you would like to pay your <a href=/assets/economy/NDRDirectDebit.pdf target=new>Business Rates</a> or <a href=/assets/economy/CTAXDirectDebit.pdf target=new>Council Tax</a> by direct debit, use the application forms available <a href=http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=266>here</a>|bullettax.gif|Pay Council Tax/Business Rates by Direct Debit","25|Unlocking the Gridlock|http://www.canterbury.gov.uk/cgi-bin/buildpage.cgi?mysql=1131|A new Draft Transport Plan for Canterbury District called ‘Unlocking the Gridlock’ is being consulted upon…we want your views. |bullet-congestion.gif|Unlocking the Gridlock");
var levelslen = (whatsnewlevels.length);

function rotate(level)
{
if (level)
  {
  var levelvar="whatsnewdata" + (level);
  var currentlevelitem=document.getElementById(levelvar).value;
  var maxlevelitems=whatsnewlevels[level-1];
  if (currentlevelitem==maxlevelitems) {currentlevelitem=1;} else {currentlevelitem++;}
  outputitem((level),currentlevelitem);
  }
else
  {
  for(z=0;z<levelslen;z++) 
    {
    var levelvar="whatsnewdata" + (z+1);
    var currentlevelitem=document.getElementById(levelvar).value;
    var maxlevelitems=whatsnewlevels[z];
    if (currentlevelitem==maxlevelitems) {currentlevelitem=1;} else {currentlevelitem++;}
    outputitem((z+1),currentlevelitem);  
    }
  }
}

function initialise(item)
{
for(z=0;z<levelslen;z++) {outputitem((z+1),item);}
}

function preparedivs()
{
var divsoutput="";
for(z=0;z<levelslen;z++) { divsoutput=divsoutput + "<div id=whatsnewlevel" + (z+1) + "></div>"; }
document.getElementById("whatsnew").innerHTML=divsoutput;
}

function outputitem(level,item)
{
var leveloffset=getleveloffset(level);
var itemoffset=leveloffset+(item-1);
printitem(level,itemoffset,item);
}

function getleveloffset(level)
{
var offset=0;
for(x=0;x<level-1;x++)
  {
  var temp=whatsnewlevels[x];
  var thislevelitems=new Number(temp);
  offset=offset+thislevelitems;
  }
return (offset);
}

function printitem(level,offset,item)
{
var rotatestring="";
var divvar="whatsnewlevel" + level;
var temparray = new Array();
temparray = whatsnewarray[offset].split("|");
if (whatsnewlevels[level-1]>1) {rotatestring="<a href=\"javascript: rotate(" + level + ");\" style=\"text-decoration: none; font-family: verdana; font-size: 8pt; font-wieght: bold;\"><img alt=\"Rotate to next item\" src=\"http://www.canterbury.gov.uk/images/index/whatsnew-rotateitem.gif\" border=\"0\"></a>";}
document.getElementById(divvar).innerHTML="<table width=100% border=0 cellspacing=0 cellpadding=0><tr><input type=hidden id=whatsnewdata" + level + " value=" + item + "><td bgcolor=#FFFFFF bordercolor=#806FB3><table width=100% border=0 bgcolor=#E5DFEE cellspacing=4 cellpadding=0><tr><td bgcolor=#E5DFEE><a class=whatsnew href=\"" + temparray[2] + "\"><img name=img" + x + " onMouseover=\"document.img" + x + ".style.border='1px solid #FFFFFF'\" onMouseout=\"document.img" + x + ".style.border='1px solid #000000'\" border=1 src=\"http://www.canterbury.gov.uk/images/index/" + temparray[4] + "\" width=55 height=55 style=\"border-color: black\" alt=\"" + temparray[5] + "\"></a></td><td bgcolor=#E5DFEE valign=top width=100%><table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td align=left nowrap><b><font color=#806FB3 face=Arial size=2><a class=whatsnew href=\"" + temparray[2] + "\" title=\"" + temparray[5] + "\">" + temparray[1] + "</a></font></b></td><td align=right>" + rotatestring + "</td></tr><tr><td colspan=2 align=left valign=top><font face=Arial size=1>" + temparray[3] + "</font></td></tr></table></td></tr></table></td></tr></table>";
}

