window.onload= init;

function init() {
	insertElement();
}

rollover = function(t, obj){
	t.src = obj;
};

var imgRoot = "images";
var hldr = new Image();
var arr = new Array("images/go-white-bg-hit.gif",
					"images/more-hit.gif",
					"images/comm-submit-hit.gif",
					"images/subscr-submit-hit.gif",
					"images/poll-submit-hit.gif",
					"images/search-hit.gif",
					"images/update-hit.gif",
					"images/nav-home-hit.gif",
					"images/nav-home-hit.gif",
					"images/nav-whatwedo-hit.gif",	
					"images/nav-info-hit.gif",
					"images/nav-guidance-hit.gif",
					"images/nav-cont-hit.gif",
					"images/nav-memb-hit.gif",
					"images/nav-news-hit.gif"
);

preload = function(){
	for (var i = 0; i < arr.length; i++)
		hldr.src = arr[i];
};

preload();

function insertElement()
{
	if (document.getElementById && document.getElementsByTagName && document.getElementById("pande"))
	{
		//find the pande ul and all the li's in it. 
		var ul= document.getElementById("pande");
		var li= ul.getElementsByTagName("li");
				
		//create new elements that will be inserted
		var new_li= document.createElement("li");
		var a= document.createElement("a");
		var text= document.createTextNode("Print page");
		
		//set required attributes on new elements before inserting
		a.setAttribute("href", "javascript: window.print()");
		a.setAttribute("id", "print");
				
		//add elements to the ul
		a.appendChild(text);
		new_li.appendChild(a);
		li[0].parentNode.insertBefore(new_li,li[0]);
	}
}


		