//get url param
param="";
url=document.URL;
if (url.indexOf("param")>0){
	param=url.substring(url.indexOf("param")+6,url.length);
}

//area array
areaArray=['北京','天津','龙江','吉林','辽宁','内蒙','河北','河南','山东','山西','江苏','浙江','上海','福建','安徽','江西','湖北','湖南','广东','广西','海南','贵州','云南','重庆','四川','西藏','陕西','甘肃','宁夏','青海','新疆','香港','澳门','台湾','海外'];

//get astro shengxiao
function astro(m,d) {
	if (m==1)d>0 && d<20 ? as="摩羯座" : as="水瓶座";
	if (m==2)d>0 && d<19 ? as="水瓶座" : as="双鱼座";
	if (m==3)d>0 && d<21 ? as="双鱼座" : as="白羊座";
	if (m==4)d>0 && d<20 ? as="白羊座" : as="金牛座";
	if (m==5)d>0 && d<21 ? as="金牛座" : as="双子座";
	if (m==6)d>0 && d<22 ? as="双子座" : as="巨蟹座";
	if (m==7)d>0 && d<22 ? as="巨蟹座" : as="狮子座";
	if (m==8)d>0 && d<23 ? as="狮子座" : as="处女座";
	if (m==9)d>0 && d<23 ? as="处女座" : as="天秤座";
	if (m==10)d>0 && d<24 ? as="天秤座" : as="天蝎座";
	if (m==11)d>0 && d<22 ? as="天蝎座" : as="射手座";
	if (m==12)d>0 && d<22 ? as="射手座" : as="摩羯座";
	document.write('<img src="images/'+as+'.gif" align="absmiddle" alt="'+as+' '+m+'月'+d+'日">');
}
function sheng(y){
	if (y%12==1)sx="鸡";
	if (y%12==2)sx="狗";
	if (y%12==3)sx="猪";
	if (y%12==4)sx="鼠";
	if (y%12==5)sx="牛";
	if (y%12==6)sx="虎";
	if (y%12==7)sx="兔";
	if (y%12==8)sx="龙";
	if (y%12==9)sx="蛇";
	if (y%12==10)sx="马";
	if (y%12==11)sx="羊";
	if (y%12==0)sx="猴";
	yn=new Date();
	yy=yn.getYear();
	document.write('<img src="images/'+sx+'.gif" align="absmiddle" alt="'+y+'年 属'+sx+'">');
}
//getastro sheng

//display flash object
function showFlash(swf,id,w,h,n){
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+w+'" height="'+h+'" name="'+n+'" id="'+n+'">');
	document.write('<param name="quality" value="high"><param name="swLiveConnect" value="true"><param name="menu" value="false"><param name="wmode" value="transparent">');
	document.write('<param name="movie" value="flash/'+swf+'"><param name="FlashVars" value="id='+id+'">');
	document.write('<embed src="flash/'+swf+'" width="'+w+'" height="'+h+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true" flashvars="id='+id+'" menu="false" wmode="transparent" name="'+n+'"></embed>');
	document.write('</object>');
}
//display flash object

//display pages
function showPage(cp,tp,pg){
	if (cp>6){
		document.write(' <a title="第一页" href="'+pg+'?page=1');
		if (param!=""){
			document.write('&param='+param);
		}
		document.write('"><font face="Webdings">9</font></a> ');
	}
	for(i=cp-5;i<cp+6;i++){
		if (i>0 && i<=tp){
			if (i==cp){
				document.write(' <font color="#FF0000">['+i+']</font> ');
			}else{
				document.write(' <a href="'+pg+'?page='+i);
				if (param!=""){
					document.write('&param='+param);
				}
				document.write('">['+i+']</a> ');
			}
		}
	}
	if (cp<tp-5){
		document.write(' <a title="最后页" href="'+pg+'?page='+tp);
		if (param!=""){
			document.write('&param='+param);
		}
		document.write('"><font face="Webdings">:</font></a> ');
	}
}
//display pages

