
function confirmuser()
{
  document.Outline.action="http://192.168.15.12/cgi-bin/confirmuser";
  document.Outline.v_newuser.value = "0";
  if(document.Outline.v_regname.value == "" && document.Outline.v_cardno.value == "")
  {
      alert("请输入注册名或证号！");
      return;
  }
  if(document.Outline.v_passwd.value == "")
  {
      alert("请输入登录密码！");
      return;
  }
  document.Outline.submit();
}

function showLogin(bLogin, imgPath)
{
    if (bLogin==0) {
	    document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n");
	    document.write("<tr><td height=\"22\" background=\"" + imgPath + "images/duzhedenglu.gif\"><table cellpadding=0 cellspacing=0><tr><td width=30 align=center style=\"padding-top:3px\"></td><td><div class=RCap1 >&nbsp;&nbsp;&nbsp;&nbsp;用户登录</div></td></tr></table></td></tr>\n");
		document.write("<tr><td background=\"" + imgPath + "images/bg_f.gif\">\n<form name=\"frmLogin\" method=\"post\" action=\"login.php\">\n");
		document.write("<table width=\"130\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\n<tr><td colspan=\"2\" height=\"7\"></td></tr>\n");
		document.write("<tr><td width=\"44\" height=\"20\">用 户：</td><td><input name=\"User\" type=\"Text\" size=\"12\" onKeyPress='if (event.keyCode==13) Pass.focus();'></td></tr>\n");
		document.write("<tr><td height=\"26\">密 码：</td><td><input name=\"Pass\" type=\"Password\" size=\"12\" onKeyPress='if (event.keyCode==13) chkLogin();'></td></tr>\n");
		document.write("<tr><td height=\"30\" colspan=\"2\" align=\"center\"><img src=\"" + imgPath + "images/btnLogin.gif\" style=\"cursor:hand\" onclick=\"chkLogin();\"> &nbsp;<img src=\"" + imgPath + "images/btnRedo.gif\" style=\"cursor:hand\" onclick=\"frmLogin.reset();\"></td></tr>");
		document.write("</table>\n</form>\n</td></tr></table>\n");
	}
}

function showNavList(imgPath)
{
	if (naviList.length > 0)
	{
		document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n<tr><td background=\"" + imgPath + "images/bg_f.gif\" align=\"right\">\n");
		for (i=0; i<naviList.length; i++)
		{
	    	addNavItem('' + naviList[i][1], naviList[i][0]);
		}
		endNavMenu(imgPath);
	}
}

function showNavTitle(tplPath)
{
    document.write("<table width=100% cellpadding=0 cellspacing=0>\n<tr><td height=8 background=\"" + tplPath + "/images/bg_f.gif\"></td></tr>\n");
	document.write("<tr><td height=22 background=" + tplPath + "/images/bar_1.gif><table cellpadding=0 cellspacing=0><tr><td><div class=\"LCap\" style=\"width:144px;padding-left:10px;padding-top:4px;letter-spacing:0px;\"><a href=\"http://www.ahlib.com/web1/index.html\">大连开发区图书馆</div></td></tr></table></td></tr></table>\n");
}

function showSearch(tplPath)
{
    document.write("<table width=100% cellpadding=0 cellspacing=0>\n");
	document.write("<tr><td height=22 bgcolor=d3d3d3><table cellpadding=0 cellspacing=0><tr><td width=30 align=center style=padding-top:2px><img src=" + tplPath + "/images/search.gif align=absmiddle></td><td><div class=LCap>网站文章检索</div></td></tr></table></td></tr>\n");
	document.write("<tr><td background=" + tplPath + "/images/bg_f.gif>\n<form name=frmSearch method=get action=news_search.php><input name=page type=Hidden value=1>\n");
	document.write("<table width=130 cellpadding=0 cellspacing=0 align=center><tr><td colspan=2 height=7></td></tr>\n");
	document.write("<tr><td width=44 height=20>条 件：</td><td><input name=kw type=Text size=12 value=\"\" onKeyPress='if (event.keyCode==13) ns();'></td></tr>\n");
	document.write("<tr><td height=28>范 围：</td><td><select name=stype size=1 style=\"width:82px\"><option value=0>&nbsp;按标题搜&nbsp;</option><option value=1>&nbsp;按内容搜&nbsp;</option><option value=2>&nbsp;全文检索&nbsp;</option></select></td></tr>\n");
	document.write("<tr><td height=30 colspan=2 align=center><img src=" + tplPath + "/images/btnSearch.gif style=\"cursor:hand\" onclick=\"ns();\"> &nbsp;<img src=" + tplPath + "/images/btnRedo.gif style=\"cursor:hand\" onclick=\"frmSearch.reset();\"></td></tr>\n");
	document.write("</table></form></td></tr></table>");
}

