<!--<?php
# MetInfo Enterprise Content Management System 
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved.
require_once template('head');

echo <<<EOT
-->
<!--矢量图标css begin-->
<link rel="stylesheet" href="awesome/css/font-awesome.min.css">
<!--矢量图标css end-->
<title>{$lang_wap_meunSetting_v6}</title>
<script type="text/javascript" src="../../ckeditor/ckeditor.js"></script>
<link rel="stylesheet" media="screen" type="text/css" href="../../templates/met/images/colorpicker/css/colorpicker.css" />
<link rel="stylesheet" href="../../../public/ui/mobile/css/iconfont.css">
<script type="text/javascript" src="../../templates/met/images/colorpicker/js/colorpicker.js"></script>
<style type="text/css">
#allmap {width: 500px;height: 500px;overflow: hidden;margin:0;}
#r-result{height:100%;width:20%;float:left;}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=fYI33qTijqASUAGSYS1gc3GD"></script>
</head>
$listjs
<body>
<!--
EOT;
if($id){
$title="{$lang_the_menu} > {$lang_menu_management} > {$lang_edit_menu}";
}else{
$title="{$lang_the_menu} > {$lang_menu_management} > {$lang_add_menu}";
}
require_once template('app/wap/top');
$motop[2]="now";
echo <<<EOT
-->
<form method="post" name="myform" action="../wap/custommenueditor.php?lang={$lang}&anyid={$anyid}&cs={$cs}&action=editor&id=$id&menutype=1" target="_self">
<div class="v52fmbx_tbmax">
<div class="v52fmbx_tbbox">
<div class="lablelist">
	
	<ul>
		<li class="round $motop[2]"><a href="custommenu.php?id=$mptid&lang=$lang&anyid={$anyid}&cs={$cs}" title="{$lang_menu_management}">{$lang_menu_management}</a></li>
		<li class="round $motop[1]"><a href="menu_set.php?id=$mptid&lang=$lang&anyid={$anyid}&cs={$cs}" title="{$lang_function_settings}">{$lang_function_settings}</a></li>
	</ul>
</div>
<div class="v52fmbx">

	<h3 class="v52fmbx_hr metsliding" sliding="1">{$lang_menu_information}</h3>
	<div class="metsliding_box metsliding_box_1">
		<div class="v52fmbx_dlbox">
		<dl>
			<dt>{$lang_paraname}{$lang_marks}</dt>
			<dd>
				<input name="menu_name" type="text" class="text nonull" value="$menur[name]" />
<!--
EOT;
if($level==1){
echo <<<EOT
-->
				<span class="tips">{$lang_menu_information1}</span>
<!--
EOT;
}else{
echo <<<EOT
-->
				<span class="tips">{$lang_menu_information1}</span>
<!--
EOT;
}
if(!$menur[sequence]){
	$menur[sequence]=0;
}
echo <<<EOT
-->

			</dd>
		</dl>
		</div>
		<div class="v52fmbx_dlbox">
		<dl>
			<dt>{$lang_sort}{$lang_marks}</dt>
			<dd>
				<input name="menu_list_order" type="text" class="text mid" value="$menur[sequence]" />
				<span class='tips'>{$lang_noorderinfo}</span>
			</dd>
		</dl>
		</div>
		<h3 class="v52fmbx_hr metsliding" sliding="1">{$lang_style_settings}</h3>
		<div class="v52fmbx_dlbox">
         <dl>
		<dt style="width: 108px; ">{$lang_icon_color}{$lang_marks}</dt>
		<dd style="width: 970px; ">
					<input type="hidden" name="rgb_name" value="">
					<input name="menu_iconrgb" type="text" class="text med float_input" value='$menur[menu_iconrgb]'>
					<div class="colorpickerbox colorpickerbox_Column2_bg2"><div style="background-color: $menur[menu_iconrgb]"></div></div>
					<div class="clear"></div>
					<span class="tips">{$lang_icon_color1}</span>
					<script type="text/javascript">
					$(document).ready(function(){
						$('.colorpickerbox_Column2_bg2').ColorPicker({
							color: '#0000ff',
							onShow: function (colpkr) {
								$(colpkr).fadeIn(500);
								return false;
							},
							onHide: function (colpkr) {
								$(colpkr).fadeOut(500);
								return false;
							},
							onChange: function (hsb, hex, rgb) {
								$('.colorpickerbox_Column2_bg2 div').css('backgroundColor', '#' + hex);
								$("input[name='menu_iconrgb']").val('#'+hex);
								$("input[name='rgb_name']").val('#'+rgb);
							}
						});
					});
					</script>
				
		</dd>
	</dl>

