// preloads
N1=new Image();
N1.src="images/nav_introduction.gif";
N1b=new Image();
N1b.src="images/nav_introduction_on.gif";
N2=new Image();
N2.src="images/nav_summary.gif";
N2b=new Image();
N2b.src="images/nav_summary_on.gif";
N3=new Image();
N3.src="images/nav_sponsors.gif";
N3b=new Image();
N3b.src="images/nav_sponsors_on.gif";
N4=new Image();
N4.src="images/nav_methodology.gif";
N4b=new Image();
N4b.src="images/nav_methodology_on.gif";
N5=new Image();
N5.src="images/nav_sites.gif";
N5b=new Image();
N5b.src="images/nav_sites_on.gif";
N6=new Image();
N6.src="images/nav_sources.gif";
N6b=new Image();
N6b.src="images/nav_sources_on.gif";
N7=new Image();
N7.src="images/nav_topten.gif";
N7b=new Image();
N7b.src="images/nav_topten_on.gif";
N8=new Image();
N8.src="images/nav_polluted.gif";
N8b=new Image();
N8b.src="images/nav_polluted_on.gif";
N9=new Image();
N9.src="images/nav_types.gif";
N9b=new Image();
N9b.src="images/nav_types_on.gif";

var currentdate = 0;
var core = 0;
function StringArray (n) {
	this.length = n;
	for (var i =1; i <= n; i++) {
	this[i] =' ';
	}
}

image = new StringArray(5);
image[0] = 'images/end_icons_GREEN_bag.gif';
image[1] = 'images/end_icons_GREEN_beer.gif';
image[2] = 'images/end_icons_GREEN_bottle.gif';
image[3] = 'images/end_icons_GREEN_can.gif';
image[4] = 'images/end_icons_GREEN_rette.gif';

image2 = new StringArray(5);
image2[0] = 'images/end_icons_WHITE_bag.gif';
image2[1] = 'images/end_icons_WHITE_beer.gif';
image2[2] = 'images/end_icons_WHITE_bottle.gif';
image2[3] = 'images/end_icons_WHITE_can.gif';
image2[4] = 'images/end_icons_WHITE_rette.gif';

var ran = 60/image.length;

function ranimage() {
currentdate = new Date();
core = currentdate.getSeconds();
core = Math.floor(core/ran);

core = Math.random() * image.length;
core=Math.floor(core);
//alert(core);

return(image[core])
}

function ranimage2() {
currentdate = new Date();
core2 = currentdate.getSeconds();
core2 = Math.floor(core/ran);
core2 = Math.random() * image2.length;
core2=Math.floor(core2);
return(image2[core2])
}

function ShowLeftIcon() {
var x=ranimage();
document.write('<img src="'+ x +'" border="0" alt="" />');
}

function ShowContentIcon() {
var x=ranimage2();
document.write('<img src="'+ x +'" border="0" alt="" />');
}

function swap(imageID,imageName) {
	if(document.images)	{
		if(document.layers) {
		document.layers[layerID].document.images[imageID].src = eval(imageName + ".src");
		}
		else {
		document.images[imageID].src = eval(imageName + ".src");
		}
	}	
}

// Rubbish Facts
var RR=new Array(11);
RR[0]="Cigarette Butts were the most commonly found item on Clean Up Australia Day 2005";
RR[1]="An electric guitar was among one of the weird and interesting items collected on Clean Up Australia Day 2005";
RR[2]="Glass pieces were the second most commonly found items on Clean Up Australia Day 2005";
RR[3]="Plastic accounted for 32% of all rubbish surveyed on Clean Up Australia Day 2005";
RR[4]="Chips and confectionery bags were the most common types of plastic rubbish found, accounting for 18% of all the plastic items surveyed";
RR[5]="Glass accounted for 14% of all rubbish surveyed on Clean Up Australia Day 2005";
RR[6]="A plastic monkey was among one of the weird and interesting items collected on Clean Up Australia Day 2005";
RR[7]="Of the 7,044 sites cleaned up on Clean Up Australia Day 2005, 10% were surveyed for this report";
RR[8]="Public bushland had the highest number of glass items, with an average of 136 items per site";
RR[9]="Paper and cardboard accounted for 15% of the total rubbish surveyed on Clean Up Australia Day 2005";
RR[10]="A bride's veil was among one of the weird and interesting items collected on Clean Up Australia Day 2005";

var ran2=60/RR.length;

function ranFact() {
currentdate = new Date();
core = currentdate.getSeconds();
core = Math.floor(core/ran2);
core3 = Math.random() * RR.length;
core3=Math.floor(core3);
return(RR[core3])
}



