 function addOption(objSelectNow,key,value)
 {

	 
    // 使用W3C标准语法为SELECT添加Option
   var objOption = document.createElement("OPTION");
   objOption.text= value;
   objOption.value=key;
   document.getElementById(objSelectNow).options.add(objOption);
 }
 function addOptionGroup(selectId,optGroupString)
 {
	 

   
	 
	var array1=	optGroupString.split('|');
	
	document.getElementById(selectId).length=0;
	addOption(selectId,"0","请选择");
	//document.getElementById('selectId').options.length=1;
	
	for(var i=0;i<array1.length-1;i++)
	{
		var array2=array1[i].split(',');
		
		addOption(selectId,array2[0],array2[1]);

	}
 }

 
