/**
load_module:装入一级功能模块  
*/
function load_optapp(nodeno){
	var usertype=window.parent.topFrame.usertype.value;
	var lead_right=window.parent.topFrame.lead_right.value;

	if(nodeno == '200503200003'){
	nodeno="200503080002";
	}
	if(nodeno=="200503080002"){
		if(usertype=="5") 	
		{       
				window.parent.menuframe.location ="outlookmenu1.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '146,*';
				window.parent.appframe.location ="warehouse/itemstorage/deskopt1.jsp";  //银行桌面

		}else{	
			if(lead_right=="1"){
				window.parent.menuframe.location ="outlookmenu.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '146,*';
				window.parent.appframe.location ="deskopt2.jsp";  //物流领导桌面
			}else if(usertype=="4"){
				window.parent.menuframe.location ="outlookmenu.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '146,*';
				window.parent.appframe.location ="deskopt4.jsp";  //企业领导桌面	
			}else{
				window.parent.menuframe.location ="outlookmenu.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '146,*';
				window.parent.appframe.location ="deskopt.jsp";  //物流员工及管理人员
			}
		}
	}else{
		if(nodeno =='200608280001')
			window.open("deskopt/bbs/bbs1_opt.jsp");
		else{
				window.parent.menuframe.location ="outlookmenu.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '146,*';
				window.parent.appframe.location ="deskopt.jsp";	   //物流员工桌面
		}
	}	 
}
/**
load_module:装入功能模块  
*/
function load_module(strurl,introduce){
	begin=strurl.indexOf("=");
	appname=strurl.substring(begin+1);
	titlename=appname.substring(12);
	tableid=window.parent.topFrame.document.getElementById("table_title");
	row=tableid.rows[0];
	cell=row.cells[1];
	cell.innerText=titlename;
    window.parent.appframe.location =strurl;
}
/**
retdesk:装入功能模块  
*/
function retdesk(){
  window.parent.frmWorkSpace.cols = '0,*';
  window.parent.appframe.location ="../bbs/index.htm";
}
/**
retdesk:装入功能模块  
*/
function log_on(){
 window.parent.appframe.location ="login.jsp";
 window.parent.mainframe.rows="0,*";
 window.parent.frmWorkSpace.cols = '0,100%';
 
}

/**
success:装入功能模块  
*/
function loginsucess(usertype,lead_right){ 
	if(usertype=="5"){
			window.parent.mainframe.rows="13%,*";
			window.parent.topFrame.location ="top.jsp";
			//window.parent.menuframe.location ="outlookmenu1.jsp?fatherno=200503080002";
			window.parent.frmWorkSpace.cols = '0,*';
			window.parent.appframe.location ="warehouse/itemstorage/deskopt1.jsp"; //银行界面

	}else if(usertype=="4"){
			window.parent.mainframe.rows="13%,*";
			window.parent.topFrame.location ="top.jsp";
			//window.parent.menuframe.location ="outlookmenu.jsp?fatherno=200410240002";
			window.parent.frmWorkSpace.cols = '0,*';
			window.parent.appframe.location ="warehouse/itemstorage/deskopt2.jsp";
	}else if(lead_right=="1"){
			window.parent.mainframe.rows="13%,*";
			window.parent.topFrame.location ="top.jsp";
			//window.parent.menuframe.location ="outlookmenu.jsp?fatherno=200410240002";
			window.parent.frmWorkSpace.cols = '0,*';
			window.parent.appframe.location ="warehouse/itemstorage/deskopt2.jsp";
		}else{
			window.parent.mainframe.rows="13%,*";
			window.parent.topFrame.location ="top.jsp";
			//window.parent.menuframe.location ="outlookmenu.jsp?fatherno=200410240002";
			window.parent.frmWorkSpace.cols = '0,*';
			window.parent.appframe.location ="warehouse/itemstorage/deskopt2.jsp";		//物流公司界面

		}
}