</div>
<div class="v52fmbx_dlbox " >
         <dl>
		<dt style="width: 108px; ">{$lang_text_color}{$lang_marks}</dt>
		<dd style="width: 970px; ">
					<input type="hidden" name="met_rgb_name" value="">
					<input name="menu_wordrgb" type="text" class="text med float_input" value='$menur[menu_wordrgb]'>
					<div class="colorpickerbox colorpickerbox_Column2_bg1"><div style="background-color: $menur[menu_wordrgb]"></div></div>
					<div class="clear"></div>
					<span class="tips">{$lang_icon_color1}</span>
					<script type="text/javascript">
					$(document).ready(function(){
						$('.colorpickerbox_Column2_bg1').ColorPicker({
							color: '#0000ff',
							onShow: function (colpkr) {
								$(colpkr).fadeIn(500);
								return false;
							},
							onHide: function (colpkr) {
								$(colpkr).fadeOut(500);
								return false;
							},
							onChange: function (hsb, hex, rgb) {
								$('.colorpickerbox_Column2_bg1 div').css('backgroundColor', '#' + hex);
								$("input[name='menu_wordrgb']").val('#'+hex);
								$("input[name='met_rgb_name']").val('#'+rgb);
							}
						});
					});
					</script>
				
		</dd>
	</dl>

</div>
		<h3 class="v52fmbx_hr metsliding" sliding="1">{$lang_menu_click_effect}</h3>
		<div class="metsliding_box metsliding_box_1">
		<div class="v52fmbx_dlbox">
		<dl>
			<dt>{$lang_type}{$lang_marks}</dt>
			<dd>
				<select id='menu_type' name='menu_type' onchange='return changetype()' >

<!--
EOT;
	if($id==null){
		$displaytext='';
		$dispalyimgtext='style="display:none"';
		$dispalyurl='style="display:none"';
		$displaycontents='style="display:none"';
		$dispalyimgtexts='style="display:none"';
		}

echo <<<EOT
-->
					<option value="1" $menu_type1[1]>{$lang_dial_telephone}</option>
					<option value="2" $menu_type1[2]>{$lang_customer_service}</option>
					<option value="3" $menu_type1[3]>{$lang_map_location}</option>
					<option value="4" $menu_type1[4]>{$lang_home_page_link}</option>
					<option value="5" $menu_type1[5]>{$lang_column_links}</option>
				</select>

			</dd>
		</dl>
		</div>

		
</div>
<div class="v52fmbx_dlbox caidantype_1" $displaytext>
		<dl>
			<dt></dt>
			<dd style='position:relative;'>
				<span class='color390'>{$lang_dial_telephone1}</span>
			</dd>
		</dl>
         <dl>
			<dt>{$lang_phone_number1}{$lang_marks}</dt>
			<dd style='position:relative;'>
				<input name='displayname' id='displayname' type='text' class='text nonull' value="$bell" />
			</dd>
		</dl>

</div>
<div class="v52fmbx_dlbox caidantype_2"  $dispalyimgtext>
		<dl>
			<dt></dt>
			<dd style='position:relative;'>
				<span class='color390'>{$lang_customer_service1}</span>
			</dd>
		</dl>
         <dl>
			<dt>{$lang_qq_number}{$lang_marks}</dt>
			<dd style='position:relative;'>
				<input name='qqs' id='qqs' type='text' class='text nonull' value="$qq" />
				<span class='tips'>{$lang_qq_number1}<a href='http://wp.qq.com/index.html' target='_blank'>{$lang_the_jump}</a></span>
			</dd>
		</dl>

