function openLoginForm(errorMsg)
{
    YAHOO.util.Event.onContentReady("body", function()
	{
		document.location = "#";
		YAHOO.util.Dom.get("body").className = "balckScreenBody";

		YAHOO.util.Dom.get("balckScreen").className = "balckScreen";

		var attributes = {
			opacity: {from:0, to: 0.7}
		};
		var showBlack = new YAHOO.util.Anim('balckScreen', attributes,0.5);
		showBlack.animate();

		showBlack.onComplete.subscribe(function()
		{
			YAHOO.util.Dom.get("loginDiv").className = "loginDiv";

			if(errorMsg)
			{
				YAHOO.util.Dom.get("popup-alert").className = "popup-alert";
				YAHOO.util.Dom.get("popup-alert").innerHTML = errorMsg;
			}
		});
	});
}

function closeLoginPopup()
{
    YAHOO.util.Dom.get("loginDiv").className = "loginDiv_disabled";
    
    var attributes = {
        opacity: {from:0.7, to: 0}
    };
    var hideBlack = new YAHOO.util.Anim('balckScreen', attributes,0.5);
    hideBlack.animate();

    hideBlack.onComplete.subscribe(function() 
    {
        YAHOO.util.Dom.get("balckScreen").className = "balckScreen_disabled";
        YAHOO.util.Dom.get("body").className = "";
    });


}

