//调用代码
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
//打开一半屏幕的窗口
function openAWin(url){
	var windowsWidth;
	var windowsHeight;
	windowsWidth=541+17;
	windowsHeight=screen.height-50;
	windowsTop=0;
	windowsLeft=screen.width-windowsWidth-6;
	
	strWindows="scrollbars=yes,top="+windowsTop+",left="+windowsLeft+",width="+windowsWidth+",height="+windowsHeight;
	
	MM_openBrWindow(url,'selfWindows',strWindows)
}
//打开一半屏幕的窗口结束


//打开一半屏幕的窗口
function openSelfScreen(url){
	var windowsWidth;
	var windowsHeight;
	windowsWidth=screen.availWidth/2;
	windowsHeight=screen.height-30;
	windowsTop=0;
	windowsLeft=screen.width/2;
	
	strWindows="scrollbars=yes,top="+windowsTop+",left="+windowsLeft+",width="+windowsWidth+",height="+windowsHeight;
	
	MM_openBrWindow(url,'selfWindows',strWindows)
}
//打开一半屏幕的窗口结束

//最大化
function allScreen(){
	self.moveTo(0,0)  
	self.resizeTo(screen.availWidth,screen.availHeight)
}
//最大化结束
//恢复窗口
function windowResize(){
	windowWidth=screen.availWidth/2;
	windowHeight=screen.height-30;
	windowTop=0;
	windowLeft=screen.width/2;

self.moveTo(windowLeft,windowTop);
self.resizeTo(windowWidth,windowHeight);
}
//恢复窗口结束

//返回页面使用
	function load_position() { //返回时使用
		var cookieString = new String(document.cookie);
		var cookieHeader = "current_position";
		var beginPosition = cookieString.indexOf(cookieHeader);
		if (beginPosition != -1) {
			var current_position = cookieString.substring(beginPosition + cookieHeader.length + 1);
			if (current_position.indexOf(";") == -1) {
				MM_goToURL('parent',current_position); return document.MM_returnValue
			} else {
				MM_goToURL('parent',current_position.substring(0, current_position.indexOf(";"))); return document.MM_returnValue
			}
		} else {
			MM_goToURL('parent','index.aspx');return document.MM_returnValue//如果找不到要返回的网页，则返回首页
		}
	}
	
	function user_apply() { //点击“注册”按钮时调用
		var then = new Date();
		then.setTime(then.getTime() + 7 * 24 * 60 * 60 * 1000);
		document.cookie = "current_position=" + window.location.pathname; 
        MM_openBrWindow('user/user_apply.htm','感谢您使用河北工业泵厂网站','width=541,height=640');return document.MM_returnValue
	}
	
	
	function logon() { //点击“登录”按钮时调用
           
		if(document.logon.username.value==""){
   		//用户名不能为空
   			alert("用户名没有填写");
   			document.logon.username.focus();
   			return false;
   		}
      	if(document.logon.password.value==""){
   		//用户名不能为空
   			alert("密码没有填写");
   			document.logon.password.focus();
   			return false;
   		}
		var then = new Date();
		then.setTime(then.getTime() + 7 * 24 * 60 * 60 * 1000);
		document.cookie = "current_position=" + window.location.pathname; 
   		document.logon.submit();
	}


		function findpw() { //点击“找回密码”时调用
		var then = new Date();
		then.setTime(then.getTime() + 7 * 24 * 60 * 60 * 1000);
		document.cookie = "current_position=" + window.location.pathname; 
        MM_goToURL('parent','findpw.htm');return document.MM_returnValue
	}
	
	
		function get_position_loginerror() { //没有登录出现登录页面调用时调用
		var then = new Date();
		then.setTime(then.getTime() + 7 * 24 * 60 * 60 * 1000);
		document.cookie = "current_position=" + document.referrer; 
        //MM_goToURL('parent','user_logon.htm');return document.MM_returnValue
	}
	
// 双击窗口自动滚动	
var currentpos,timer; 

function initialize() 
{ 
timer=setInterval("scrollwindow()",16); 
} 
function sc(){ 
clearInterval(timer); 
} 
function scrollwindow() 
{ 
currentpos=document.body.scrollTop; 
window.scroll(0,++currentpos); 
if (currentpos != document.body.scrollTop) 
sc(); 
} 
document.onmousedown=sc 
document.ondblclick=initialize
// 双击窗口自动滚动代码结束
function show(divID){
	var objShow;
	objShow = document.getElementById(divID);
	if (objShow.style.display == "none"){
		objShow.style.display = "block";
	}else{
		objShow.style.display = "none"
	}

}
