// don't show note if referrer is www.hcilab.org
var referrer = ""+document.referrer;
var containsHCI = !(referrer.substring(0, 20) == "http://www.hcilab.org");

// use onclick attribute also in IE
closeWindowIE = "closeWindow()";

// test if referrer is hcilab-org
 if (containsHCI){

	// create note + attributes
	var container = document.createElement("DIV");
	container.style.width = "190px";
	container.style.height = "120px";
	container.style.background = "#F6F4A4";
	container.style.padding = "5px";
	container.style.textAlign = "justify";
	container.style.fontSize = "10px";
	container.style.position = "absolute";
	container.style.top = "10px";
	container.style.right = "10px";
	container.style.zIndex = "10000";
	container.setAttribute("id", "container");

	// attach onclick close function
	container.onclick = new Function(closeWindowIE);

	// append note
	document.getElementsByTagName("BODY")[0].appendChild(container);

	// set text to be displayed within note
	document.getElementById("container").innerHTML = "<b>Note: </b><br>The Embedded Interaction Group and HCI Lab has moved to the University of Duisburg-Essen. The pages will be updated soon. In the mean time please have a look at our <a href='http://www.pervasive.wiwi.uni-due.de'>new website at the University of Duisburg-Essen</a>!<br><br><a href='#'>Close window!</a>";
}

// remove note onclick
function closeWindow()
{
	document.getElementsByTagName('BODY')[0].removeChild(document.getElementById('container'));
}
