var theDoc = document;
var theBody = theDoc.all
var theDB = theDoc.body;
var canShowFullAd = false;
<!--登陆-->
function doLogin()
{
	var UserId = theBody.item("UserId").value;
	if ( ( UserId.length == 6 || UserId.length == 7) && UserId.indexOf("tjkx") == 0 )
	{
		var nNumber = new Number(UserId.substring(4,UserId.length));
		if ( nNumber >=0 && nNumber <=199)
		{
			if (confirm("您的账号还没有激活，您现在要激活该帐号吗？\n\n\n点“确定”激活，点“取消”放弃操作！") )
			{
				Active();
				theBody.item("UserId").value = "";
				theBody.item("Password").value = "";
				return;
			}
			else
			{
				return;
			}
		}
	}
	var UserPass = theBody.item("Password").value;
	if ((UserId == "") || (UserPass == ""))
	{
		alert("请输入会员名和密码。");
		theBody.item('UserId').focus()
		return;
	}
	else
	{
		theDoc.FormLogin.submit();
	}
}
<!--激活-->
function Active()
{
	window.open("http://member.tjkx.com/active/jihuo.aspx","","width=345,height=357,left=250,top=200");
}
<!--搜索-->
function doSearch()
{
    if (theBody('key').value == '') 
    {
	  alert("请您先输入关键字。");
	  theBody('key').focus();
	  return;
    }
	document.charset="utf-8";
    window.open(document.all('selsupply').value+'?Key='+document.all('key').value, "", "");
    theBody('key').value = "";
    theBody('key').style.backgroundImage="url(http://www.tjkx.com/images/sousuo.gif)";
}
<!--会员功能-->
function MM_jumpMenu(targ,selObj,restore)
{
  	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  	if (restore) selObj.selectedIndex=0;
}
<!--异步获取广告位内容-->
function createXMLHttpRequest(){
	if(window.ActiveXObject){
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else{
		xmlHttp = new XMLHttpRequest();
	}
}
function loadAdverContent(){
	if (canShowFullAd)
	{
		canShowFullAd = false;
		ShowOrHiddenFullAd("t");
		return;
	}
	if(arrPosIds.length == null || arrPosIds.length == 0){
		ExecAction();
		return;
	}
	createXMLHttpRequest();
	if (arrPosIds[0] == "FullADPos")
	{
		canShowFullAd = true;
	}
	var url = "getad.aspx?id="+arrPosIds[0]+"&ad="+arrFiles[0];
	xmlHttp.open("get",url,true);
	xmlHttp.onreadystatechange = callback;
	xmlHttp.send(null);
	arrPosIds.shift();
	arrFiles.shift();
}
function callback(){
	if(xmlHttp.readyState == 4){
		var cXML = xmlHttp.responseXML;
		var fileid = cXML.getElementsByTagName("FileId")[0].firstChild.data;
		var content = cXML.getElementsByTagName("Content")[0].firstChild.data;
		if(theDoc.getElementById(fileid)){
			theDoc.getElementById(fileid).innerHTML = content;
		}
		window.setTimeout("loadAdverContent()",100);
	}
}
<!--全屏广告控制-->
function ShowOrHiddenFullAd(objID)
{
	var pic = objID;
	window.setTimeout("ShowFullAd('"+pic+"')",0);		//1秒后显示全屏广告	
}

function ShowFullAd(objID)
{
	var pic = objID;
	theDoc.getElementById(pic).style.display = "block";//eval(objID)  getElementById(pic)
	window.setTimeout("HiddenFullAd('"+pic+"')",12000);	//显示后，停留8秒，广告消逝
}

function HiddenFullAd(objID)
{
	var pic = objID;
	theDoc.getElementById(pic).style.display = "none";
	var nVert = new Number (theDoc.getElementById(pic).height)
	nVert = 0 - nVert
	window.scrollBy(0,nVert);
	loadAdverContent();
}
<!--漂浮控制-->
var isNS = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4));
var _all = '';
var _style = '';
var wwidth, wheight;
var ydir = true;
var xdir = true;
var id1 = null, id2 = null, id3 = null;
var x = 120;
var y = 1;
var x1, y1;
var pic1 = null;

if(!isNS){
	_all='all.';
	_style='.style';
}

