function showLayer(layer){
	mytop =  $j('#'+layer).height()/2;
	myleft = $j('#'+layer).width()/2;
	$j('#'+layer).css({'position':'absolute','top':'50%','margin-top': -mytop,'left':'50%', 'margin-left': -myleft}).show("slow");
}

function closeLayer(layer){
	$j('#'+layer).hide("slow");
	$j("#overlay").fadeOut(200);
}

function getDocHeight() {
    var D = document;
    return Math.max(
        Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
        Math.max(D.body.clientHeight, D.documentElement.clientHeight)
    );
}