<!--#include file="QQ_INC.asp"-->
<%
const Cols=8
const Rows=6


Dim QQCount,qFaceCount
qFaceCount=0
For QQCount= 1 to ubound(QQ)
	if Not IsNull(QQ(QQCount)) and QQ(QQCount)<>"" Then
		qFaceCount=qFaceCount +1
		qFace(qFaceCount)=QQCount
	end if
Next
Dim tPage,Page,tCount,Col,Row,nCount

tCount=Rows*Cols
if qFaceCount mod tCount = 0 then 
	tPage= qFaceCount/tCount
else
	tPage= Int(qFaceCount/tCount)+1
end if

Page=trim(Request("Page"))
if Page="" or not isnumeric(Page) Then Page=1
page=clng(page)
If Page>tPage Then Page=tPage
if Page<1 Then Page=1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<style type="text/css">
<!--
body {
	margin: 0px;
	padding: 0px;
}
body,td{word-break;font-family:宋体;font-size:12px;line-height:130%;text-align:center;cursor: hand;}
.bg1{background-color: #FFFFFF;}
.bg2{background-color: #DEDEDE;}
//-->
</style>

<style type=text/css>
.magicframe{
border:1px solid #CCCCCC;
}
</style>

</head>
<body onselectstart="return false" oncopy="return false;" oncut="return false;"    
onpaste="return false" oncontextmenu="return false"> 

<Div id="MagicFace" Style="POSITION:absolute;Z-INDEX: 99;visibility:hidden; "></Div>
<SCRIPT LANGUAGE="JavaScript">
var nCount
<!--
function MM_showHideLayers() { //v6.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;
  obj=document.getElementById("MagicFace");
  for (i=0; i<(args.length-2); i+=3) if (obj) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function DispMagicEmot(MagicID,H,W){
	
	MagicFaceUrl = 'Face/' +MagicID+ '.swf';
	document.getElementById("MagicFace").innerHTML = '<OBJECT codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="' + W + '" height="' + H + '"><PARAM NAME=movie VALUE="'+ MagicFaceUrl +'"><param name=menu value=false><PARAM NAME=quality VALUE=high><PARAM NAME=play VALUE=false><param name="wmode" value="transparent"><embed src="' + MagicFaceUrl +'" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + W + '" height="' + H + '"></embed>';
	document.getElementById("MagicFace").style.top = (document.body.scrollTop+((document.body.clientHeight-300)/2))+"px";
	document.getElementById("MagicFace").style.left = (document.body.scrollLeft+((document.body.clientWidth-480)/2))+"px";
	document.getElementById("MagicFace").style.visibility = 'visible';
	MagicID += Math.random();
	setTimeout("MM_showHideLayers('MagicFace','','hidden')",8000);
	NowMeID = MagicID;
	}

//DispMagicEmot(325,350,500);
//-->
</SCRIPT>

	<script>
	function closeit()
	{
		setTimeout("self.close()",90000)
	}
	function MM_findObj(n, d)
	{ //
		var p,i,x;
		if(!d) d=document;
		if((p=n.indexOf("?"))>0&&parent.frames.length)
		{
			d=parent.frames[n.substring(p+1)].document; 
			n=n.substring(0,p);
		}
		if(!(x=d[n])&&d.all) x=d.all[n]; 
		for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
		for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); 
		return x;
	}
	function MM_setTextOfTextfield(objName,x,newText)
	{ //
		var obj = MM_findObj(objName);
		if (obj) obj.value = newText;
		opener.document.LeadBBSFm.magicface.value=newText;
		opener.document.faceimg.src='../Service/MAGIC/img/'+newText+'.gif'
		window.close();
	}

	function returnvalue(){
		window.returnValue = 1;
		window.close();
	}
	function cancelPost(){
		window.close();
	}
</script>
<%response.write "<table cellpadding=3  cellspacing=1 bgcolor=""#666666"" align='center' width='100%' height='100%'>"

for Row=0 To Rows-1
	response.write "<tr>"
	for Col=1 to Cols
		nCount=qFaceCount-(Row*Cols + Col + (page-1) * tCount)+1
		if nCount<1 then exit for
		response.write "<td class='bg1' onmouseover=""this.className='bg2';"" onmouseout=""this.className='bg1';"" align='center' ><a href=#1 onClick="&chr(34)&"MM_setTextOfTextfield('magicface',''," & cStr(Right("" & qFace(nCount),3)) & ")"&chr(34)&" onFocus=this.blur()><img src=""Img/" & cStr(Right("" & qFace(nCount),3)) & ".gif"" border=0 alt=""" & QQ(Clng(qFace(nCount))) & """ oncontextmenu=""javascript:DispMagicEmot(" & cStr(Right("" & qFace(nCount),3)) & ",350,500)""></a></td>"
	next
	response.write "</tr>"
next
response.write "<tr height=30><td bgcolor=""#CCCCCC"" colspan=" & COls & "><font color=red>左键选择表情,右键预览表情</font>&nbsp;&nbsp;<a href='?page=1'>首页</a>&nbsp;<a href='?page=" & (page-1) &"'>上页</a>&nbsp;<a href='?page=" & (page+1) &"'>下页</a>&nbsp;<a href='?page=" & tpage &"'>末页</a>&nbsp;&nbsp;[ " & page &" / " & tpage &" ]&nbsp;&nbsp;<font color=red onclick=""window.close();"" title=""关闭窗口""><b>×</b></font></td></tr>"
response.write "</table>"

%>
<SCRIPT LANGUAGE="JavaScript">
document.write(" nCount")
</style>
</body></html>