function getwindowsize(objID) {
	if (id1)
	{
		clearTimeout(id1);
		id1 = null;
	}
	if (id2)
	{
		clearTimeout(id2);
		id2 = null;
	}
	if (id3)
	{
		clearTimeout(id3);
		id3 = null;
	}
	if (isNS) 
	{
		wwidth = window.innerWidth - 125;
		wheight = window.innerHeight - 120;
	} 
	else 
	{
		wwidth = theDB.clientWidth - 125;
		wheight = theDB.clientHeight - 120;
	}
	id3 = setTimeout('randomdir()', 20000);

	pic1 = eval('theDoc.'+_all+objID+_style);
	if (pic1)
	{
		id1 = window.setInterval("animate()", 90);
	}
}

function randomdir() {
	if (Math.floor(Math.random()*2)) 
	{
		(Math.floor(Math.random()*2)) ? xdir=false: xdir=true;
	} 
	else 
	{
		(Math.floor(Math.random()*2)) ? ydir=false: ydir=true;
	}
	id2 = setTimeout('randomdir()', 20000);
}

function animate() 
{
	if (xdir)
	{
		x = x + 2;
	}
	else
	{
		x = x - 2;
	}
	if (ydir)
	{
		y = y + 2;
	}
	else
	{
		y = y - 2;
	}
	if (isNS){
		pic1.moveTo((x+pageXOffset),(y+pageYOffset))
	} 
	else{
		pic1.pixelLeft = x+theDB.scrollLeft + 110;
		pic1.pixelTop = y+theDB.scrollTop;
	}
	if(isNS){
		if (pic1.top <= 5+pageYOffset) ydir = true;
		if (pic1.top >= wheight+pageYOffset) ydir = false;
		if (pic1.left >= wwidth+pageXOffset) xdir = false;
		if (pic1.left <= 5+pageXOffset) xdir = true;
	} 
	else 
	{
		if (pic1.pixelTop <= 5+theDB.scrollTop) ydir = true;
		if (pic1.pixelTop >= wheight+theDB.scrollTop) ydir = false;;
		if (pic1.pixelLeft + 110 >= wwidth+theDB.scrollLeft) xdir = false;
		if (pic1.pixelLeft - 110 <= 5+theDB.scrollLeft) xdir = true;
	}
}
<!--对联广告-->
var imgleft;
theDoc.ns = navigator.appName == "Netscape"
window.screen.width>800 ? imgleft=9:imgleft=111
function MoveLRAd(objID,AdPosition)
{
	if (navigator.appName == "Netscape")
	{
		imgTop = theDoc.documentElement.innerHeight/2 - 105;
		theDoc.eval(objID).pageY=pageYOffset+imgTop;
		if ( ADPosition == 1 )//左边
		{
			theDoc.eval(objID).pageX=imgleft;
		}
		else	//右边
		{
			theDoc.eval(objID).pageY=pageXOffset+window.innerWidth - 120 - imgleft;
		}
	}
	else
	{
		imgTop = theDB.clientHeight/2 - 195;
		if ( AdPosition == 1 )//左边
		{
			eval(objID).style.top=theDB.scrollTop+imgTop;
			eval(objID).style.left=theDB.scrollLeft+imgleft;
		}
		if ( AdPosition == 2 )//右边
		{
			eval(objID).style.top=theDB.scrollTop+imgTop;
			eval(objID).style.left=theDB.scrollLeft+theDB.offsetWidth - 120 - imgleft;
		}
		if ( AdPosition == 3 )//左下
		{
			eval(objID).style.top=theDB.scrollTop+imgTop + 320;
			eval(objID).style.left=theDB.scrollLeft+imgleft;
		}
		if ( AdPosition == 4 )//右下
		{
			eval(objID).style.top=theDB.scrollTop+imgTop + 320;
			eval(objID).style.left=theDB.scrollLeft+theDB.offsetWidth - 120 - imgleft;
		}
	}
}
<!--执行特效脚本-->
function ExecAction()
{
	if(theDoc.getElementById("t")){
		//theDoc.getElementById("t").onLoad = ShowOrHiddenFullAd("t");
		//ShowOrHiddenFullAd("t");
	}
	if(theDoc.getElementById("FloatAd")){
		getwindowsize("FloatAd");
	}
	if ( theDoc.getElementById("myleft") != null )
	{
		MoveLRAd("myleft",1);
	}
	if ( theDoc.getElementById("myright") != null )
	{
		MoveLRAd("myright",2);
	}
//	window.setTimeout("PopNewWin()",10000);
}