function load_optapp1(){
	var usertype=window.parent.topFrame.usertype.value;
	var lead_right=window.parent.topFrame.lead_right.value;
    var nodeno = "200503200003" ;
	if(nodeno == '200503200003'){
	nodeno="200503080002";
	}
	if(nodeno=="200503080002"){
		if(usertype=="5") 	
		{       
				//window.parent.menuframe.location ="outlookmenu1.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '0,*';
				window.parent.appframe.location ="warehouse/itemstorage/deskopt1.jsp";  //银行桌面

		}else{	
			if(lead_right=="1"){
				//window.parent.menuframe.location ="outlookmenu1.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '0,*';
				window.parent.appframe.location ="warehouse/itemstorage/deskopt2.jsp";   //物流领导桌面
			}else if(usertype=="4"){
				//window.parent.menuframe.location ="outlookmenu1.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '0,*';
				window.parent.appframe.location ="warehouse/itemstorage/deskopt2.jsp";   //企业领导桌面	
			}else{
				//window.parent.menuframe.location ="outlookmenu1.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '0,*';
				window.parent.appframe.location ="warehouse/itemstorage/deskopt2.jsp";  //物流员工及管理人员
			}
		}
	}else{
				//window.parent.menuframe.location ="outlookmenu1.jsp?fatherno="+nodeno;
				window.parent.frmWorkSpace.cols = '0,*';
				window.parent.appframe.location ="warehouse/itemstorage/deskopt2.jsp"; 	   //物流员工桌面
	}	 
}


function load_module1(strurl,introduce){
	
	var obj_chk;
	var inti;
	var is_checked = false;
	obj_chk=window.parent.deskopt3.document.all("chk");
	if(obj_chk){ 
		  if(typeof(obj_chk.length)!="undefined"){
			  
		    for(inti=0;inti<obj_chk.length;inti++){ 
		      if(obj_chk[inti].checked){
		        strurl+="&id="+obj_chk[inti].value;
				is_checked = true;
				break
		      }
		    }  				 
		  }else{
			if(obj_chk.checked){
				strurl+="&id="+obj_chk.value;
				is_checked = true;
			}
		  }   
		  if(is_checked){
			  begin=strurl.indexOf("=");
	          appname=strurl.substring(begin+1);
	          titlename=introduce;
	          tableid=window.parent.parent.topFrame.document.getElementById("table_title");
	          row=tableid.rows[0];
	          cell=row.cells[1];
	          cell.innerText=titlename;
               window.parent.parent.appframe.location =strurl;
		  }
		   
	
		
		 
	}
	if(!(is_checked)){
		alert("请先选择查看的企业！");
	}
	
	
}


function load_module2(strurl,introduce){
	
	var obj_chk;
	var inti;
	var is_checked = false;
	obj_chk=window.parent.deskopt3.document.all("chk");
	if(obj_chk){ 
		  if(typeof(obj_chk.length)!="undefined"){
			  
		    for(inti=0;inti<obj_chk.length;inti++){ 
		      if(obj_chk[inti].checked){
		        strurl+="&id="+obj_chk[inti].value;
				is_checked = true;
				break
		      }
		    }  				 
		  }else{
			if(obj_chk.checked){
				strurl+="&id="+obj_chk.value;
				is_checked = true;
			}
		  }   
		  if(is_checked){
			  begin=strurl.indexOf("=");
	          appname=strurl.substring(begin+1);
	          titlename=introduce;
	          tableid=window.parent.parent.topFrame.document.getElementById("table_title");
	          row=tableid.rows[0];
	          cell=row.cells[1];
	          cell.innerText=titlename;
               window.parent.parent.appframe.location =strurl;
		  }
		   
	
		
		 
	}
	if(!(is_checked)){
		alert("请先选择查看的企业！");
	}
	
}
function print_on(){ 
		strURL="itemin_rpt.jsp"; 
		 windowedit=showModalDialog(strURL,"newwindow","font-family:Verdana; status=no; font-size:12; dialogWidth:800pt; dialogHeight:600pt"); 
        self.Window = windowedit
		return;	
}