var footerInterval = null;

var menuImages = new Array();
var contentWidth = 895;
preloadMenu();

function preloadMenu()
{
	menuImages['myhome'] = new Array();
	menuImages['myhome'][0] = new Image();
	menuImages['myhome'][0].src = "/images/menu/myhome/gif";
	menuImages['myhome'][1] = new Image();
	menuImages['myhome'][1].src = "/images/menu/myhome_roll/gif";
	
	menuImages['community'] = new Array();
	menuImages['community'][0] = new Image();
	menuImages['community'][0].src = "/images/menu/community/gif";
	menuImages['community'][1] = new Image();
	menuImages['community'][1].src = "/images/menu/community_roll/gif";
	
	menuImages['product'] = new Array();
	menuImages['product'][0] = new Image();
	menuImages['product'][0].src = "/images/menu/product/gif";
	menuImages['product'][1] = new Image();
	menuImages['product'][1].src = "/images/menu/product_roll/gif";
	
	menuImages['contact'] = new Array();
	menuImages['contact'][0] = new Image();
	menuImages['contact'][0].src = "/images/menu/contact/gif";
	menuImages['contact'][1] = new Image();
	menuImages['contact'][1].src = "/images/menu/contact_roll/gif";
	
	menuImages['kcIT'] = new Array();
	menuImages['kcIT'][0] = new Image();
	menuImages['kcIT'][0].src = "/images/menu/kcit/gif";
	menuImages['kcIT'][1] = new Image();
	menuImages['kcIT'][1].src = "/images/menu/kcit_roll/gif";
	
}

function changeMenu(name, state)
{
	document.images[name].src = menuImages[name][state].src;
}



function setFade(op, obj) {
	var obj = obj.style;
	if (navigator.userAgent.indexOf("Firefox") != -1) {
		if (op >= 100) { op = 99.999; }
	}
	
	obj.filter = "alpha(opacity=" + op + ")";
	obj.KhtmlOpacity = (op / 100);
	obj.MozOpacity = (op / 100);
	obj.opacity = (op / 100);
}

function setBoxFade(op,obj){
	var divs = obj.getElementsByTagName('div');
	if(op==100){
		obj.style.borderColor = "#767676";
		divs[0].style.color="#767676";
		setFade(op,divs[1]);
		divs[2].style.color="#767676";

	} else {
		obj.style.borderColor = "#ACACAC";
		divs[0].style.color="#acacac";
		setFade(op,divs[1]);
		divs[2].style.color="#acacac";
	}
}

function openProductShots()
{
	openWindow('/productshots/','product_shots',720,550,100,100,1,'scrollbars=no,status=no');
}

function openWindow(u,n,w,h,l,t,c,f)
{
  var x=((screen.width-w)/2);if(c==1){l=x;t=(screen.height-h)/2;}if(c==2){l=x}
	f+=',top='+t+',left='+l+',width='+w+',height='+h;win=window.open(u,n,f);win.focus();
}

