function makeInfoBox(content){
	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
	var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

	var oldBox = document.getElementById('info-box');
	
	if (oldBox != null){
		document.body.removeChild(oldBox);
	}
	
	var box = document.createElement("DIV");
		box.id = "info-box";
		box.className = "noscalebg bgsleight";
//		box.style.backgroundColor = "#fff";
		box.style.position = "absolute";
		box.style.left = 250+"px";
		box.style.top = 150+"px";
		/*
		box.style.borderWidth = 1+"px";
		box.style.borderStyle = "solid";
		box.style.borderColor = "#000";
		box.style.width = 400+"px";
		box.style.height = 330+"px";
		*/
		box.style.zIndex = 100;
		box.innerHTML = content;
		document.body.appendChild(box);
		if (isIE && !isOpera){
			if (typeof(bgsleight) != 'undefined'){ bgsleight.init(true); }
		}
}

function hasParent(srcObj, parentObj){
	if (parentObj){
		var currentObj = srcObj;
		var myParent = currentObj.parentNode;
		var breakcount = 0;
		var looplimit = 100;
		
		//move up all parents to check each one in turn
		while (myParent){
			if (breakcount > looplimit){
				return;
			}
			if (parentObj.id == myParent.id){
				return true;
			}
			currentObj = myParent;
			myParent = currentObj.parentNode;
			breakcount++;
		}
	}
	return false;
}

function hideBox(e){
	var oldBox = document.getElementById('info-box');
	var isOverInfo = false;
		/*
	if (e.srcElement) {
		var target = e.srcElement;
	} else if(e.target) {
		var target = e.target;
	}
	if (target == oldBox || target.id == "show-info-box" || target.id == "show-info-box-img" || hasParent(target, oldBox)){
		isOverInfo = true;
	}

	if (isOverInfo){
		if (e.stopPropogation){
			e.stopPropogation();
		} else if(e.cancelBubble) {
			e.cancelBubble = true;
		}
		return false;
	}*/
	if (oldBox != null){
		document.body.removeChild(oldBox);
	}
}




//special case click handler because of IE
if (window.addEventListener){
	window.addEventListener("click", hideBox, true);
} else if(window.attachEvent){
	document.attachEvent("onclick", hideBox);
} else {
	window.onclick = hideBox;
}
