function displayShareForm(nShareFormId)
{
	$("#shader").css({  
		"opacity": "0.7"  
	});  
	
	if(navigator.appName != "Microsoft Internet Explorer")
	{  
		$("#shader").fadeIn("fast");  
	}
	$("#" + nShareFormId).fadeIn("fast");
	centerPopup(nShareFormId) ;
}

function closeShareForm(nShareFormId)
{
	$("#shader").fadeOut("fast");  
	$("#" + nShareFormId).fadeOut("fast");  
}

function centerPopup(nShareFormId)
{  
	//request data for centering
	if(navigator.appName == "Microsoft Internet Explorer")
	{  
		var windowWidth = screen.width;
		var windowHeight = screen.height;
	}
	else
	{
		var windowWidth = document.documentElement.clientWidth;  
		var windowHeight = document.documentElement.clientHeight;  
	}
	var popupHeight = $("#" + nShareFormId).height();  
	var popupWidth = $("#" + nShareFormId).width();  
	//centering  
	$("#" + nShareFormId).css({  
		"position": "absolute",  
		"top": windowHeight/2-popupHeight/2,  
		"left": windowWidth/2-popupWidth/2  
	});
	
	$("#shader").css({  
		"height": windowHeight  
	});  
}
