// all javascripts

function noFrame() {
	if (self.parent.frames.length != 0)
		self.parent.location = document.location;
}

function gotosecure(url) {
	window.location.href = "https://"+window.location.hostname+url;
}

function replaceJsLink(linkId, reference) {
	document.getElementById(linkId).href = reference;
}

// Infopopups
var _infoWindow = null;

function closeInfoWindow() {
	if (_infoWindow && !_infoWindow.closed) _infoWindow.close();
}	

function infoWindow(infopage, contexthandle, handle, text) {
	closeInfoWindow();
	urlParam = "infopage="+infopage+"&context="+(contexthandle == null ? "" : contexthandle)+"&handle="+(handle == null ? "" : handle)+"&text="+(text == null ? "" : text);
	_infoWindow = window.open("infopageservlet?"+urlParam,'InfoWindow','width=700,height=468,left=20,top=20,scrollbars=yes,resizable=yes,status=no');
}

function hideMenu() {
	var divs = document.getElementsByTagName("div");
	var menue = null;
	var content = null;
	for(var i = 0; i < divs.length; i++) {
		if(menue == null && "menucontainer" == divs[i].className) menue = divs[i];
		if(content == null && "content" == divs[i].className) content = divs[i];
	}
	if(content) {
		content.style.marginLeft = "0px";
		if(menue) menue.style.display = "none";
	}
}

