document.oncontextmenu = new Function('return false');
document.onselectstart = new Function('return false');
document.onerror = new Function('return true');
	var Objs = document.all;
    for (i=0; i< Objs.length; i++)
        if (Objs(i).tagName!="INPUT" && Objs(i).tagName!="A")
			Objs(i).style.cursor = "default";

        //
        //
function tjSelect(){
	var hmStr = "";
	var sizeValue = form2.SIZE.value;
	var size = parseInt(sizeValue);
	for(var i=1; i<=size; i++)
	{
		eval("var bjz = form2.BJZ" + i + ".value");
		if(bjz=="")
			continue;
		eval("var mc = form2.MC" + i + ".value");
		eval("var bjf = form2.BJF" + i + ".value");
		eval("var ljf = form2.LJF" + i + ".value");
		hmStr += mc  + "|" + bjf + "|" + bjz + "|" + ljf + "|";
	}
	hmStr = hmStr.substring(0,hmStr.length-1); 
	external.tjSelect(hmStr);
}

//
function tjSum(){
	var hmStr = "";
	var hzStr = "";
	var sizeValue = form2.SIZE.value;
	var size = parseInt(sizeValue);
	for(var i=1; i<=size; i++)
	{
		eval("var bjz = form2.BJZ" + i + ".value");
		if(bjz=="")
			continue;
		eval("var mc = form2.MC" + i + ".value");
		eval("var bjf = form2.BJF" + i + ".value");
		eval("var ljf = form2.LJF" + i + ".value");
		hmStr += mc  + "|" + bjf + "|" + bjz + "|" + ljf + "|";
	}
	hmStr = hmStr.substring(0,hmStr.length-1); 
	
	for(var i=1; i<=6; i++)
	{
		eval("var hztj = form2.HZTJ" + i + ".value");
		if(hztj=="")
			continue;
		hzStr += hztj  + "|";
	}
	hzStr = hzStr.substring(0,hzStr.length-1); 
	
	var opt = "";              
	var max = form2.order.options.length;                
	for(var i=0;i<max;i++){              
	     var tmp = form2.order.options[i].value;   
	     if(tmp!="")           
	     	opt = opt + tmp + "|";              
	}         
	opt = opt.substring(0,opt.length-1);
	external.tjSum(hmStr,hzStr,opt);
}

var size = 0;               
              
function seList(){              
   var opt = "";              
   var max = form2.order.options.length;                
   for(var i=0;i<max;i++){              
     var tmp = form2.order.options[i].value;              
     opt = opt + tmp + ",";              
   }         
   opt = opt.substring(0,opt.length-1);     
   form2.FL.value=opt;              
                 
}              
               
function selField(){               
                
  var index = form2.showField.selectedIndex;              
  var strField = form2.showField.options[index].text;              
  var optV = form2.showField.options[index].value;              
  var tag = true;              
  var max = form2.order.options.length;              
                
  for(var i=0;i<max;i++){              
     var strTmp = form2.order.options[i].text;              
     if(strField==strTmp){              
       tag = false;              
       continue;              
     }                    
  }               
 if(tag){              
       var opt = new Option(strField,optV);              
       form2.order.add(opt,size);               
       size++;                      
  }              
}               
              
function  selectALL(){              
  clearALL();              
  var max = form2.showField.options.length;              
  for(var i=0;i<max;i++){              
     var optN = form2.showField.options[i].text;              
     var optV =form2.showField.options[i].value;              
     var opt = new Option(optN,optV);              
     form2.order.add(opt,i);               
  }              
}              
              
function  clearALL(){              
  var max = form2.order.options.length;                
  for(var j=max-1;j>=0;j--){              
     form2.order.remove(j);              
  }              
  size=0;              
}              
