// JavaScript Document
var xmlHttp;
function createXMLHTTPRequest(){
	if(window.ActiveXObject){
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if(window.XMLHttpRequest){
		xmlHttp = new XMLHttpRequest();
	}
}
//返回指定的文件内容
//strFileName:指定要返回的文件名
function showproducts(id){
	var strFileName="http://www.brightriver.com.cn/Enterprise/list.asp?pid="+id;
	createXMLHTTPRequest();
	xmlHttp.onreadystatechange = handleStateChange;
	xmlHttp.open("GET",strFileName,true);
	xmlHttp.send(null);
}

function handleStateChange(){
	var obj=document.getElementById("productlist");
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){
			obj.innerHTML=xmlHttp.responseText;
		}
	}
}
function showinfo(id){
	var strFileName="http://www.brightriver.com.cn/Enterprise/info.asp?pid="+id;
	createXMLHTTPRequest();
	xmlHttp.onreadystatechange = infoget;
	xmlHttp.open("GET",strFileName,true);
	xmlHttp.send(null);
}

function infoget(){
	var obj=document.getElementById("mainbody");
	if(xmlHttp.readyState == 4){
		if(xmlHttp.status == 200){
			//alert(xmlHttp.responseText);
			obj.innerHTML=xmlHttp.responseText;
		}
	}
}
function getpara(){
var  s  =  "网页可见区域宽："+  document.body.clientWidth;  
s  +=  "\r\n网页可见区域高："+  document.body.clientHeight;  
s  +=  "\r\n网页可见区域高："+  document.body.offsetWeight  +"  (包括边线的宽)";  
s  +=  "\r\n网页可见区域高："+  document.body.offsetHeight  +"  (包括边线的宽)";  
s  +=  "\r\n网页正文全文宽："+  document.body.scrollWidth;  
s  +=  "\r\n网页正文全文高："+  document.body.scrollHeight;  
s  +=  "\r\n网页被卷去的高："+  document.body.scrollTop;  
s  +=  "\r\n网页被卷去的左："+  document.body.scrollLeft;  
s  +=  "\r\n网页正文部分上："+  window.screenTop;  
s  +=  "\r\n网页正文部分左："+  window.screenLeft;  
s  +=  "\r\n屏幕分辨率的高："+  window.screen.height;  
s  +=  "\r\n屏幕分辨率的宽："+  window.screen.width;  
s  +=  "\r\n屏幕可用工作区高度："+  window.screen.availHeight;  
s  +=  "\r\n屏幕可用工作区宽度："+  window.screen.availWidth;  
alert(s);  
}

function check_null(){
	if (document.form.memberid.value==""){
		alert("no MembersID!");
		return false;
		}
	if (document.form.password.value==""){
			alert("Password incorrect!");
			return false;
		}
	return true;
	}
function check_admin(){
if (document.form.username.value==""){
		alert("请输入用户名!");
		return false;
	}
	if (document.form.password.value==""){
		alert("请输入密码!");
		return false;
	}
	return true;
}
function goback(){
	history.back();
}
function openwindow(filename,width,height,scr){
	window.open(filename,'','resizeable=yes,top=100,left=100,statusbar=no,scrollbars='+scr+',menubar=no,toolbar=no,width='+width+',height='+height+'\'');
}
function additem(id){
	window.open('additem.asp?pid='+id,'','resizeable=yes,statusbar=no,scrollbars=no,menubar=no,toolbar=no,width=250,height=110');
}
	
function MM_jumpMenu(targ,selObj,restore,filename){ //v3.0
  eval(targ+".location='"+filename+"page="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}