function showLink(tplPath)
{
    document.write("<table width=100% cellpadding=0 cellspacing=0>\n");
		document.write("<tr><td align=left style=\"padding-top:2px; padding-bottom:10px\">\n");
	for (i=0; i<frdLinks.length; i++)
	{
	    document.write(" &nbsp;→ <a href=\"" + frdLinks[i][0] + "\" target=\"_blank\">" + frdLinks[i][1] + "</a><br>");
	}
	document.write("</td></tr></table>");
}

function showRes(tplPath)
{
    document.write("<table width=100% cellpadding=0 cellspacing=0>\n");
	document.write("<tr><td align=center style=\"padding-top:2px; padding-bottom:10px\">\n");
	for (i=0; i<resLinks.length; i++)
	{
	    document.write(" &nbsp;<a href=\"" + resLinks[i][0] + "\" target=\"_blank\">" + resLinks[i][1] + "</a><br>");

	}
	document.write("</td></tr></table>");
}


function showRes1(tplPath) 
{
    document.write("<table width=100% cellpadding=0 cellspacing=0>\n");
	document.write("<tr><td align=center style=\"padding-top:2px; padding-bottom:10px\">\n");
	for (i=0; i<resLinks1.length; i++)
	{
	    document.write(" &nbsp;<a href=\"" + resLinks1[i][0] + "\" target=\"_blank\">" + resLinks1[i][1] + "</a><br>");

	}
	document.write("</td></tr></table>");
}

function showRes2(tplPath)
{
    document.write("<table width=100% cellpadding=0 cellspacing=0>\n");
	document.write("<tr><td align=center style=\"padding-top:2px; padding-bottom:10px\">\n");
	for (i=0; i<resLinks2.length; i++)
	{
	    document.write(" &nbsp;<a href=\"" + resLinks2[i][0] + "\" target=\"_blank\">" + resLinks2[i][1] + "</a><br>");

	}
	document.write("</td></tr></table>");
}
function showRes3(tplPath)
{
    document.write("<table width=100% cellpadding=0 cellspacing=0>\n");
	document.write("<tr><td align=center style=\"padding-top:2px; padding-bottom:10px\">\n");
	for (i=0; i<resLinks3.length; i++)
	{
	    document.write(" &nbsp;<a href=\"" + resLinks3[i][0] + "\" target=\"_blank\">" + resLinks3[i][1] + "</a><br>");

	}
	document.write("</td></tr></table>");
}

function showNew(tplPath)
{
    document.write("<table width=100% cellpadding=0 cellspacing=0>\n");
document.write("<tr><td>\n<DIV style=\"PADDING-LEFT: 2px; PADDING-TOP: 10px; LINE-HEIGHT:18px; FILTER: dropshadow(color=#FFFFFF,offx=1,offy=1); WIDTH: 140px; COLOR: #00008b\" align=center>");

		for (i=0; i<resNewLinks.length; i++)
	{
	    document.write(" &nbsp;<a href=\"" + resNewLinks[i][0] + "\" target=\"_blank\">" + resNewLinks[i][1] + "</a><br>");

	}
	document.write("</td></tr></table>");
}



function confirmuser()
{
  document.Outline.action="http://opacvod.ahlib.com/cgi-bin/confirmuser";
  document.Outline.v_newuser.value = "0";
  if(document.Outline.v_regname.value == "" && document.Outline.v_cardno.value == "")
  {
      alert("请输入注册名或证号！");
      return;
  }
  if(document.Outline.v_passwd.value == "")
  {
      alert("请输入登录密码！");
      return;
  }
  document.Outline.submit();
}

