<div id="question" style="display:none;  padding:10px; clear:both; "> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-top:10px; padding-bottom:10px"><tpl> $langAMConfirmWantDel </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
		<input type="hidden" id="del_value" />
</div> 
			<div id="attribute_manage_type2" class="zhl_shuxing" >
				<ul class="zhl_shuxing_0"><li><tpl> $langAMDel </tpl></li><li style="width:120px; text-align:center;"><tpl> $langAMName </tpl></li><li style="width:140px; text-align:center;"><tpl> $langAMType </tpl></li><li style="width:60px; text-align:center;"><tpl> $langAMCompositor </tpl></li><li style="width:160px; text-align:center;"><tpl> $langAMExplain </tpl></li></ul>
				<div id="show_message_modi"></div>
				<div id="errormessage_modi"></div>
				<tpl> section name=i loop=$attribute_array </tpl>
        		<form name="form_update<tpl> $attribute_array[i].a_id </tpl>"  id="form_update<tpl> $attribute_array[i].a_id </tpl>" action="attribute.manage.php?action=update" method="post" onsubmit="return update_info('<tpl> $attribute_array[i].a_id </tpl>');">
				<ul class="zhl_shuxing_1" style='background-color:<tpl> cycle  </tpl>;'>
					<li style=" margin-top:8px;"><input  name="txtAid" type="checkbox" value="<tpl> $attribute_array[i].a_id </tpl>" /></li>
					<li><input name="txtAname" type="text" value="<tpl> $attribute_array[i].a_name </tpl>" size="14" class="txtinput_short"/><label for='txtAname'> * </label>
					</li>
					<li style=" padding-right:15px;padding-top:5px; padding-bottom:5px"><input type="radio" name="txtAtype" value="0" <tpl> if $attribute_array[i].a_type == 0 </tpl> checked="checked" <tpl> /if </tpl> /><tpl> $langAMBarelyRadio </tpl> <input type="radio" name="txtAtype" value="1" <tpl> if $attribute_array[i].a_type == 1 </tpl> checked="checked" <tpl> /if </tpl>/><tpl> $langAMCanMoreSelect </tpl></li>
					<li style=" margin-top:8px;"><input name="txtAorder" type="text" value="<tpl> $attribute_array[i].a_order </tpl>" size="4"  style="width:60px;*width:50px;_width:40px;border:1px solid #CCCCCC"/>　<label for='txtAorder'>* </label></li>
					<li><input name="txtAinfo" type="text" value="<tpl> $attribute_array[i].a_info </tpl>" class="txtinput_short" /></li><li style=" padding-left:10px; margin-top:3px;"><span class="btn_left"><input name="update" class="btn_submit" type="submit" value="<tpl> $langCsave </tpl>"></span>
					
					</li>
					
				</ul>
				<ul>
					<label style="display:none" for="txtAname" class="wrong" metaDone="true" generated="true"></label>
					<label style="display:none" for="txtAorder" class="wrong" metaDone="true" generated="true"></label>
				</ul>
				<input name="txtupdateAid" value="<tpl> $attribute_array[i].a_id </tpl>" type="hidden" />
				</form>
        		<tpl> /section </tpl>
				<div style=" display:block; clear:both;  margin-top:5px; float:left; padding-left:100px; padding-bottom:10px; padding-top:10px">
				<span class="btn_left"><input onclick="input_selectall();" name="selectall" id="selectall" class="btn_submit" type="button" value="<tpl> $langACopySelAll </tpl>"/></span>
				<span class="btn_left"><input onclick="input_negative();" name="negative" id="negative" class="btn_submit" type="button" value="<tpl> $langACopySelNegative </tpl>"/></span>
				<span class="btn_left"><input name="delbutton" id="delbutton" class="btn_submit" onclick="javascript:delAtt();" type="button" value="<tpl> $langAMDelSelectAttribute </tpl>" style="display:block; float:left; margin-bottom:5px; margin-right:10px"/></span>
				<span class="btn_left"><input name="copyallbutton" id="copyallbutton" class="btn_submit" onclick="javascript:copy_all_ac();" type="button" value="<tpl> $langACopyAttribute </tpl>" style="display:block; float:left; margin-bottom:5px; margin-right:10px"/></span>
				</div>
				<div style="clear:both"></div>
