function GT_AD_CounterType()
{
	this.NONE	= 0 ;
	this.PASS	= 1 ;
	this.HIT	= 2 ;
	this.ALL	= 3 ;
}

function GT_ShowAD(_strTagID, _strAreaID, _nCountType, _strATagExtString, _strIMGTagExtString, _bAvoidIP, _nTimeout, _strCommand)
{
	document.getElementById(_strTagID).innerHTML	= "<div align=\"center\"><img src=\"/Graphics/common/loading.gif\"></div>" ;

	var oADXML	= new XML() ;

	oADXML.Handler	= function()
	{
		document.getElementById(_strTagID).innerHTML	= unescape(oADXML.XMLData.ROOT.HTML) ;

		if(document.getElementById(_strTagID).innerHTML.toLowerCase().indexOf("/images/blank.gif") < 0)
			window.execScript(_strCommand) ;
	}

	oADXML.Execute("/include/AD/x_GetHTML.aspx", "f_strURL="+ escape(location.protocol +"//"+ location.hostname + location.pathname + location.search) +"&f_strAreaID="+ _strAreaID +"&f_nCountType="+ _nCountType +"&f_strATagExtString="+ _strATagExtString +"&f_strIMGTagExtString="+ _strIMGTagExtString +"&f_bAvoidIP="+ _bAvoidIP +"&f_nTimeout="+ _nTimeout) ;
}

function GT_FlashADOpen(_url, _window, _arguments)
{
	var ADPageRedirectTemp	= "" ;

	for(var i = 0 ; i < _url.length ; i++)
	{
		if(_url.charCodeAt(i) == "162" && _url.charAt(i+1) == "H")
		{
			ADPageRedirectTemp	+= "%" ;
			i++ ;
		}
		else
			ADPageRedirectTemp	+= _url.charAt(i) ;
	}

	open(ADPageRedirectTemp, _window.replace(/[^a-zA-Z]/gi, ""), _arguments) ;
}

var GT_AD_COUNTER_TYPE	= new GT_AD_CounterType() ;