function showMyLibLogin(bLogin, imgPath)
{
    if (bLogin==0) {
	    document.write("<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n");
	    document.write("<tr><td height=\"22\" background=\"" + imgPath + "images/bar_1.gif\"><table cellpadding=0 cellspacing=0><tr><td width=30 align=center style=\"padding-top:3px\"><img src=\"" + imgPath + "images/lm_1.gif\" align=\"absmiddle\"></td><td><div class=LCap>网上图书预借</div></td></tr></table></td></tr>\n");
		document.write("<tr><td background=\"" + imgPath + "images/bg_9.gif\">\n<form name=\"Outline\" method=\"post\" target=\"_blank\">\n<INPUT type=hidden value=0 name=v_newuser>\n");
		document.write("<table width=\"130\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\n<tr><td colspan=\"2\" height=\"7\"></td></tr>\n");
		document.write("<tr><td width=\"44\" height=\"20\">注册名</td><td><input name=\"v_regname\" type=\"Text\" size=\"12\" onKeyPress='if (event.keyCode==13) v_cardno.focus();'></td></tr>\n");
		document.write("<tr><td width=\"44\" height=\"26\">证&nbsp;&nbsp;号</td><td><input name=\"v_cardno\" type=\"Text\" size=\"12\" onKeyPress='if (event.keyCode==13) v_passwd.focus();'></td></tr>\n");
		document.write("<tr><td height=\"20\">密&nbsp;&nbsp;码</td><td><input name=\"v_passwd\" type=\"Password\" size=\"12\" onKeyPress='if (event.keyCode==13) confirmuser();'></td></tr>\n");
		document.write("<tr><td height=\"30\" colspan=\"2\" align=\"center\" valign=bottom><img src=\"" + imgPath + "images/btnLogin.gif\" style=\"cursor:hand\" onclick=\"confirmuser();\"> &nbsp;<img src=\"" + imgPath + "images/btnRedo.gif\" style=\"cursor:hand\" onclick=\"Outline.reset();\"></td></tr>");
		document.write("</table>\n</form>\n</td></tr></table>\n");
	}
}


function voteid(){
ifSelect=false;
 for(i=0;i<document.vote.id.length;i++){
    if(document.vote.id[i].checked == true){
	  ifSelect=true;
	   break;
	  }
 }
  if(ifSelect==false){
  window.alert("请选择投票选项！");
  return false;
  }
 }
 
 function voteResult(url)
{
	window.open(url,"vote","height=220,width=450,top=100,left=100,status=no,location=no,toolbar=no,directories=no,menubar=no,resizable=no,scrollbars=yes");
}


function ChangeDiv(divId,divName,zDivCount,sp) 
{ 
 for(i=0;i<=zDivCount;i++)
 {
     document.getElementById(divName+i).style.display="none"; 
     document.getElementById(sp+i).style.color="800000";
 }
 document.getElementById(divName+divId).style.display="block"; 
 document.getElementById(sp+divId).style.color="blue";
} 

function ChangeDiv1(divId1,divName1,zDivCount1,s) 
{ 
 for(i=0;i<=zDivCount1;i++)
 {
     document.getElementById(divName1+i).style.display="none"; 
     document.getElementById(s+i).style.background="7b7b7b";
 }
 document.getElementById(divName1+divId1).style.display="block";
 document.getElementById(s+divId1).style.background="FFFFFF";
} 

var isStart=true;
var nn;
var tt;
nn=1;
setTimeout('change_img()',4000);
function change_img()
{
if(isStart){
 nn++;
 if(nn>7) nn=1;
 setFocus(nn);
 }else{
 tt=setTimeout('change_img()',100);
 }
}
function setFocus(i)
{
 if(tt) clearTimeout(tt);
 nn = i;
 selectLayer1(i);
 tt=setTimeout('change_img()',4000);
}
function selectLayer1(i)
{
 switch(i)
 {
 case 1:
document.getElementById("bbs_s1").style.display="block";
document.getElementById("bbs_s2").style.display="none";
document.getElementById("bbs_s3").style.display="none";
document.getElementById("bbs_s4").style.display="none";
document.getElementById("bbs_s5").style.display="none";
document.getElementById("bbs_s6").style.display="none";
document.getElementById("bbs_s7").style.display="none";
 break;
case 2:
document.getElementById("bbs_s1").style.display="none";
document.getElementById("bbs_s2").style.display="block";
document.getElementById("bbs_s3").style.display="none";
document.getElementById("bbs_s4").style.display="none";
document.getElementById("bbs_s5").style.display="none";
document.getElementById("bbs_s6").style.display="none";
document.getElementById("bbs_s7").style.display="none";

 break;
 case 3:
document.getElementById("bbs_s1").style.display="none";
document.getElementById("bbs_s2").style.display="none";
document.getElementById("bbs_s3").style.display="block";
document.getElementById("bbs_s4").style.display="none";
document.getElementById("bbs_s5").style.display="none";
document.getElementById("bbs_s6").style.display="none";
document.getElementById("bbs_s7").style.display="none";
 break;

 case 4:
document.getElementById("bbs_s1").style.display="none";
document.getElementById("bbs_s2").style.display="none";
document.getElementById("bbs_s3").style.display="none";
document.getElementById("bbs_s4").style.display="block";
document.getElementById("bbs_s5").style.display="none";
document.getElementById("bbs_s6").style.display="none";
document.getElementById("bbs_s7").style.display="none";
 break;

 case 5:
document.getElementById("bbs_s1").style.display="none";
document.getElementById("bbs_s2").style.display="none";
document.getElementById("bbs_s3").style.display="none";
document.getElementById("bbs_s4").style.display="none";
document.getElementById("bbs_s5").style.display="block";
document.getElementById("bbs_s6").style.display="none";
document.getElementById("bbs_s7").style.display="none";
 break;

 case 6:
document.getElementById("bbs_s1").style.display="none";
document.getElementById("bbs_s2").style.display="none";
document.getElementById("bbs_s3").style.display="none";
document.getElementById("bbs_s4").style.display="none";
document.getElementById("bbs_s5").style.display="none";
document.getElementById("bbs_s6").style.display="block";
document.getElementById("bbs_s7").style.display="none";
 break;

 case 7:
document.getElementById("bbs_s1").style.display="none";
document.getElementById("bbs_s2").style.display="none";
document.getElementById("bbs_s3").style.display="none";
document.getElementById("bbs_s4").style.display="none";
document.getElementById("bbs_s5").style.display="none";
document.getElementById("bbs_s6").style.display="none";
document.getElementById("bbs_s7").style.display="block";
 break;
 }
}