</div>
			<div id="product-Attribute" class="zhl_shuxing">
				<ul class="zhl_shuxing_0"><li style="width:120px; text-align:center;"><tpl> $langAMName </tpl></li><li style="width:140px; text-align:center;"><tpl> $langAMContentRevelation </tpl></li></ul>
				<tpl> section name=j loop=$attribute_array </tpl>
				<div style="clear:both;">
				<ul class="zhl_shuxing_1">
					<li style="width:120px; text-align:center; line-height:40px;"><tpl> $attribute_array[j].a_name </tpl>：</li>
					<li style="width:140px; text-align:center; margin-top:10px;">
						<tpl> if $attribute_array[j].a_type == 0 </tpl>
						<select name="attribute_content" style="border:1px solid #CCCCCC; vertical-align:middle; width:80px;">
						<option value=""></option>
						<tpl> section name=k loop=$attribute_content_array[j] </tpl>
						<option value="<tpl> $attribute_content_array[j][k].ac_content </tpl>"><tpl> $attribute_content_array[j][k].ac_content </tpl></option>
						<tpl> /section </tpl>
						</select>
						<tpl> /if </tpl>
						<tpl> if $attribute_array[j].a_type == 1 </tpl>
						<tpl> section name=k loop=$attribute_content_array[j] </tpl>
						<input name="chx_content" type="checkbox" value="">
						<tpl> $attribute_content_array[j][k].ac_content </tpl>
						<tpl> /section </tpl>
						<tpl> /if </tpl>
						
					</li>
					<li  style=" margin-top:10px;">
					<span  class="btn_left"><input name="addAttribute" type="button" class="btn_submit" value="<tpl> $langAMContent </tpl>" onclick="this.blur();manage_ac('<tpl> $attribute_array[j].a_id </tpl>');return false;"></span>
					</li>
				</ul>
				</div>
				<tpl> /section </tpl>
				<div style="clear:both"></div>
			</div>
<script>
function input_negative(){
	$('input[@name=txtAid]').each(function(){
		$(this).attr('checked',!$(this).attr('checked'))
	})
}
function input_selectall(){
	$('input[@name=txtAid]').each(function(){
		$(this).attr('checked',true)
	})
}
function update_info(id){
	/* 取表单参数 */var queryString=$("#form_update"+id).formSerialize();
	$.ajax({
		url: 'attribute.manage.php?action=update',
		type: 'post',
		dataType: 'json',
		data: queryString,
		success: function(msg){
			showMessage(msg.message,msg.type);
		}
	});
	return false;
}
function left_to_right(){
	var Option="";
	$("select[@id='pclass_left_select']").find("option").each(function(){
		if(this.selected == true){
			var sel_value=this.value;//被选中的类别
			var sel_sign = false;//是否在右边栏中存在的标识，false为不存在
			//查找右边是否已存在该类别，如果没存在，则复制过去
			$("select[@id='pclass_right_select']").find("option").each(function(){
				if(this.value == sel_value){
					sel_sign = true;
				}
			});
			if(sel_sign == false){
				$("<option value="+this.value+">"+this.text+"</option>").appendTo("#pclass_right_select");
			}
		}
	});
}
//右向左
function right_to_left(){
	var Option="";
	$("select[@id='pclass_right_select']").find("option").each(function(){
		if(this.selected == true){
			$("<option value="+this.value+">"+this.text+"</option>").appendTo("#pclass_left_select");
		}
	});
	//从左边移除
	$("select[@id='pclass_right_select'] option[@selected]").remove();
}
</script>			