function GNXBanner()
{
	this.setWidth = NXBanner_setWdith;
	this.setHeight = NXBanner_setHeight;
	this.setSize = NXBanner_setSize;
	this.getWidth = NXBanner_getWidth;
	this.getHeight = NXBanner_getHeight;
	//this.isAbsolute = NXBanner_setIsAbsolute;
	this.setLeft = NXBanner_setLeft;
	this.setTop = NXBanner_setTop;
	this.setSiteAlign = NXBanner_setSiteAlign;
	this.setSiteWidth = NXBanner_setSiteWidth;
	this.setSpace = NXBanner_setSpace;
	this.write = NXBanner_Write;
	this.Write = NXBanner_Write;
	this.addItem = NXBanner_addItem;
	this.setPosition = NXBanner_setPosition;
	

	this.NXBanner_strAddr = "";
	this.NXBanner_strPage = "";
	this.NXBanner_strPosition = "";
	this.NXBanner_static = 0;
	
}


function NXBanner_addItem(strAddr, strPage, strPosition)
{
	if (this.NXBanner_strAddr != "")
	{
		this.NXBanner_strAddr += "|";
	}
	
/*	if (this.NXBanner_strPage != "")
	{
		this.NXBanner_strPage += "|";
	}
*/	
	if (this.NXBanner_strPosition != "")
	{
		this.NXBanner_strPosition += "|";
	}
	this.NXBanner_strAddr += strAddr;
	this.NXBanner_strPage = strPage;
	this.NXBanner_strPosition += strPosition;
}



function NXBanner_setWdith(nWidth)
{
	this.NXBanner_Width = nWidth;
}

function NXBanner_setHeight(nHeight)
{
	this.NXBanner_Height = nHeight;
}

function NXBanner_setSize(nWidth, nHeigth)
{
	this.NXBanner_Width = nWidth;
	this.NXBanner_Height = nHeigth;
}

function NXBanner_setSpace(nSpace)
{
	this.NXBanner_Space = nSpace;
}

function NXBanner_getWidth()
{
	return this.NXBanner_Width;
}

function NXBanner_getHeight()
{
	return this.NXBanner_Height;
}

/*function NXBanner_setIsAbsolute( isAbsolute )
{
	this.NXBanner_isAbsolute = isAbsolute;
}*/

function NXBanner_setSiteAlign( siteAlign )
{
	this.NXBanner_siteAlign = siteAlign.toLowerCase();
}

function NXBanner_setLeft(left)
{
	this.NXBanner_Left = left;
}

function NXBanner_setTop(top)
{
	this.NXBanner_Top = top;
}

function NXBanner_setPosition(nLeft, nTop)
{
	this.NXBanner_Left = nLeft;
	this.NXBanner_Top = nTop;
}

function NXBanner_setSiteWidth(siteWidth)
{
	this.NXBanner_siteWidth = siteWidth;
}

function NXBanner_setStaticSpace(nSpace)
{
	this.NXBanner_static = nSpace;
}

function NXBanner_Write()
{
	var strAbsolute = "";
	var strTop = "";
	var strLeft = "";
	var d = new Date();
	var timeStemp = d.getSeconds() + d.getMinutes() + d.getHours();
	var strURL = "";
	/*if (this.NXBanner_isAbsolute)
	{
		strAbsolute = "position:absolute;"
	}*/

	if (this.NXBanner_siteAlign == "center")
	{
		strAbsolute = "position:absolute;"
		if (typeof(this.NXBanner_siteWidth) != "undefined")
		{
			strLeft = "left:expression( document.body.clientWidth>( " + ( this.NXBanner_siteWidth ) + ")?( (document.body.clientWidth/2) + " + ( (this.NXBanner_siteWidth / 2) + this.NXBanner_Space  ) + "):(" + ( this.NXBanner_siteWidth + this.NXBanner_Space ) + ") );";
		} else {
			if (typeof(this.NXBanner_Left) != "undefined")
			{
				strLeft = "left:" + this.NXBanner_Left + ";";
			}
		}
	} else {
		if (typeof(this.NXBanner_Left) != "undefined")
		{
			strAbsolute = "position:absolute;"
			strLeft = "left:" + this.NXBanner_Left + ";";
		}
	}

	if (typeof(this.NXBanner_Top) != "undefined")
	{
		strTop = "top:" + this.NXBanner_Top + ";";
	}
	
	strURL = "http://ad.nexon.com/NetInsight/html/nexon/" + this.NXBanner_strAddr + "/" + this.NXBanner_strPage + "";
	//strURL = "http://www.nexon.com/NX/Page/GnxBanner.aspx?strAddr=" + this.NXBanner_strAddr + "&strPage=" + this.NXBanner_strPage + "&strPosition=" + this.NXBanner_strPosition;
	//strURL = "http://local.nexon.com/short/Nxcom/PresentationLayer/nx/Page/GnxBanner.aspx?strAddr=" + this.NXBanner_strAddr + "&strPage=" + this.NXBanner_strPage + "&strPosition=" + this.NXBanner_strPosition;

	
	//strURL += "&t=" + timeStemp;
	
	document.write("<div style='" + ( strAbsolute + strLeft + strTop ) + "'><IFRAME tabindex=0 WIDTH=" + this.NXBanner_Width + " HEIGHT=" + this.NXBanner_Height + " NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='" + strURL + "' allowTransparency='true' allowTransparency='true'></IFRAME></div>");
	if (this.NXBanner_isSpeed != "undefined")
	{
		if (this.NXBanner_isSpeed)
		{
			document.write("<div style='" + ( strAbsolute + strLeft + strTop ) + "'><IFRAME tabindex=0 WIDTH=" + this.NXBanner_Width + " HEIGHT=" + this.NXBanner_Height + " NORESIZE SCROLLING=No FRAMEBORDER=0 MARGINHEIGHT=0 MARGINWIDTH=0 SRC='" + strURL + "' allowTransparency='true'></IFRAME></div>");
		}
	}
}