  function show(item_name)
  {
    showhide=document.getElementById(item_name).style.display;
	if(showhide=='block'){
	    document.getElementById(item_name).style.display='none';
	}else{
	    document.getElementById(item_name).style.display='block';
	}
  }
  
  function hidden(item_name)
  {
	    document.getElementById(item_name).style.display='none';
  }
  
  function show_div(item_name)
  {
	    document.getElementById(item_name).style.display='block';
  }
  
function show_select(updown,select_type,input_Name,select_W,select_H,select_bgImg,add_item,form_name,font_color,font_size){
		if (select_type==0)
		{
	        div_select_id="pro_class";	
		}
		else
		{
	        div_select_id="site_go";	
		}
		arr_len=add_item.length;
		select_kuang_H=arr_len*22+59;
		
	document.write("<style>")
    document.write(".select_kuang{width:"+select_W+"px;padding-left:0px;background:#ffffff;filter:alpha(opacity=90);position:relative;top:"+select_H+"px;;z-index:100;height:"+(arr_len*22)+"px;left:-4px;}")
	document.write(".select_kuang ul{margin:0px;padding:0px;}")
	document.write(".select_kuang li{width:"+(select_W-9)+"px;border:1px solid #C0C0C0;border-top:0px;font-size:"+font_size+"px;float:left;clear:both;border-bottom:1px solid #C0C0C0;padding:3px 5px 2px 5px;}")
	document.write(".select_value{width:10px;display:none;}")
	document.write("</style>")
	document.write ("<div style=\"width:"+select_W+"px;height:"+select_H+"px;background:url("+select_bgImg+") repeat-y right;padding-top:3px;padding-left:4px;text-align:left;color:"+font_color+";cursor:default;\" onclick=\"show('"+div_select_id+"')\">");
	if(updown=='up'){
	  document.write ("<div style=\"position:absolute;top:"+(document.body.offsetHeight-select_kuang_H)+"px\">")
	}else{
	  document.write ("<div style=\"position:absolute;\">")
	}
	
	document.write ("<div class=\"select_kuang\" id=\""+div_select_id+"\" style=\"display:none;cursor:default;\" onmousemove=\"show_div('"+div_select_id+"')\" onmouseout=\"hidden('"+div_select_id+"')\">")
	document.write ("<ul>");
	if(updown=='up'){
	        document.write ("<li style=\"width:"+(select_W+3)+"px;border:0px;padding:0px;background:url(images/select_up.jpg) no-repeat left top;font-size:0px;height:10px;\">&nbsp;</li>")	
	}
for(i=0;i<add_item.length;i++)
	{
		select_option=add_item[i].split("|",2)[0];
		select_value =add_item[i].split("|",2)[1];
		if (select_type==0)
		{
	        document.write ("<li id=item_"+i+" onmousemove=\"javas"+"cript:this.style.background='#666666';this.style.color='#ffffff'\" onmouseout=\"javas"+"cript:this.style.background='';this.style.color=''\" onclick=\"add_value('"+input_Name+"','"+select_option+"','"+select_value+"','"+form_name+"')\" >"+select_option+"</li><div id=\"value_"+i+"\" class=\"select_value\">"+select_value+"</div>")	
		}
		else if(select_type==1)
		{
	        document.write ("<li id=item_"+i+" onmousemove=\"javas"+"cript:this.style.background='#666666';this.style.color='#ffffff'\" onmouseout=\"javas"+"cript:this.style.background='';this.style.color=''\" onclick=\"go_url('"+select_option+"','"+select_value+"')\" >"+select_option+"</li><div id=\"value_"+i+"\" class=\"select_value\">"+select_value+"</div>")	
		}
	}
	if(updown=='down'){
	        document.write ("<li style=\"width:"+(select_W+3)+"px;border:0px;padding:0px;background:url(images/select_down.jpg) no-repeat left top;font-size:0px;height:10px;\">&nbsp;</li>")	
	}
	document.write ("</ul>")
	document.write ("</div>")
	document.write ("</div><div id=\"item_all\">"+add_item[0].split("|",2)[0]+"</div></div>")
	
	}
  
  
  
  
  function add_value(input_Name,select_option,select_value,form_name)
  {
	  select_option=select_option
	  if(select_value==0){select_value=''}
	  eval("document."+form_name+"."+input_Name+".value='"+select_value+"'")
	  if(navigator.appName.indexOf("Explorer") > -1){
        document.getElementById("item_all").innerText=select_option;
      } else{
        document.getElementById("item_all").textContent=select_option;
      }
  }
  
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


  function go_url(select_option,select_value){
	  if (select_value!=0){
	      MM_openBrWindow(select_value,'','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes')
	  }
  }



