﻿type='';
var url=document.URL;
urls_other=url.split('/');
if(typeof(urls_other[4]) != 'undefined')
	type=urls_other[4];
else
	type='';
urls_other_two=url.split('index');
page_tt=urls_other_two[urls_other_two.length-1];
page_tt_tt=page_tt.split(".");
if(page_tt_tt[0]!='')
	curpage=page_tt_tt[0];
else
	curpage=allpage;
page=allpage+1-curpage;
function show_page()
{
	if(allpage>1&&curpage!='')
	{
		showlist=4;
		first=page-showlist;
		end=page+showlist;
		if(first<= 0)
			first=1;
		if(end> allpage)
			end=allpage;
		var url=document.URL;
		/////////////////////////
		show_url=url.split("index");
		first_url=show_url[0];
		uu=url.split("/");
		dizhi=first_url+'index';
		jiewei=".shtml";
		/////////////////////////////////
		if(page!=1&&allpage>1)
		{
			document.write("<font face='宋体'><a href="+dizhi+jiewei+">First</a>&nbsp;");
			ss=parseInt(allpage-page+2);
			if(ss==allpage)
				ss='';
			document.write("<a href='"+dizhi+ss+jiewei+"'>Prev</a>&nbsp;</font>");
		}
		for(i=first;i<=end;i++)
		{
			ss=parseInt(allpage+1-i);
			if(ss==allpage)
				ss='';
			if(i==page)
				document.write('<a href="'+dizhi+ss+jiewei+'"><B>'+i+'</B></a>&nbsp;');
			else
				document.write("<a href='"+dizhi+ss+jiewei+"'>"+i+"</a>&nbsp;");
		}
		if(page < allpage &&page>=1)
		{
			ss=parseInt(allpage-page);
			if(ss==allpage)
				ss='';
			document.write("<font face='宋体'><a href='"+dizhi+ss+jiewei+"'>Next</a>&nbsp;");
			document.write("<a href='"+dizhi+'1'+jiewei+"'>Last</a>&nbsp;</font>");
		}
	}
}
function show_caidan()
{
	typename=eval("message_"+type);
	document.write (' <a href="/message/'+type+'/index.shtml">'+typename+'</a>');
	var url=document.URL;
	urls=url.split(type);
	if(urls.length==2)		//表示还有上一级
	{
		lx0=urls[1].split("index_");
		if(lx0.length==2)
		{
			lx=lx0[1].substr(0,6);
			if(lx.substr(0,2)!='00')
			{
				first_type=eval("message_"+type+"_"+lx.substr(0,2)+"0000");
				document.write ('- > <a href="index_'+lx.substr(0,2)+'0000.shtml">'+first_type+'</a>');
			}
			if(lx.substr(2,2)!='00')
			{
				sencon_type=eval("message_"+type+"_"+lx.substr(0,4)+"00");
				document.write ('- > <a href="index_'+lx.substr(0,4)+'00.shtml">'+sencon_type+'</a>');
			}
			if(lx.substr(4,2)!='00')
			{
				first_type=eval("message_"+type+"_"+lx);
				document.write ('- > <a href="index.shtml">'+first_type+'</a>');
			}
		}
		else
		{
				lx1=urls[1].split("index");
				lx=lx1[0].substr(1,6);
				if(lx!=''&&lx.substr(0,2)!='00')
				{
					first_type=eval("message_"+type+"_"+lx.substr(0,2)+"0000");
					document.write ('- > <a href="../index_'+lx.substr(0,2)+'0000.shtml">'+first_type+'</a>');
				}
				if(lx!=''&&lx.substr(2,2)!='00')
				{
					sencon_type=eval("message_"+type+"_"+lx.substr(0,4)+"00");
					document.write ('- > <a href="../index_'+lx.substr(0,4)+'00.shtml">'+sencon_type+'</a>');
				}
				if(lx!=''&&lx.substr(4,2)!='00')
				{
					first_type=eval("message_"+type+"_"+lx);
					document.write ('- > <a href="index.shtml">'+first_type+'</a>');
				}
		}
	}
}
