////////////////////////////
//	CMobileLink
////////////////////////////

function CMobileLink(sName, sLink, nXPos, nYPos, nWidth, nZindex)
{
	this.m_sName = sName;
	this.m_sLink = sLink;
	this.m_nXPos = nXPos;
	this.m_nYPos = nYPos;
	this.nWidth = nWidth;
	if(nZindex) this.nZindex = nZindex; else this.nZindex = 0;

	this.m_sSafeName = sName;
	for(i = 0; i < this.m_sSafeName.length; i++)
		if(sName.charCodeAt(i) < 65 || sName.charCodeAt(i) > 122 ||
			(sName.charCodeAt(i) > 90 && sName.charCodeAt(i) < 97))
			this.m_sSafeName = this.m_sSafeName.substring(0,i-1)+"_"+
						this.m_sSafeName.substring(i+1,this.m_sSafeName.length-1);
	
	this.Draw = CMobileLink_Draw;
	this.Show = CMobileLink_Show; 

}

function CMobileLink_Draw(bFlag)
{
	if (g_bIE)
		document.write("<DIV id='" + this.m_sSafeName + "MobileLink' STYLE=\"POSITION: absolute; font-weight: 600; TOP: " + this.m_nYPos + 
			 "px; LEFT: " + this.m_nXPos +"px; WIDTH: 5px; font-size: 12pt; font-family: Arial Cyr; z-Index: "+this.nZindex+"\"></div>");
	else
	if (g_bNETS)
		document.write("<LAYER id='" + this.m_sSafeName + "MobileLink' TOP=" + this.m_nYPos + " LEFT=" + this.m_nXPos + " Z-INDEX="+this.nZindex+"></LAYER>");
}

function CMobileLink_Show(sText)
{
	if(!sText) sText = ToHtmlSafeString(this.m_sName);
	var sTag = "<a href="+this.m_sLink+">"+sText+"</a>";

	if (g_bIE) evalText='document.all.' + this.m_sSafeName + 'MobileLink.innerHTML=\''+sTag+'\'';
	else
	if (g_bNETS) evalText='document.' + this.m_sSafeName + 'MobileLink.document.write(\''+sTag+
				'\');\n document.' + this.m_sSafeName + 'MobileLink.document.close();';
	eval(evalText);
}