var delta=0.15;
    var collection;
function floaters() {
        this.items    = [];
        this.addItem    = function(id,x,y,content)
                  {
                    document.write('<DIV id='+id+' style="Z-INDEX: 222; POSITION: absolute;  width:40px; height:60px;left:'+(typeof(x)=='string'?eval(x):x)+';top:'+(typeof(y)=='string'?eval(y):y)+'">'+content+'<div align="center"><a href="javascript:void(0)" onClick="closeBanner('+id+')"><img border=0 src="/common/close.gif"></a></div>');
										document.write('<iframe src="javascript:false" style="position:absolute; visibility:inherit; top:0px; left:0px; width:68px; height:240px; z-index:-1; filter=progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);"></iframe>');
										document.write('</DIV>');
                    var newItem                = {};
                    newItem.object            = document.getElementById(id);
                    newItem.x                = x;
                    newItem.y                = y;

                    this.items[this.items.length]        = newItem;
                  }
        this.play    = function()
                  {
                    collection                = this.items
                    setInterval('play()',10);
                  }
        }
        function closeBanner(id)
				{
					followDiv1.style.visibility = 'hidden';
					followDiv2.style.visibility = 'hidden';
				}
        function play()
        {
            for(var i=0;i<collection.length;i++)
            {
                var followObj        = collection[i].object;
                var followObj_x        = (typeof(collection[i].x)=='string'?eval(collection[i].x):collection[i].x);
                var followObj_y        = (typeof(collection[i].y)=='string'?eval(collection[i].y):collection[i].y);

                if(followObj.offsetLeft!=(document.body.scrollLeft+followObj_x)) {
                    var dx=(document.body.scrollLeft+followObj_x-followObj.offsetLeft)*delta;
                    dx=(dx>0?1:-1)*Math.ceil(Math.abs(dx));
                    followObj.style.left=followObj.offsetLeft+dx;
                    }

                if(followObj.offsetTop!=(document.body.scrollTop+followObj_y)) {
                    var dy=(document.body.scrollTop+followObj_y-followObj.offsetTop)*delta;
                    dy=(dy>0?1:-1)*Math.ceil(Math.abs(dy));
                    followObj.style.top=followObj.offsetTop+dy;
                    }
                followObj.style.display    = '';
            }
        }
  
function showad(picnames,picmemo,piclink,picnames1,picmemo1,piclink1)
   {
		  var theFloaters = new floaters();
			links="";
			linkend="";
			if (piclink!="#")
			{
				links='<a href=' + piclink + ' target=_blank>';
				links1='<a href=' + piclink1 + ' target=_blank>';
				linkend='</a>';
			}
		    theFloaters.addItem('followDiv1','document.body.clientWidth-90',5,links+'<img src='+ picnames+' border=0 width=70  title='+picmemo+' alt='+picmemo+'>'+linkend);
		    theFloaters.addItem('followDiv2',20,5,links1+'<img src='+ picnames1+' border=0 width=70 title='+picmemo1+' alt='+picmemo1+'>'+linkend);		    
		    theFloaters.play();
    }












