var unfoldingBannerCpt=1;
function displayUnfoldingBanner(banner,width,height,widthTn,heightTn)
{
	var thisId="UnfoldingBanner"+unfoldingBannerCpt;
	var swf='http://cbanners.virtuagirlhd.com/customdata/banner/unfoldingBanner/'+banner;
	var swfWidth=width;
	if(widthTn)
		var swfWidthTn=widthTn;
	else
		var swfWidthTn=swfWidth/2;
	var swfHeight=height;
	if(heightTn)
		var swfHeightTn=heightTn;
	else
		var swfHeightTn=swfHeight/2;

	var htmlFlash='<div style="position:relative;width:'+swfWidthTn+'px;height:'+swfHeightTn+'px;z-index:10000;margin:0px;">';
	htmlFlash+='<div style="position:absolute;width:'+swfWidthTn+'px;height:'+swfHeightTn+'px;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="'+swfWidthTn+'" height="'+swfHeightTn+'" id="object_'+thisId+'" align="middle">';
	htmlFlash+='<param name="allowScriptAccess" value="sameDomain" />';
	htmlFlash+='<param name="allowFullScreen" value="false" />';
	htmlFlash+='<param name="movie" value="'+swf+'" />';
	htmlFlash+='<param name="quality" value="high" />';
	htmlFlash+='<param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" />';
	htmlFlash+='<param name="FlashVars" value="sub='+subaccount+'" />';
	htmlFlash+='<embed FlashVars="sub='+subaccount+'" src="'+swf+'" quality="high" wmode="transparent" bgcolor="#ffffff" width="'+swfWidthTn+'" height="'+swfHeightTn+'" name="promo_tools_video" align="middle" wmode="transparent" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_fr" id="embed_'+thisId+'" />';
	htmlFlash+='</object></div></div>';
	
	document.write(htmlFlash);

	$("#object_"+thisId).hover(
		function ()
		{
			if($.browser.msie)
				$(this).attr("width",swfWidth).attr("height",swfHeight);
			else
				$("#embed_"+thisId).attr("width",swfWidth).attr("height",swfHeight);
			/*
			if($.browser.mozilla)
				$("#embed_"+thisId).attr("width",swfWidth).attr("height",swfHeight);
			else
				$(this).attr("width",swfWidth).attr("height",swfHeight);
			*/
		},
		function ()
		{
			if($.browser.msie)
				$(this).attr("width",swfWidthTn).attr("height",swfHeightTn);
			else
				$("#embed_"+thisId).attr("width",swfWidthTn).attr("height",swfHeightTn);
			/*
			if($.browser.mozilla)
				$("#embed_"+thisId).attr("width",swfWidthTn).attr("height",swfHeightT);
			else
				$(this).attr("width",swfWidthTn).attr("height",swfHeightTn);
			*/
		}
	);
	unfoldingBannerCpt++;
}