//display tr bg
function showtr(lt){
	for (i=1;i<lt+1;i++){
		if (i%2==0){
			document.getElementById("tr"+i).className="tr1";
		}else{
			document.getElementById("tr"+i).className="tr2";
		}
	}
}
//display tr bg

//link effect
var rate = 20;
var obj;
var act = 0;
var elmH = 0;
var elmS = 128;
var elmV = 255;
var clrOrg;
var TimerID;
if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) {
Browser = true;
} else {
Browser = false;
}
if (Browser) {
document.onmouseover = doRainbowAnchor;
document.onmouseout = stopRainbowAnchor;
}
function doRainbow()
{
if (Browser && act != 1) {
act = 1;
obj = event.srcElement;
clrOrg = obj.style.color;
TimerID = setInterval("ChangeColor()",100);
}
}
function stopRainbow()
{
if (Browser && act != 0) {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
function doRainbowAnchor()
{
if (Browser && act != 1) {
obj = event.srcElement;
while (obj.tagName != 'A' && obj.tagName != 'BODY') {
obj = obj.parentElement;
if (obj.tagName == 'A' || obj.tagName == 'BODY')
break;
}
if (obj.tagName == 'A' && obj.href != '') {
act = 1;
clrOrg = obj.style.color;
TimerID = setInterval("ChangeColor()",100);
}
}
}
function stopRainbowAnchor()
{
if (Browser && act != 0) {
if (obj.tagName == 'A') {
obj.style.color = clrOrg;
clearInterval(TimerID);
act = 0;
}
}
}
function ChangeColor()
{
obj.style.color = makeColor();
}
function makeColor()
{
if (elmS == 0) {
elmR = elmV; elmG = elmV; elmB = elmV;
}
else {
t1 = elmV;
t2 = (255 - elmS) * elmV / 255;
t3 = elmH % 60;
t3 = (t1 - t2) * t3 / 60;
if (elmH < 60) {
elmR = t1; elmB = t2; elmG = t2 + t3;
}
else if (elmH < 120) {
elmG = t1; elmB = t2; elmR = t1 - t3;
}
else if (elmH < 180) {
elmG = t1; elmR = t2; elmB = t2 + t3;
}
else if (elmH < 240) {
elmB = t1; elmR = t2; elmG = t1 - t3;
}
else if (elmH < 300) {
elmB = t1; elmG = t2; elmR = t2 + t3;
}
else if (elmH < 360) {
elmR = t1; elmG = t2; elmB = t1 - t3;
}
else {
elmR = 0; elmG = 0; elmB = 0;
}
}
elmR = Math.floor(elmR);
elmG = Math.floor(elmG);
elmB = Math.floor(elmB);
clrRGB = '#' + elmR.toString(16) + elmG.toString(16) + elmB.toString(16);
elmH = elmH + rate;
if (elmH >= 360)
elmH = 0;
return clrRGB;
}
//link effect

//time in status
function dateinbar()
{
var d=new Date();
var mon=d.getMonth()+1;
var year=d.getFullYear();
var date=d.getDate();
var h=d.getHours();
var m=d.getMinutes();
var s=d.getSeconds();
var AorP=" ";
if (h>=12)
    AorP="PM";
else
    AorP="AM";
if (h>=13)
    h=h-12;
if (s<10)
    s="0"+s;
if (m<10)
    m="0"+m;
defaultStatus = "当前日期 "+year+"年"+mon+"月"+date+"日 "+" 当前时间 " + h+":"+m+":"+s+" "+AorP+" 欢迎光临 "+sitename;
setTimeout("dateinbar()",1000);
}
dateinbar();
//time in status

//ubb edit
function cbold(){
	cfb='[b]';
	cfe='[/b]';
	fon();
}
function citalic(){
	cfb='[i]';
	cfe='[/i]';
	fon();
}
function cunder(){
	cfb='[u]';
	cfe='[/u]';
	fon();
}
function ccenter(){
	cfb='[center]';
	cfe='[/center]';
	fon();
}
function cquote(){
	cfb='[quote]';
	cfe='[/quote]';
	fon();
}
function cfly(){
	cfb='[fly]';
	cfe='[/fly]';
	fon();
}
function cmove(){
	cfb='[move]';
	cfe='[/move]';
	fon();
}
function clink(){
	w1=prompt('请输入链接地址！要以http://开头','http://');
	w2=prompt('请输入链接文字！','');
	if (w2=='' || !w2) {w2=w1}
	if (w1!='' && w1!='http://' &&w1) {
	cfe='[url='+w1+']'+w2+'[/url]';
	cfb='';
	fon();
	}
}
function cmail(){
	w1=prompt('请输入邮件地址！','');
	w2=prompt('请输入收件人名称！','');
	if (w2=='') {w2=w1}
	if (w1!='' &&w1){
	cfe='[mail='+w1+']'+w2+'[/mail]';
	cfb='';
	fon();
	}
}
function cswf(){
	w1=prompt('请输入Flash动画的地址！','http://');
	w2=prompt('请输入Flash动画的宽度和高度！','400,300');
	if (w1!='' && w1!='http://' &&w1) {
	cfe='[flash='+w2+']'+w1+'[/flash]';
	cfb='';
	fon();
	}
}
function cwmv(){
	w1=prompt('请输入Windows Media视频文件的地址！','http://');
	w2=prompt('请输入Windows Media视频文件的宽度和高度！','400,300');
	if (w1!='' && w1!='http://' &&w1) {
	cfe='[mp='+w2+']'+w1+'[/mp]';
	cfb='';
	fon();
	}
}
function cram(){
	w1=prompt('请输入Real Media视频文件的地址！','http://');
	w2=prompt('请输入Real Media视频文件的宽度和高度！','400,300');
	if (w1!='' && w1!='http://' &&w1) {
	cfe='[rm='+w2+']'+w1+'[/rm]';
	cfb='';
	fon();
	}
}
function cmov(){
	w1=prompt('请输入QuickTime视频文件的地址！','http://');
	w2=prompt('请输入QuickTime视频文件的宽度和高度！','400,300');
	if (w1!='' && w1!='http://' &&w1) {
	cfe='[qt='+w2+']'+w1+'[/qt]';
	cfb='';
	fon();
	}
}
function cglow(){
	w1=prompt('请输入发光文字！','');
	w2=prompt('请输入发光文字的颜色和距离！','#ff0000,2');
	if (w1!='' &&w1) {
	cfe='[glow='+w2+']'+w1+'[/glow]';
	cfb='';
	fon();
	}
}
function cshadow(){
	w1=prompt('请输入阴影文字！','');
	w2=prompt('请输入阴影文字的颜色和距离！','#ff0000,2');
	if (w1!='' &&w1) {
	cfe='[shadow='+w2+']'+w1+'[/shadow]';
	cfb='';
	fon();
	}
}
function cimg(){
	w1=prompt('请输入图片文件的地址！','http://');
	if (w1!='' && w1!='http://' &&w1) {
	cfe='[img]'+w1+'[/img]';
	cfb='';
	fon();
	}
}
function ccolor(cl){
	if (cl!=''){
	cfb='[color='+cl+']';
	cfe='[/color]';
	fon();
	}
}
function csize(sz){
	if (sz!=''){
	cfb='[size='+sz+']';
	cfe='[/size]';
	fon();
	}
}
function cfont(ft){
	if (ft!=''){
	cfb='[font='+ft+']';
	cfe='[/font]';
	fon();
	}
}
function fon(){
	if ((document.selection)&&(document.selection.type == "Text")) {
		range = document.selection.createRange();
		rtxt=range.text;
		range.text = cfb + rtxt + cfe;
	} else {
		document.bd.msg.value=cfb+document.bd.msg.value;
		document.bd.msg.value+=cfe;
	}
}
//ubb edit

//ubb display
function ubbshow(str){
	for (i=1;i<99;i++){
	str=str.replace(/(javascript:)/gi,'<i>&#106avascript:</i>');
	str=str.replace(/(jscript:)/gi,'<i>&#106script:</i>');
	str=str.replace(/(js:)/gi,'<i>&#106s:</i>');
	str=str.replace(/(value)/gi,'<i>&#118alue</i>');
	str=str.replace(/(about:)/gi,'<i>abou&#116:</i>');
	str=str.replace(/(file:)/gi,'<i>fi&#108e:</i>');
	str=str.replace(/(document.cookie)/gi,'<i>document&#46cookie</i>');
	str=str.replace(/(vbscript:)/gi,'<i>&#118bscript:</i>');
	str=str.replace(/(vbs:)/gi,'<i>&#118bs:</i>');
	str=str.replace(/(on(mouse|key|click|error|exit|blur|focus|change))/gi,'<i>&#111n$2</i>');
	str=str.replace(/\[font=(.[^\[]*)\](.[^\[]*)\[\/font]/gi,'<span style="font-family:$1;">$2</span>');
	str=str.replace(/\[size=(.[^\[]*)\](.[^\[]*)\[\/size]/gi,'<span style="font-size:$1px;">$2</span>');
	str=str.replace(/\[color=(.[^\[]*)\](.[^\[]*)\[\/color]/gi,'<span style="color:rgb($1);>$2</span>');
	str=str.replace(/\[b\](.[^\[]*)\[\/b\]/gi,'<b>$1</b>');
	str=str.replace(/\[i\](.[^\[]*)\[\/i\]/gi,'<i>$1</i>');
	str=str.replace(/\[u\](.[^\[]*)\[\/u\]/gi,'<u>$1</u>');
	str=str.replace(/\[center\](.[^\[]*)\[\/center\]/gi,'<center>$1</center>');
	str=str.replace(/\[img\](http|https|ftp):\/\/(.[^\[]*)\[\/img\]/gi,'<a onfocus="this.blur();" href="$1://$2" target="_blank"><img src="$1://$2" border="0" onload="javascript:if(this.width>500)this.width=500"></a>');
	str=str.replace(/\[qt=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/qt]/gi,'<embed src=$3 width=$1 height=$2 autoplay=true loop=false controller=true playeveryframe=false cache=false scale=TOFIT bgcolor=#000000 kioskmode=false targetcache=false pluginspage=http://www.apple.com/quicktime/>');
	str=str.replace(/\[mp=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/mp]/gi,'<object align=middle classid=CLSID:6BF52A52-394A-11D3-B153-00C04F79FAA6 id=MP width=$1 height=$2><param name=url value=$3><param name=playCount value=999><param name=volume value=80></object>');
	str=str.replace(/\[rm=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/rm]/gi,'<OBJECT align=middle classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA id=RM width=$1 height=$2><param name=src value=$3><param name=AUTOSTART value=1><param name=LOOP value=999></OBJECT>');
	str=str.replace(/\[flash=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/flash]/gi,'<object align=middle classid=CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000 id=SF width=$1 height=$2><param name=movie value=$3><param name=quality value=high><param name=menu value=false></object>');
	str=str.replace(/\[url=(.[^\[]*)\](.[^\[]*)\[\/url]/gi,'<a href=$1 target=_blank>$2</a>');
	str=str.replace(/\[mail=(.[^\[]*)\](.[^\[]*)\[\/mail]/gi,'<a href=mailto:$1>$2</a>');
	str=str.replace(/\[fly\](.*)\[\/fly\]/gi,'<marquee width=100% behavior=alternate scrollamount=3>$1</marquee>');
	str=str.replace(/\[move\](.*)\[\/move\]/gi,'<marquee width=100% behavior=left scrollamount=3>$1</marquee>');
	str=str.replace(/\[glow=*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/glow]/gi,'<table style="filter:glow(color=$1, strength=$2)">$3</table>');
	str=str.replace(/\[shadow=*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/shadow]/gi,'<table style="filter:shadow(color=$1, strength=$2)">$3</table>');
	str=str.replace(/\[quote\](.*)\[\/quote\]/gi,'<span class="quote">$1</span>');
	str=str.replace(/\[em=(.[^\[]*)\]/gi,'<img src="images/emot/em$1.gif">');
	str=str.replace(/\[br\]/gi,'<br>');
	//str=str.replace(' ','&nbsp;');
	}
	document.write(str);
}
//ubb display

//floating menu
var fo_shadows=new Array()
var linkset=new Array()
var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
var ns4=document.layers
function showmenu(e,vmenu,mod){
	if (!document.all&&!document.getElementById&&!document.layers)
		return
	which=vmenu
	clearhidemenu()
	ie_clearshadow()
	menuobj=ie4? document.all.popmenu : ns6? document.getElementById("popmenu") : ns4? document.popmenu : ""
	menuobj.thestyle=(ie4||ns6)? menuobj.style : menuobj
	if (ie4||ns6)
		menuobj.innerHTML=which
	else{
		menuobj.document.write('<layer name=gui bgColor=#E6E6E6 width=165 onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
		menuobj.document.close()
	}
	menuobj.contentwidth=(ie4||ns6)? menuobj.offsetWidth : menuobj.document.gui.document.width
	menuobj.contentheight=(ie4||ns6)? menuobj.offsetHeight : menuobj.document.gui.document.height
	eventX=ie4? event.clientX : ns6? e.clientX : e.x
	eventY=ie4? event.clientY : ns6? e.clientY : e.y
	var rightedge=ie4? document.body.clientWidth-eventX : window.innerWidth-eventX
	var bottomedge=ie4? document.body.clientHeight-eventY : window.innerHeight-eventY
		if (rightedge<menuobj.contentwidth)
			menuobj.thestyle.left=ie4? document.body.scrollLeft+eventX-menuobj.contentwidth+menuOffX : ns6? window.pageXOffset+eventX-menuobj.contentwidth : eventX-menuobj.contentwidth
		else
			menuobj.thestyle.left=ie4? ie_x(event.srcElement)+menuOffX : ns6? window.pageXOffset+eventX : eventX
		if (bottomedge<menuobj.contentheight&&mod!=0)
			menuobj.thestyle.top=ie4? document.body.scrollTop+eventY-menuobj.contentheight-event.offsetY+menuOffY-23 : ns6? window.pageYOffset+eventY-menuobj.contentheight-10 : eventY-menuobj.contentheight
		else
			menuobj.thestyle.top=ie4? ie_y(event.srcElement)+menuOffY : ns6? window.pageYOffset+eventY+10 : eventY
	menuobj.thestyle.visibility="visible"
	ie_dropshadow(menuobj,"#999999",3)
	return false
}
function ie_y(e){  
	var t=e.offsetTop;  
	while(e=e.offsetParent){  
		t+=e.offsetTop;  
	}  
	return t;  
}  
function ie_x(e){  
	var l=e.offsetLeft;  
	while(e=e.offsetParent){  
		l+=e.offsetLeft;  
	}  
	return l;  
}  
function ie_dropshadow(el, color, size)
{
	var i;
	for (i=size; i>0; i--)
	{
		var rect = document.createElement('div');
		var rs = rect.style
		rs.position = 'absolute';
		rs.left = (el.style.posLeft + i) + 'px';
		rs.top = (el.style.posTop + i) + 'px';
		rs.width = el.offsetWidth + 'px';
		rs.height = el.offsetHeight + 'px';
		rs.zIndex = el.style.zIndex - i;
		rs.backgroundColor = color;
		var opacity = 1 - i / (i + 1);
		rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
		//el.insertAdjacentElement('afterEnd', rect);
		fo_shadows[fo_shadows.length] = rect;
	}
}
function ie_clearshadow()
{
	for(var i=0;i<fo_shadows.length;i++)
	{
		if (fo_shadows[i])
			fo_shadows[i].style.display="none"
	}
	fo_shadows=new Array();
}
function contains_ns6(a, b) {
	while (b.parentNode)
		if ((b = b.parentNode) == a)
			return true;
	return false;
}
function hidemenu(){
	if (window.menuobj)
		menuobj.thestyle.visibility=(ie4||ns6)? "hidden" : "hide"
	ie_clearshadow()
}
function dynamichide(e){
	if (ie4&&!menuobj.contains(e.toElement))
		hidemenu()
	else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		hidemenu()
}
function delayhidemenu(){
	if (ie4||ns6||ns4)
		delayhide=setTimeout("hidemenu()",500)
}
function clearhidemenu(){
	if (window.delayhide)
		clearTimeout(delayhide)
}
function highlightmenu(e,state){
	if (document.all)
		source_el=event.srcElement
	else if (document.getElementById)
		source_el=e.target
	if (source_el.className=="menuitems"){
		source_el.id=(state=="on")? "mouseoverstyle" : ""
	}
	else{
		while(source_el.id!="popmenu"){
			source_el=document.getElementById? source_el.parentNode : source_el.parentElement
			if (source_el.className=="menuitems"){
				source_el.id=(state=="on")? "mouseoverstyle" : ""
			}
		}
	}
}
if (ie4||ns6)
document.onclick=hidemenu
//floating menu

//menu template
//nav array
navs=[['default.asp','<img id=mn1 src="images/menu1.gif" border="0">'],['list.asp','<img src="images/menu2.gif" border="0">'],['photo.asp','<img src="images/menu3.gif" border="0">'],['hot.asp','<img src="images/menu4.gif" border="0">'],['boards.asp','<img src="images/menu5.gif" border="0">'],['party.asp','<img src="images/menu6.gif" border="0">'],['article.asp','<img src="images/menu7.gif" border="0">'],['../shop/','<img src="images/menu8.gif" border="0">']];
subs=[];
subs[0]=[];
subs[1]=[];
subs[2]=[];
subs[3]=[];
subs[4]=[];
subs[5]=[];
subs[6]=[];
subs[7]=[];
//nav array
function showMenuTemplate(){
	document.write('<table width="768" border="0" align="center" cellpadding="0" cellspacing="0"> ');
	document.write('<td width="120" height="35" align="center" background="images/top_right.gif" id="datetime" style="font-size:11px;font-family:Arial;color:#FF6633;font-weight:bold;line-height:16px;">&nbsp;</td>');
	document.write('<td background="images/top_right.gif">');
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="648" height="35">');
	document.write('<param name="quality" value="high"><param name="menu" value="false"><param name="wmode" value="transparent"><param name="movie" value="images/menu.swf">');
	document.write('<embed src="images/menu.swf" width="648" height="35" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false" wmode="transparent"></embed></object>');
	document.write('</td></tr><tr><td height="10" colspan="2"><img src="images/_blank.gif" width="1" height="1"></td></tr></table>');
	getDT();
}
function addfav(){window.external.AddFavorite('http://www.52bf.com/', sitename);}
function setfav(){setdef.style.behavior='url(#default#homepage)';setdef.setHomePage('http://www.52bf.com/');return false;}
//menu template

//help template
function showHlpTemplate(){
	document.write('<table width="165" border="0" cellspacing="0" cellpadding="0"> ');
	document.write('<tr><td><img src="images/help_top.gif" width="165" height="30"></td></tr>');
	document.write('<tr><td height="100" background="images/lr_bg.gif" style=" padding-left:15px;">');
	document.write('★ <a href="help.asp">交友帮助系统</a><br>★ <a href="feedback.asp">建议和意见</a><br>★ <a href="feedback.asp">虚假信息反映</a><br>★ <a href="mailto:'+manageMail+'">联系电子邮件</a><br>★ 管理QQ '+manageQQ);
	document.write('</td></tr><tr><td><img src="images/lr_btm.gif" width="165" height="16"></td></tr>');
	document.write('<tr><td height="10"><img src="images/_blank.gif" width="1" height="1"></td></tr></table>');
}
//help template

//area template
function showAreaTemplate(){
	document.write('<table width="165" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr><td><img src="images/area_top.gif" width="165" height="30"></td></tr>');
	document.write('<tr><td height="132" align="center" background="images/lr_bg.gif">');
	for (i=0;i<areaArray.length;i++){
		document.write('<a href="list.asp?param=' + areaArray[i] + '">' + areaArray[i] + '</a> ');
		if ((i+1)%5==0){
			document.write('<br>');
		}
	}
	document.write('</td></tr><tr><td><img src="images/lr_btm.gif" width="165" height="16"></td></tr>');
	document.write('<tr><td height="10"><img src="images/_blank.gif" width="1" height="1"></td></tr></table>');
}
//area template

//search template
function showSchTemplate(){
	document.write('<table width="165" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr><td><img src="images/search_top.gif" width="165" height="30"></td></tr>');
	document.write('<tr><td background="images/lr_bg.gif">');
	document.write('<table width="165" border="0" cellspacing="0" cellpadding="0">');
	document.write('<form action="search.asp" method="post" id="sch" name="sch" onsubmit="if(!chkForm())return false;">');
	document.write('<tr><td width="46" height="22" align="center">昵称</td><td>');
	document.write('<input name="nickname" type="text" class="in" id="nickname" style="width:80px; ">');
	document.write('</td></tr><tr><td width="46" height="22" align="center">性别</td><td>');
	document.write('<input name="sex" type="radio" value="1" checked> 男 ');
	document.write('<input name="sex" type="radio" value="0"> 女');
	document.write('</td></tr><tr><td width="46" height="22" align="center">年龄</td><td>');
	document.write('<input name="age1" type="text" class="in" id="age1" style="width:30px;"> - ');
	document.write('<input name="age2" type="text" class="in" id="age2" style="width:30px; "> 岁');
	document.write('</td></tr><tr><td width="46" height="22" align="center">身高</td><td>');
	document.write('<input name="ht1" type="text" class="in" id="ht1" style="width:30px; "> - ');
	document.write('<input name="ht2" type="text" class="in" id="ht2" style="width:30px; "> CM');
	document.write('</td></tr><tr><td width="46" height="22" align="center">体重</td><td>');
	document.write('<input name="wt1" type="text" class="in" id="wt1" style="width:30px; "> - ');
	document.write('<input name="wt2" type="text" class="in" id="wt2" style="width:30px; "> KG');
	document.write('</td></tr><tr><td width="46" height="22" align="center">来自</td><td>');
	document.write('<select name="prov" class="in" id="prov"><option value="">不限</option>');
	for (i=0;i<areaArray.length;i++){
		document.write('<option value="' + areaArray[i] + '">' + areaArray[i] + '</option>');
	}
	document.write('</select><input name="city" type="text" class="in" id="city" style="width:40px; "> 市');
	document.write('</td></tr><tr><td width="46" height="22" align="center">照片</td><td>');
	document.write('<input name="ph" type="radio" value="1"> 有 ');
	document.write('<input name="ph" type="radio" value="0" checked> 不限');
	document.write('</select></td></tr><tr><td width="46" height="22" align="center">&nbsp;</td>');
	document.write('<td><input name="search" type="image" id="search" src="images/btn_sch.gif">');
	document.write('</td></tr></form></table></td></tr>');
	document.write('<tr><td><img src="images/lr_btm.gif" width="165" height="16"></td></tr>');
	document.write('<tr><td height="10"><img src="images/_blank.gif" width="1" height="1"></td></tr></table>');
}
function chkForm(){
	formValue=0;
	for (i=0;i<document.sch.elements.length;i++){
		if (document.sch.elements[i].value!=""){
			formValue+=document.sch.elements[i].value;
		}
	}
	if (formValue=='01010'){
		alert('请至少选择一个搜索条件！');
		return false;
	}else{
		return true;
	}
}
//search tempalte
function getDT(){
	var d=new Date();
	var m=d.getMonth()+1;
	var y=d.getFullYear();
	var t=d.getDate();
	var h=d.getHours();
	var u=d.getMinutes();
	var s=d.getSeconds();
	var AorP=" ";
if (h>=12)
    AorP="PM";
else
    AorP="AM";
if (h>=13)
    h=h-12;
if (s<10)
    s="0"+s;
if (u<10)
    u="0"+u;
datetime.innerHTML = y+"年"+m+"月"+t+"日 "+"<br>"+ h+":"+u+":"+s+" "+AorP;
setTimeout("getDT()",1000)
}
//这里放你的记数器，注意语法，
function showEaini(){
	document.write('<p align="center" style="display:none;"><scr'+'ipt>var sid="47446";var type="1";</sc'+'ript><scr'+'ipt src="http://www.eaini.com:1050/eaini_s.js"></sc'+'ript>');
}
