jQuery(document).ready(function(){});  //needed because FF is stupid

function divGreyIn(elementid)
{jQuery(document).ready(function($){
    //insert html of elementid
    $("#greyContent").html($("#" + elementid).html());
    //request data for centering  
    var windowWidth = document.documentElement.clientWidth;  
    var windowHeight = document.documentElement.clientHeight;  
    var popupHeight = $("#greyDiv").height();  
    var popupWidth = $("#greyDiv").width();  
    //centering  
    $("#greyDiv").css({  
        "position": "absolute",  
        "top": windowHeight/2-popupHeight/2,  
        "left": windowWidth/2-popupWidth/2  
    });  
    //fade in
    $("#greyBG").css({
        "opacity": "0.7"
    });
    $("#greyBG").fadeIn("fast");
    $("#greyDiv").fadeIn("fast");
})}

function divGreyOut(elementid)
{jQuery(document).ready(function($){
        $("#greyBG").fadeOut("fast");
        $("#greyDiv").fadeOut("fast");
})}

