function DarkenPage()

{

    var errorback = document.getElementById('errorback');

    errorback.style.height = document.body.parentNode.scrollHeight + 'px';

    errorback.style.width = document.body.parentNode.scrollWidth + 'px';

    errorback.style.display = 'block';

}



function LightenPage()

{

    var errorback = document.getElementById('errorback');

    errorback.style.display = 'none';

}



function errorbox()

{

	DarkenPage();

	//$('boxtext').innerHTML = text;

	var box = document.getElementById('errorbox');

    

    // w is a width of the newsletter panel

    w = 200;
    // get the x and y coordinates to center the newsletter panel

    xc = Math.round((document.body.clientWidth/2)-(w/2))
    yc = 200

    

    // show the newsletter panel

    box.style.left = xc + "px";

    box.style.top  = yc + "px";

    box.style.display = 'block';

}

function closebox()

{

	LightenPage();

	document.getElementById('errorbox').style.display = 'none';

}