</div>
<div class="v52fmbx_dlbox caidantype_3"  $dispalyimgtexts>
	<input name="action" type="hidden" value="modify" />
	<input name="met_maplng" type="hidden" value="$met_maplng" />
	<input name="met_maplat" type="hidden" value="$met_maplat" />
	<input name="met_mapzoom" type="hidden" value="$met_mapzoom" />
	<div class="v52fmbx_dlbox">
		<dl>
			<dt></dt>
			<dd style='position:relative;'>
				<span class="color390">{$lang_map_location1}</span>
			</dd>
		</dl>
	</div>

	<div class="v52fmbx_dlbox">
	<dl>
		<dt>{$lang_map_input}{$lang_marks}</dt>
		<dd class="input_float_left">
			<div id="v52fmbx_hr metsliding" style="width:100%;">
				<input type="text" id="suggestId" size="20" value="" class="text" />
				
				<div id="search" class="met_map_buttn" onclick="search()">{$lang_search}</div>
			</div>
			
			<div id="searchResultPanel" style="border:1px solid #C0C0C0;width:150px;height:auto;display:none">
			</div>
		</dd>
	</dl>
	<dl>
		<dt></dt>
		<dd style='position:relative;'>
			<span class="tips">{$lang_map_location2}</span>
		</dd>
	</dl>
	</div>
	
	<div class="v52fmbx_dlbox" >
	<dl>
		<dt>{$lang_map_title}{$lang_marks}</dt>
		<dd>
			<input type="text" name="met_maptitle" id="title" value="$met_maptitle" class="text" />
			<input type="hidden" id="title_tmp" value="$met_maptitle">
			
		</dd>
	</dl>
	</div>
	
	<div class="v52fmbx_dlbox">
		<dl>
			<dt>{$lang_map_contents}{$lang_marks}</dt>
			<dd>

				<textarea class="textarea gen" id="contents" name="met_mapcontents">$met_mapcontents</textarea>
				<input type="hidden" id="contents_tmp" value="$met_mapcontents">

				<div class="clear"></div>
			</dd>
		</dl>
		<dl>
			<dt></dt>
			<dd style='position:relative;'>
				<span class="tips">{$lang_map_location3}</span>
			</dd>
		</dl>
	</div>
	
	<div class="v52fmbx_dlbox">
	<dl>
		<dt></dt>
		<dd>
			<div id="allmap"></div>
		</dd>
	</dl>
	</div>
</div>


<div class="footer">{$foot}</div>

<script type="text/javascript" src="../../../app/app/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="../../../app/app/ueditor/ueditor.all.min.js"></script>

<script type="text/javascript">

	var ue = UE.getEditor('contents',{
		iframeCssUrl: '../../../app/system/include/public/bootstrap/css/bootstrap.min.css',
		toolbars: [
			[
				'paragraph', 'fontfamily', 'fontsize', '|',
				'insertorderedlist', 'insertunorderedlist', 'indent','justifyleft', 'justifycenter', 'justifyright', 'justifyjustify','|',
				'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
				'directionalityltr', 'directionalityrtl', '|',
				'undo', 'redo', '|',
				'strikethrough', 'superscript', 'subscript', 'spechars'
			],
			[
				'bold', 'italic', 'underline', 'forecolor', 'backcolor', 'removeformat','pasteplain', '|',
				'link', 'unlink'
			],
		],
		scaleEnabled :true,
		initialFrameWidth : '50%',
		initialFrameHeight : '100'
	});

function get_ue_contents(){
	var html =$lang_wap_descript3_v6;
	ue.ready(function() {
		html = ue.getContent();
	});
	return html;
}
/*
	CKEDITOR.on('instanceReady',
	function() {
		ifreme_methei(630);
	});
*/
function G(id) {
    return document.getElementById(id);
}
// 百度地图API功能
var mapopts = {
	enableMapClick:false,
	mapType:BMAP_NORMAL_MAP
}
var map = new BMap.Map("allmap",mapopts);
map.addControl(new BMap.NavigationControl({anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_ZOOM}));
var lng=$("input[name='met_maplng']").val();
var lat=$("input[name='met_maplat']").val();
var zoom=$("input[name='met_mapzoom']").val();
if(!(lng&&lat)){
	lng='116.404';
	lat='39.915';
}
if(!zoom){
	zoom='15';
}
zoom=parseInt(zoom);
var point=new BMap.Point(lng,lat);
var marker=new BMap.Marker(point);
marker = new BMap.Marker(point);  // 创建标注
map.addOverlay(marker);
add();

