function getGuetbookAnswerBox(zahl) {
	document.getElementById('guestbookAnswerBox' + zahl).style.visibility='visible';
	document.getElementById('guestbookAnswerBox'+ zahl).style.height='auto';
}
function getGuetbookDelBox(zahl) {
	document.getElementById('guestbookDelBox' + zahl).style.visibility='visible';
	document.getElementById('guestbookDelBox'+ zahl).style.height='auto';
}
function guestbookNewEntryBox() {
	document.getElementById('guestbookNewEntry').style.visibility='visible';
	document.getElementById('guestbookNewEntry').style.height='auto';
}

function lookup(inputString) {
		if(inputString.length == 0) {
			// Hide the suggestion box.
			$('#suggestions').hide();
		} else {
			$.post("messages.php?art=empfList", {queryString: ""+inputString+""}, function(data){
				if(data.length >0) {
					$('#suggestions').show();
					$('#autoSuggestionsList').html(data);
				}
			});
		}
	} // lookup
	
function fill(thisValue) {
		$('#inputString').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
}

function makeDiscoStyle(left, top, width, height, isResizeAble)
{
    var styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no';
    styleStr += ',resizable=' + (isResizeAble ? 'yes' : 'no');
    styleStr += ',width=' + width + ',height=' + height;
    styleStr += ',left=' + left + ',top=' + top;
    styleStr += ',screenX=' + left + ',screenY=' + top;
    return styleStr;
}

function openDiscoWindow(url, name, width, height, isResizeAble){
    name = name.replace(/[^\w\d]/g, "_"); // added flag g
    name = name.replace(/undefined/, '_');
    name = name.replace(/\./, '_');
    url = encodeURI(url);// added to fix bug in IE 7 with usernames which has spaces
    var left = Math.round((screen.width - width) / 2);
    var top = Math.round((screen.height - height) / 2);
    var styleStr = makeDiscoStyle(left, top, width, height, isResizeAble);
    var res = window.open(url, name, styleStr);
    return res;
}