//Hull in Print Javascript Engine

//display current date function
function datem(datecode) {
if (datecode == "whatever") //this changes every month!!
{
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear(); 
if (year < 2000)
year = year + 1900;
document.write(lmonth + " ");
document.write(date + ", " + year);}
else return
}

//write archive drop down navigation controls
function archivenav() {
document.write('<p align="left"><a href="http://www.hullcc.gov.uk/hullinprint/archive/" title="Previous Issue Archive">Previous Issue<br>Archive</a></p>');
//document.write('<form name="form"><select name="site" size="1" width="20" onChange="jumpHandler(this);"><option class="mainopt" value="#">Previous Issues<option class="optdark" value="../febmar2001/index.html">Feb/Mar 2001<option class="optlight" value="../aprmay2001/index.html">Apr/May 2001<option class="optdark" value="../junjul2001/index.html">Jun/Jul 2001<option class="optlight" value="../augsep2001/index.html">Aug/Sep 2001<option class="optdark" value="../octnov2001/index.html">Oct/Nov 2001<option class="optlight" value="../decjan2002/index.html">Dec/Jan 2002</select></form>');
}

//change status bar text function
function stat(val) {
if (val == 'hip') {
val = 'Hull in print';
}
if (val == '') {
val = ' ';
}
window.status=val; 
}

//Swap Image Function
function movepic(img_name,img_src) {
document[img_name].src=img_src;
}

//preload image function
function preloadimages(){
var myimages=new Array()
for (i=0;i<preloadimages.arguments.length;i++){
myimages[i]=new Image()
myimages[i].src=preloadimages.arguments[i]
}
}

//Scripting for Archived issues jump menu
function jumpHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}


 