map.centerAndZoom(point, zoom);
map.enableScrollWheelZoom();
function showInfo(e){
 //alert(e.point.lng + ", " + e.point.lat);
 map.clearOverlays();
 point = new BMap.Point(e.point.lng,e.point.lat);
 map.centerAndZoom(point, map.getZoom());
 marker = new BMap.Marker(point);  // 创建标注
 map.addOverlay(marker);
 add();
}
map.addEventListener("click", showInfo);

function zoomchange(){
	 map.centerAndZoom(point, map.getZoom());
}
map.addEventListener("zoomend", zoomchange);

var ac = new BMap.Autocomplete(    //建立一个自动完成的对象
    {"input" : "suggestId"
    ,"location" : map
});

ac.addEventListener("onhighlight", function(e) {  //鼠标放在下拉列表上的事件
var str = "";
    var _value = e.fromitem.value;
    var value = "";
    if (e.fromitem.index > -1) {
        value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    }    
    str = "FromItem<br />index = " + e.fromitem.index + "<br />value = " + value;
    
    value = "";
    if (e.toitem.index > -1) {
        _value = e.toitem.value;
        value = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    }    
    str += "<br />ToItem<br />index = " + e.toitem.index + "<br />value = " + value;
    G("searchResultPanel").innerHTML = str;
});

var myValue;
ac.addEventListener("onconfirm", function(e) {    //鼠标点击下拉列表后的事件
	var _value = e.item.value;
    myValue = _value.province +  _value.city +  _value.district +  _value.street +  _value.business;
    G("searchResultPanel").innerHTML ="onconfirm<br />index = " + e.item.index + "<br />myValue = " + myValue;
    setPlace();
});

function setPlace(){
    map.clearOverlays();    //清除地图上所有覆盖物
    function myFun(){
        point = local.getResults().getPoi(0).point;    //获取第一个智能搜索的结果
        map.centerAndZoom(point, 15);
        map.addOverlay(new BMap.Marker(point));    //添加标注
    }
    var local = new BMap.LocalSearch(map, { //智能搜索
      onSearchComplete: myFun
    });
    local.search(myValue);
}
var infoWindow;
function add(){
	var content = get_ue_contents(); 
	//var content = '123';
	//marker = new BMap.Marker(point);
	var offset=new BMap.Size(10,-20);
	//marker.setOffset(offset);
	var opts = {
	  //width : 200,     // 信息窗口宽度
	  //height: 60,     // 信息窗口高度
	  title : '<b>'+$('#title').val()+'</b>' , // 信息窗口标题
	  enableMessage:false,//设置允许信息窗发送短息
	  enableCloseOnClick:false,
	  message:$('#title').val(),
	  offset:offset//偏移量
	}
	infoWindow = new BMap.InfoWindow('<div style="border-top:1px solid #999; margin:5px 0px 0px; padding-top:5px;">'+content+'</div>', opts);  // 创建信息窗口对象
	map.openInfoWindow(infoWindow,point); //开启信息窗口
}
function search(){
	myValue=$('#suggestId').val();
	setPlace();
	add();
}
function dimensional(){
	add();
	var len=get_length($("[name='menu_name']").val());
	var len2=get_length($("[name='menu_list_order']").val());
	var type=$("#menu_type").val();
	//alert($("#displayname").val());
	if(type==1){
		var del=$("#displayname").val();
		if(del==""){
		alert('{$lang_wap_nottel_v6}');
		return false;
		}
	}
	if(type==2){
		var qq=$("#qqs").val();
		if(qq==""){
		alert('{$lang_wap_notqq_v6}');
		return false;
		}
	}
	if(type==3){
		var title=$("#title").val();
		if(title==""){
		alert('{$lang_wap_notmap_v6}');
		return false;
		}
	}
	if(type==5){
		var class1select=$("#class1select").val();
		if(class1select==0){
		alert('{$lang_wap_notcolumn_v6}');
		return false;
		}
	}
	if(len>8){
		alert('{$lang_wap_descript4_v6}');
		return false;
	}
	if(len==0){
		alert('{$lang_wap_descript5_v6}');
		return false;
	}
	$("input[name='met_maplng']").val(point.lng);
	$("input[name='met_maplat']").val(point.lat);
	$("input[name='met_mapzoom']").val(map.getZoom());
	var met_maplng = $("input[name='met_maplng']").val();
	var met_maplat = $("input[name='met_maplat']").val();
	var met_mapzoom = $("input[name='met_mapzoom']").val();
	var met_maptitle = $("input[name='met_maptitle']").val();
	var met_mapcontents = get_ue_contents();
	var durl = 'map.php?lang={$lang}&anyid={$anyid}&cs=5&action=modify';
		durl+='&met_maplng='+encodeURIComponent(met_maplng);
		durl+='&met_maplat='+encodeURIComponent(met_maplat);
		durl+='&met_mapzoom='+encodeURIComponent(met_mapzoom);
		durl+='&met_maptitle='+encodeURIComponent(met_maptitle);
		durl+='&met_mapcontents='+encodeURIComponent(met_mapcontents);
	$.ajax({url:durl,type: 'POST'});
	
}
</script>
	
	
		</dl>
