/* shorthand notation for document.getElementById() */
function ge(id) {
	return document.getElementById(id);
}

var curHeight = 400;
var maxHoogte = 400;
var strCallback_HIDDEN = "";

function animateHideSearchForm() {
	elem = ge('searchFormArea');
	if (curHeight>0) {
		curHeight -= 20;
		elem.style.height = curHeight + 'px';
		window.setTimeout('animateHideSearchForm()', 20);
	} else {
		elem.style.visibility = 'hidden';
		calA.hide(); 
		calV.hide();
		if (strCallback_HIDDEN) eval(strCallback_HIDDEN);
	}
}

function setCallbackOnHidden(strCallback) {
	strCallback_HIDDEN = strCallback;
}

function animateShowSearchForm() {
	elem = ge('searchFormArea');
	elem.style.visibility = 'visible';
	
	calA.show(); 
	calV.show();
	if (curHeight<maxHoogte) {
		curHeight += 20;
		elem.style.height = curHeight + 'px';
		window.setTimeout('animateShowSearchForm()', 20);
	}
}
