var x=[""];
var y=[""];
var w=887;
var footerId="footerArea";
for(var i=1;i<=7;i++){
	y[i]=new Image();
	y[i].src="/shared/img/navi0"+i+"_active.png";
	x[i]=new Image();
	x[i].src="/shared/img/navi0"+i+".png";
}
function debug(s){
	window.status=s;
}
function toggle(f,n){
	document.getElementById("navi0"+n).src=(f==1)?y[n].src:x[n].src;
}
function windowOpen(url,winName){
	//var w=(window.innerWidth)?window.innerWidth:document.documentElement.clientWidth;
	winName=open(url,winName,"width="+w+",height="+(screen.availHeight-50)+",toolbar=0,location=0,directories=0,status=1,scrollbars=1,resizable=1,menubar=1");
	winName.focus();
}
function windowResize(){
	var h=screen.availHeight-50;
	var x=(screen.width-w)/2;
	var y=(screen.height-h)/2;
	window.resizeTo(w,h);
	window.moveTo(x,y);
}

new function(){
	function footerFixed(){
		var dh=document.getElementsByTagName("body")[0].clientHeight;
		if(window.innerHeight){
			var wh=window.innerHeight;
		}else if(document.documentElement&&document.documentElement.clientHeight!= 0){
			var wh=document.documentElement.clientHeight;
		}
		if(document.documentElement.scrollTop){
			var s=document.documentElement.scrollTop;
		}else if(window.pageYOffset){
			var s=window.pageYOffset;
		}else{
			var s=0;
		}
		if((wh-dh)!==0){
			var toppos=wh-dh+s;
		}else{
			var toppos=wh-document.getElementById("wrapper").offsetHeight;
		}
		document.getElementById(footerId).style.position="relative";
		document.getElementById(footerId).style.top=toppos+"px";
	}
	function addEvent(elm,listener,fn){
		try{
			elm.addEventListener(listener,fn,false);
		}catch(e){
			elm.attachEvent("on"+listener,fn);
		}
	}
	addEvent(window,"load",footerFixed);
	addEvent(window,"scroll",footerFixed);
	addEvent(window,"resize",footerFixed);
}