</div>
</div>
<div class="v52fmbx_dlbox caidantype_4"  $dispalyurl>
         <dl>
			<dt></dt>
			<dd style='position:relative;'>
				<span class='color390'>{$lang_wap_descript6_v6}</span>
			</dd>
		</dl>

</div>

<div class="v52fmbx_dlbox caidantype_5" $displaycontents>
		<dl>
			<dt></dt>
			<dd style='position:relative;'>
				<span class='color390'>{$lang_wap_descript7_v6}</span>
			</dd>
		</dl>
         <dl>
			<dt>{$lang_htmColumn}{$lang_marks}</dt>
			<dd>
		<select name="class1" id="class1select" onChange="changelocation1(document.myform.class1.options[document.myform.class1.selectedIndex].value,1)">		
		<option value="0">{$lang_AllBigclass_v6}</option>
<!--
EOT;
foreach($clist1now as $key=>$val1){
$k=$val1['id'];
echo <<<EOT
-->			
<option  value="$val1[id]" $selected_class1[$k]>$val1[name]</option>
<!--
EOT;
}
echo <<<EOT
-->
		</select>
		<select name="class2" id="class2select" onChange="changelocation1(document.myform.class2.options[document.myform.class2.selectedIndex].value,2)"> 
		<option value="0">{$lang_AllSmallclass_v6}</option>
<!--
EOT;
foreach($clist2now as $key=>$val1){
$k=$val1['id'];
echo <<<EOT
-->			
<option  value="$val1[id]" $selected_class2[$k]>$val1[name]</option>
<!--
EOT;
}
echo <<<EOT
-->
		</select>
		<select name="class3" id="class3select" onChange=""> 
		<option value="0">{$lang_AllThirdclass_v6}</option>
