function closeAds()
{
	$('#bgAds').fadeOut(function(){
		$(this).remove();
	});
	$('#showAds').fadeOut(function(){
		$(this).remove();
	});
}
function showAdsElement(w,h)
{
	if($.browser.msie)
		$("#bgAds").css({'height':document.documentElement.clientHeight,'width':document.documentElement.clientWidth});
	else
		$("#bgAds").css({'height':window.innerHeight,'width':$("body").css("width")});

	$("#bgAds").fadeTo(250, 0.35);
	$("#showAds").css('display','block');
		
	if((!w=='')||(!h==''))
	{
		var box_w = w;
		var box_h = h;
	} 
	else if(($("#txtAds img").attr("width")>"0"))
	{
		var box_w = $("#txtAds img").attr('width')+20;
		var box_h = $("#txtAds img").attr('height');
	}
	else 
	{
		var box_w = 500;
		var box_h = 400;
	}
	if($.browser.msie)
	{
		var top = (document.documentElement.clientHeight-box_h)/2;
		var left = (document.documentElement.clientWidth-box_w)/2
	}
	else
	{
		var top = (window.innerHeight-box_h)/2;
		var left = (parseInt($("body").css("width"))-box_w)/2
	}
	
	$("#showAds").animate({
		'width':box_w,
		'height':box_h,
		'top':top,
		'left':left
	},{
		duration:0,
		complete: function() {
			$(this).css({
				'-moz-box-shadow':'0px 0px 15px #000',
				'-webkit-box-shadow':'0px 0px 15px #000',
				'box-shadow':'0px 0px 15px #000'
			});
		}
	});
}

