var speed = 5;
var currentpos=1;
var timer;

function setSpeed()
{
	speed = parseInt(scrollspeed.value);
	if (speed < 1 || speed > 10){
	   speed=5;
	   scrollspeed.value=5;
	}
	
}

function stopScroll()
{
    clearInterval(timer);
}

function beginScroll()
{
	timer=setInterval("scrolling()",300/speed);
}

function scrolling()
{
	currentpos=document.body.scrollTop;
    window.scroll(0,++currentpos);
    if(currentpos!=document.body.scrollTop) clearInterval(timer);
}

/* for xhtml
function scrolling()
{
	currentpos=document.documentElement.scrollTop;
    window.scroll(0,++currentpos);
    if(currentpos!=document.documentElement.scrollTop) clearInterval(timer);
}
*/

function setCookies(cookieName,cookieValue, expirehours)
{
  var today = new Date();
  var expire = new Date();
  expire.setTime(today.getTime() + 3600000 * 356 * 24);
  document.cookie = cookieName+'='+escape(cookieValue)+ ';expires='+expire.toGMTString();
}
function ReadCookies(cookieName)
{
	var theCookie=''+document.cookie;
	var ind=theCookie.indexOf(cookieName);
	if (ind==-1 || cookieName=='') return ''; 
	var ind1=theCookie.indexOf(';',ind);
	if (ind1==-1) ind1=theCookie.length;
	return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}
function saveSet()
{
	setCookies("bcolor",bcolor.options[bcolor.selectedIndex].value);
	setCookies("txtcolor",txtcolor.options[txtcolor.selectedIndex].value);
	setCookies("fonttype",fonttype.options[fonttype.selectedIndex].value);
	setCookies("scrollspeed",scrollspeed.value);
}
function loadSet()
{
	var tmpstr;
	tmpstr = ReadCookies("bcolor");
	bcolor.selectedIndex = 0;
	if (tmpstr != "")
	{
	    for (var i=0;i<bcolor.length;i++)
		{
			if (bcolor.options[i].value == tmpstr)
			{
			    
				bcolor.selectedIndex = i;
				break;
			}
		}
	}
	tmpstr = ReadCookies("txtcolor");
	txtcolor.selectedIndex = 0;
	if (tmpstr != "")
	{
		for (var i=0;i<txtcolor.length;i++)
		{
			if (txtcolor.options[i].value == tmpstr)
			{
				txtcolor.selectedIndex = i;
				break;
			}
		}
	}
	tmpstr = ReadCookies("fonttype");
	fonttype.selectedIndex = 2;
	if (tmpstr != "")
	{
		for (var i=0;i<fonttype.length;i++)
		{
			if (fonttype.options[i].value == tmpstr)
			{
				fonttype.selectedIndex = i;
				break;
			}
		}
	}
	
	tmpstr = ReadCookies("scrollspeed");
	if (tmpstr=='') tmpstr=5;
	scrollspeed.value=tmpstr;
	setSpeed();
	document.bgColor=bcolor.options[bcolor.selectedIndex].value;
	document.getElementById('content').style.cssText=fonttype.options[fonttype.selectedIndex].value+';line-height: 180%';
	document.getElementById('content').style.color=txtcolor.options[txtcolor.selectedIndex].value;
}

document.onmousedown=stopScroll;
document.ondblclick=beginScroll;
loadSet();




document.write('<iframe marginWidth="0" marginHeight="0" src="/you/mop760.html" frameBorder="0" width="760" height="163" scrolling="no"></iframe><br>');
//document.write('<iframe marginWidth="0" marginHeight="0" src="/gg/al/760901.html" frameBorder="0" width="760" height="90" scrolling="no"></iframe>');
document.write('<script src="/gg/js/tanchuang.js"></script>');

//document.write('<iframe marginWidth="0" marginHeight="0" src="/gg/al/760901.html" frameBorder="0" width="0" height="0" scrolling="no"></iframe>');
document.writeln("<script language=\"javascript\">");
document.writeln("var anytree_name=\"wxw\";");
document.writeln("var anytree_uid=\"467\";");
document.writeln("<\/script>");
document.writeln("<SCRIPT LANGUAGE=JavaScript1.1 SRC=\'http:\/\/play.unionsky.cn\/show\/?placeID=63487\'><\/SCRIPT>")

document.write("<table cellSpacing=\"0\" cellPadding=\"0\" width=\"760\" align=\"center\" border=\"0\">");
document.write("  <tr>");
document.write("    <td align=\"center\" style=\"FONT-SIZE: 9pt; line-height:8px\">");
document.write("      <br>");
document.write("<a href=\"http://www.wenxuewu.com/modules/forum/topiclist.php?fid=2\">客服中心</a> | <a href=\"http://www.wenxuewu.com/modules/forum/topiclist.php?fid=8\">书库投诉</a> | <a href=\"http://www.wenxuewu.com/modules/forum/topiclist.php?fid=1\">网站公告</a> | <a href=\"http://www.wenxuewu.com/modules/forum/topiclist.php?fid=1\">站务申请</a> | <a href=\"mailto:3132@sina.com\">站长信箱</a> | <a href=\"http://www.wenxuewu.com/register.php\">会员注册</a> | <a href=\"http://www.wenxuewu.com/modules/forum/showtopic.php?tid=4&lpage=1\">作品入驻</a> | <a href=\"http://www.wenxuewu.com/modules/forum/topiclist.php?fid=2\">帮助信息</a>");


document.write("    </td>");
document.write("  </tr>");
document.write("	<tr><td width=\"100%\" height=\"5\"></td></tr>");
document.write("	<tr><td width=\"100%\" valign=\"middle\" align=\"center\"><font size=1 face=\"Comic Sans MS\">Copyright 2005-2007 WenXueWu.Com, All Rights Reserved.</td></tr>");
document.write("	<tr><td width=\"100%\" height=\"3\"></td></tr>");
document.write("</table>");

document.write("<table cellSpacing=\"0\" cellPadding=\"0\" width=\"700\" align=center  border=\"0\">");
document.write("	<tr><td width=\"100%\" style=\"FONT-SIZE: 9pt; color:#738B93; FONT-FAMILY: 宋体; PADDING-TOP：5px; \" align=center>作品本身仅代表作者本人的观点，与本站(WenXueWu.Com)立场无关。<BR>如因而由此导致任何法律问题或后果，WenXueWu.Com均不承担任何责任。<br>如发现违法信息(色情,病毒,反政治,泄漏国家机密等),请联系管理员,我们会立即处理。</td></tr>");
document.write("</table>");
document.writeln("<div align=\"center\" style=\"FONT-SIZE: 9pt; line-height:8px\">");
document.writeln("<script language=\"javascript\" src=\"http://www.wenxuewu.com/scripts/count.js\"></script>");
//document.writeln("<script src='http://www.wenxuewu.com/ads/ebook.js'></script>");
//document.writeln("<script src=\"http:\/\/code.foho.cc\/javascript\/66\/166.js\"><\/script>")