<!--
EOT;
foreach($clist3now as $key=>$val1){
$k=$val1['id'];
echo <<<EOT
-->			
<option  value="$val1[id]" $selected_class3[$k]>$val1[name]</option>
<!--
EOT;
}
echo <<<EOT
-->		
		</select>
		
		</dd>
		</dl>
		<dl>
			<dt>{lang_wap_meuntag_v6}{$lang_marks}</dt>
			<dd style='position:relative;'>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-mees" $selected_icon[0]><i class="iconfont icon-2x" id='ico1' style='color:$selected_iconbg[0]; font-size:32px;'>&#xe656;</i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-pencil" $selected_icon[1]>&nbsp;<i class="icon-pencil icon-2x" id='ico2' style='color:$selected_iconbg[1];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-file-alt" $selected_icon[2]>&nbsp;<i class="icon-file-alt icon-2x" id='ico3' style='color:$selected_iconbg[2];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-file" $selected_icon[3]>&nbsp;<i class="icon-file icon-2x" id='ico4' style='color:$selected_iconbg[3];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-align-justify" $selected_icon[4]>&nbsp;<i class="icon-align-justify icon-2x" id='ico5' style='color:$selected_iconbg[4];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-user" $selected_icon[5]>&nbsp;<i class="icon-user icon-2x" id='ico6' style='color:$selected_iconbg[5];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-picture" $selected_icon[6]>&nbsp;<i class="icon-picture icon-2x" id='ico7' style='color:$selected_iconbg[6];'></i></label>
			</dd>
			<dt></dt>
			<dd style='position:relative;'>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-envelope" $selected_icon[7]>&nbsp;<i class="icon-envelope icon-2x" id='ico8' style='color:$selected_iconbg[7];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-barcode" $selected_icon[8]>&nbsp;<i class="icon-barcode icon-2x" id='ico9' style='color:$selected_iconbg[8];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-food" $selected_icon[9]>&nbsp;<i class="icon-food icon-2x" id='ico10' style='color:$selected_iconbg[9];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-tint" $selected_icon[10]>&nbsp;<i class="icon-tint icon-2x" id='ico11' style='color:$selected_iconbg[10];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-truck" $selected_icon[11]>&nbsp;<i class="icon-truck icon-2x" id='ico12' style='color:$selected_iconbg[11];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-edit" $selected_icon[12]>&nbsp;<i class="icon-edit icon-2x" id='ico13' style='color:$selected_iconbg[12];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-gift" $selected_icon[13]>&nbsp;<i class="icon-gift icon-2x" id='ico14' style='color:$selected_iconbg[13];'></i></label>
			</dd>
			<dt></dt>
			<dd style='position:relative;'>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-warning-sign" $selected_icon[14]>&nbsp;<i class="icon-warning-sign icon-2x" id='ico15' style='color:$selected_iconbg[14];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-trophy" $selected_icon[15]>&nbsp;<i class="icon-trophy icon-2x" id='ico16' style='color:$selected_iconbg[15];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-bullhorn" $selected_icon[16]>&nbsp;<i class="icon-bullhorn icon-2x" id='ico17' style='color:$selected_iconbg[16];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-thumbs-up" $selected_icon[17]>&nbsp;<i class="icon-thumbs-up icon-2x" id='ico18' style='color:$selected_iconbg[17];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-shopping-cart" $selected_icon[18]>&nbsp;<i class="icon-shopping-cart icon-2x" id='ico19' style='color:$selected_iconbg[18];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-star" $selected_icon[19]>&nbsp;<i class="icon-star icon-2x" id='ico20' style='color:$selected_iconbg[19];'></i></label>
				<label style='display:inline-block; width:50px;'><input name="met_icon" type="radio" value="icon-facetime-video" $selected_icon[20]>&nbsp;<i class="icon-facetime-video icon-2x" id='ico21' style='color:$selected_iconbg[20];'></i></label>
			</dd>
		</dl>

</div>



<div class="v52fmbx_submit"><input type="submit" id="add" onclick="return dimensional()" name="Submit" value="{$lang_Submit}" class="submit" onclick="return check($(this),'myform')" /></div>
</form>
</div>
</div>
</div>
</div>

