// JavaScript Document
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

function JSFX_FloatDiv(id, sx, sy)
{
	var el=document.getElementById?document.getElementById(id):document.all?document.all[id]:document.layers[id];
	var px = document.layers ? "" : "px";
	window[id + "_obj"] = el;
	if(document.layers)el.style=el;
	el.cx = el.sx = sx;el.cy = el.sy = sy;
	el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};

	el.floatIt=function()
	{
		var pX, pY;
		pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
		document.documentElement && document.documentElement.clientWidth ? 
		document.documentElement.clientWidth : document.body.clientWidth;
		pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
		document.documentElement.scrollTop : document.body.scrollTop;
		if(this.sy<0) 
		pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
		document.documentElement.clientHeight : document.body.clientHeight;
		this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
		this.sP(this.cx, this.cy);
		setTimeout(this.id + "_obj.floatIt()", 40);
	}
	return el;
}

function scrolldown() {
	if(window.scrolltimerup){
		clearTimeout(scrolltimerup)
	}
	if(iens6&&parseInt(contentobj.style.top)>=(contentheight*(-1)+100)){
		contentobj.style.top=parseInt(contentobj.style.top)-step
	}else if(ns4&&contentobj.top>=(contentheight*(-1)+100)){
		contentobj.top-=step
	}
	scrolltimerdown = setTimeout("scrolldown()",scrollspeed)
}
<!-- scroll up function -->
function scrollup() {
	if(window.scrolltimerdown){
		clearTimeout(scrolltimerdown)
	}
	if(iens6&&parseInt(contentobj.style.top)<=0){
		contentobj.style.top=parseInt(contentobj.style.top)+step
	}else if(ns4&&contentobj.top<=0){ 
		contentobj.top+=step
	}
	scrolltimerup = setTimeout("scrollup()",scrollspeed)	
}
<!-- function to stop all scroll timers -->
function stopall() {
	if(window.scrolltimerup){
		clearTimeout(scrolltimerup)
	}
	if(window.scrolltimerdown){
		clearTimeout(scrolltimerdown)
	}
}
<!-- function that shifts the object to top -->
function shifttotop(){
	stopall()
	if (iens6) {
		contentobj.style.top=0
	}else{
		contentobj.top=0
	}
}

function getcontent_height(){
	if (iens6)
	contentheight=contentobj.offsetHeight
}

function printPage(){
	if (confirm("Is your browser set to print background images and colours?")) {
		window.print();
	}
}

function generateFriendlyName(theSource, theTarget) {
	var getSource = document.getElementById(theSource);
	var getTarget = document.getElementById(theTarget);
	var strLocation = getSource.value;
	strLocation = strLocation.replace(" ","-");
	strLocation = strLocation.replace(",","");
	strLocation = strLocation.replace(".","");
	strLocation = strLocation.toLowerCase();
	getTarget.value = strLocation;
}

function moveFooter(theFooter) {
	var windowWidth = 0;
	var footer = document.getElementById(theFooter);
	switch (navigator.appName) {
		case "Microsoft Internet Explorer":
			windowWidth = document.body.offsetWidth;
			break;
		default:
			windowWidth = window.innerWidth;
			break;
	}
	if(windowWidth < 955) {
		footer.style.left = 0;
		footer.style.marginLeft = "20px";
	}
	else {
		footer.style.left = "50%";
		footer.style.marginLeft = "-455px";
	}
}
