function A_S(Des,Title,Link,Type,Position,PosDes,Text,H,W)
{
	this.Des = Des
	this.Title = Title
	this.Link = Link
	this.Type = Type
	this.Position = Position
	this.PosDes = PosDes
	this.Text = Text
	this.H = H
	this.W = W
}

var A = new Array()
function GetAdB(pos)
{
	var htmlL = ''
	
	for(var x = 0; x < A.length; x++)
	{
		if(A[x].Position == pos)
		{
			if(A[x].Type == "AD_FLASH")
				htmlL = "<A href="+A[x].Link+" target=_blank><embed width="+A[x].W+" height="+A[x].H+" alt="+A[x].Des+" src='"+A[x].Text+"'></embed></A>"
			else if(A[x].Type == "AD_JS")
				htmlL = decodeURI(A[x].Text)
			else{
				htmlL = "<A target=_blank style='COLOR: #000' href='"+A[x].Link+"'><IMG width="+A[x].W+" height="+A[x].H+" alt="+A[x].Des+" src="+A[x].Text+"></A>"
			}
		}
	}
	return htmlL
}
function GetAdT(pos)
{
	var htmlL = ''
	
	for(var x = 0; x < A.length; x++)
	{
		if(A[x].Position == pos)
		{
			if(A[x].Type == "AD_FLASH")
				htmlL = "<td><A href="+A[x].Link+" target=_blank><embed width="+A[x].W+" height="+A[x].H+" alt="+A[x].Des+" src='"+A[x].Text+"'></embed></A></td>"
			else if(A[x].Type == "AD_JS")
				htmlL = "<td>"+decodeURI(A[x].Text)+"</td>"
			else
				htmlL = "<td><A target=_blank style='COLOR: #000' href="+A[x].Link+"><IMG width="+A[x].W+" height="+A[x].H+" alt="+A[x].Des+" src="+A[x].Text+"></A></td>"
		}
	}
	return htmlL
}
function GetAd(pos)
{
	var html = ''
	
	for(var i = 0; i < A.length; i++)
	{
		if(A[i].Position == pos)
		{
			if(A[i].Type == "AD_FLASH")
				html = "<td align='left'><A href="+A[i].Link+" target=_blank><embed width="+A[i].W+" height="+A[i].H+" alt="+A[i].Des+" src='"+A[i].Text+"'></embed></A></td>"
			else if(A[i].Type == "AD_JS")
				html = "<td align='left'>"+decodeURI(A[i].Text)+"</td>"
			else
				html = "<td align='left'><A href="+A[i].Link+" target=_blank><IMG alt="+A[i].Des+" width="+A[i].W+" height="+A[i].H+" src="+A[i].Text+"></A></td>"
		}
		/*else
		{
			html = "<td align='left'><A href='#'><IMG alt='暂无广告' height='58' width='168' src='pic/nopicture.jpg'></A></td>"
		}*/
	}
	return html
}
function GetAdLi(pos)
{
	var htmlL = ''
	
	for(var x = 0; x < A.length; x++)
	{
		if(A[x].Position == pos)
		{
			if(A[x].Type == "AD_IMG")
			{
				htmlL = "<LI><A target=_blank style='COLOR: #000' href="+A[x].Link+"><IMG alt="+A[x].Des+" src="+A[x].Text+"><STRONG style='COLOR: #000;'>"+A[x].Title+"</STRONG>"+A[x].Des+"</A></LI>"
			}
		}
		/*else
		{
			htmlT = "<LI class=check><A target=_blank style='COLOR: #000' href="+A[i].Link+"><IMG alt='暂无广告' src='pic/nopicture.jpg'><STRONG style='COLOR: #000'>暂无广告</STRONG>暂无广告</A></LI>"
		}*/
	}
	return htmlL
}
function GetIndexAdText(pos)
{
	var htmlT = ''
		
		for(var j = 0; j < A.length; j++)
		{
			if(A[j].Position == pos)
			{
				if(A[j].Type == "AD_IMG")
				{
					htmlT = "<LI class=check><A target=_blank style='COLOR: #000;' href="+A[j].Link+"><IMG alt="+A[j].Des+" src="+A[j].Text+"><STRONG><B style='COLOR: #000;float:left;padding-top:4px;text-overflow:ellipsis;white-space:normal;*white-space:nowrap;overflow:hidden;'>"+A[j].Title+"</B></STRONG></A><span><div style='clear:both;margin-top:-10px;padding-top:2px;margin-left:48px;text-overflow:ellipsis;white-space:normal;*white-space:nowrap;overflow:hidden;'>"+A[j].Des+"</div></span></LI>"
				}
			}
			 
		}
	return htmlT
}
function GetAdText(pos)
{
	var htmlT = ''
	
	for(var j = 0; j < A.length; j++)
	{
		if(A[j].Position == pos)
		{
			if(A[j].Type == "AD_IMG")
			{
				htmlT = "<LI class=check><A target=_blank style='COLOR: #000;' href="+A[j].Link+"><IMG alt="+A[j].Des+" src="+A[j].Text+"><STRONG style='COLOR: #000;margin-bottom:5px'><B>"+A[j].Title+"</B></STRONG></A><span style='height:20px'>"+A[j].Des+"</span></LI>"
			}
		}
		 
	}
	return htmlT
}
function GetAdBySrc(pos,w,h)
{
	var htmlL = ''
	
	for(var x = 0; x < A.length; x++)
	{
		if(A[x].Position == pos)
		{
			htmlL = "<IMG width="+w+" height="+h+" alt="+A[x].Des+" src="+A[x].Text+">"
		}
	}
	return htmlL
}
function GetAdDes(pos)
{
	for(var j = 0; j < A.length; j++)
	{
		if(A[j].Position == pos)
			return A[j].Des
	}
}
function GetAdSrc(pos)
{
	var html = ''
	for(var j = 0; j < A.length; j++)
	{
		if(A[j].Position == pos){
			if(A[j].Type == "AD_FLASH")
				html = "<EMBED src='"+A[j].Text+"' quality=high WIDTH=100 HEIGHT=300 TYPE=application/x-shockwave-flash id=ad wmode=opaque></EMBED>"
			else
				html = "<A href="+A[j].Link+" target=_blank><IMG alt="+A[j].Des+" WIDTH=100 HEIGHT=300 src="+A[j].Text+"></A>"		
		}
	}
	return html
}

function GetAdLiHytem2(style,pos,width,height)
{
	var htmlL = ''
	
	for(var x = 0; x < A.length; x++)
	{
		if(A[x].Position == pos)
		{
			if(A[x].Type == "AD_IMG")
			{
				htmlL = "<LI><A target=_blank style='"+style+"' href='"+A[x].Link+"'><IMG  width='"+width+"' height='"+height+"'  alt='"+A[x].Des+"' src='"+A[x].Text+"'></A></LI>"				
			}
		}
		 
	}
	return htmlL
}


function GetAd2(pos,width,height)
{
	var html = ''
	
	for(var i = 0; i < A.length; i++)
	{
		if(A[i].Position == pos)
		{
			if(A[i].Type == "AD_FLASH")
				html = "<td align='left'><A href="+A[i].Link+" target=_blank><embed width="+width+" height="+height+" alt="+A[i].Des+" src='"+A[i].Text+"'></embed></A></td>"
			else if(A[i].Type == "AD_JS")
				html = "<td align='left'>"+decodeURI(A[i].Text)+"</td>"
			else
				html = "<td align='left'><A href="+A[i].Link+" target=_blank><IMG alt="+A[i].Des+" width="+width+" height="+height+" src="+A[i].Text+"></A></td>"
		}
	}
	return html
}