<script type="text/javascript">
$(document).ready(function() { 
$(":radio[name='met_icon']").click(function()
{var ra=$(":radio[name='met_icon'][checked]").val();

if(ra=='icon-mees'){
 $("#ico1").css("color","#000000");
}else{
 $("#ico1").css("color","#b5b5c7");
}
if(ra=='icon-pencil'){
 $("#ico2").css("color","#000000");
}else{
 $("#ico2").css("color","#b5b5c7");
}if(ra=='icon-file-alt'){
 $("#ico3").css("color","#000000");
}else{
 $("#ico3").css("color","#b5b5c7");
}if(ra=='icon-file'){
 $("#ico4").css("color","#000000");
}else{
 $("#ico4").css("color","#b5b5c7");
}if(ra=='icon-align-justify'){
 $("#ico5").css("color","#000000");
}else{
 $("#ico5").css("color","#b5b5c7");
}if(ra=='icon-user'){
 $("#ico6").css("color","#000000");
}else{
 $("#ico6").css("color","#b5b5c7");
}if(ra=='icon-picture'){
 $("#ico7").css("color","#000000");
}else{
 $("#ico7").css("color","#b5b5c7");
}if(ra=='icon-envelope'){
 $("#ico8").css("color","#000000");
}else{
 $("#ico8").css("color","#b5b5c7");
}if(ra=='icon-barcode'){
 $("#ico9").css("color","#000000");
}else{
 $("#ico9").css("color","#b5b5c7");
}if(ra=='icon-food'){
 $("#ico10").css("color","#000000");
}else{
 $("#ico10").css("color","#b5b5c7");
}if(ra=='icon-tint'){
 $("#ico11").css("color","#000000");
}else{
 $("#ico11").css("color","#b5b5c7");
}if(ra=='icon-truck'){
 $("#ico12").css("color","#000000");
}else{
 $("#ico12").css("color","#b5b5c7");
}if(ra=='icon-edit'){
 $("#ico13").css("color","#000000");
}else{
 $("#ico13").css("color","#b5b5c7");
}if(ra=='icon-gift'){
 $("#ico14").css("color","#000000");
}else{
 $("#ico14").css("color","#b5b5c7");
}if(ra=='icon-warning-sign'){
 $("#ico15").css("color","#000000");
}else{
 $("#ico15").css("color","#b5b5c7");
}if(ra=='icon-trophy'){
 $("#ico16").css("color","#000000");
}else{
 $("#ico16").css("color","#b5b5c7");
}if(ra=='icon-bullhorn'){
 $("#ico17").css("color","#000000");
}else{
 $("#ico17").css("color","#b5b5c7");
}if(ra=='icon-thumbs-up'){
 $("#ico18").css("color","#000000");
}else{
 $("#ico18").css("color","#b5b5c7");
}if(ra=='icon-shopping-cart'){
 $("#ico19").css("color","#000000");
}else{
 $("#ico19").css("color","#b5b5c7");
}if(ra=='icon-star'){
 $("#ico20").css("color","#000000");
}else{
 $("#ico20").css("color","#b5b5c7");
}if(ra=='icon-facetime-video'){
 $("#ico21").css("color","#000000");
}else{
 $("#ico21").css("color","#b5b5c7");
}
}

)

}
);
function get_length(s){
	var char_length = 0;
	for (var i = 0; i < s.length; i++){
		var son_char = s.charAt(i);
		encodeURI(son_char).length > 2 ? char_length += 2 : char_length += 1;
	}
	return char_length;
}
function check(my,from){
	var len=get_length($("[name='menu_name']").val());
	if(len>8){
	alert('{$lang_wap_descript1_v6}');
	return false;
	}
	
	
	return Smit(my,from);
	//return false;
}
function check11(){
var len=get_length($("[name='menu_name']").val());

if(len>10){
alert('{$lang_wap_charover_v6}');
return false;
}
}
function check1(){
	var len=get_length($("[name='menu_name']").val());
		var len=$("[name='menu_name']").val();

		if(len==""){
		alert('{$lang_wap_charover_v6}');
		return false;
		}
		if(len>10){
			alert('{$lang_wap_charover_v6}');
			return false;
		}
		

	
}
function changetype(){
	var type=$('#menu_type').val();
	$("[class*=caidantype_]").hide();
	$(".caidantype_"+type).show();
	ifreme_methei();
}
$(function(){   
	run_map();             //加载页面时启动定时器  
	run_content();
	function run_map() {  
		var interval = setInterval(chang, "100");  
	}
	function run_content() {  
		var interval = setInterval(editorData, "3000");  
	} 
	function editorData(){
		$('#contents_tmp').val(get_ue_contents());
		$('#title_tmp').val($('#title').val());
	}
	function chang(){
		var content = get_ue_contents(); 
		if(content!=$('#contents_tmp').val()||$('#title').val()!=$('#title_tmp').val()){
			$('#contents_tmp').val(get_ue_contents());
			$('#title_tmp').val($('#title').val())
			infoWindow.setTitle('<b>'+$('#title').val()+'</b>')
			infoWindow.setContent('<div style="border-top:1px solid #999; margin:5px 0px 0px; padding-top:5px;">'+content+'</div>')
		}
	}            
});
</script>
</body>
</html>
<!--
EOT;
# This program is an open source system, commercial use, please consciously to purchase commercial license.
# Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.
?>-->