//标签
function showMenu(tab,content,n,sum) {
	for (var i=1;i<=sum;i++) {
		if (i==n) {
			document.getElementById(tab+"_"+i).className="active";
			document.getElementById(content+"_"+i).className="show";
		}else {
			if(i==sum){
				document.getElementById(tab+"_"+i).className="r0";
				document.getElementById(content+"_"+i).className="hidden"
				}
			else{
			document.getElementById(tab+"_"+i).className="";
			document.getElementById(content+"_"+i).className="hidden";}
		}
	}
}

function showHelp(id,con,n,sum){
	for (var i=1;i<=sum;i++) {
		if (i==n) {
			document.getElementById(con+"_"+i).style.display="block";
		}
	}
   
}

function closeHelp(id,con,n,sum){
    for (var i=1;i<=sum;i++) {
		if (i==n) {
			document.getElementById(con+"_"+i).style.display="none";
		}
	}
}

//菜单
function opens(id,img){
    var id,img;
    if((document.getElementById(id)).style.display=='none'){
       (document.getElementById(id)).style.display='block';
	   (document.getElementById(img)).className='two';
    }else{
       (document.getElementById(id)).style.display='none';
	   (document.getElementById(img)).className='one';
	}
 }
 
 $(document).ready(function() {
	//搜索下拉菜单
	$(".selList").hide();
	$(".none").click(
		function () {		 
			if(!$(this).children(".selList").is(":animated")){//判断是否处于动画
				$(this).children(".selList").fadeIn();
				$(".selList").not($(this).children(".selList")).fadeOut(0);
				return false;
			}			 
		});
	$(".selList a").click(function(event){
		var text = $(this).text()
		var svalue = $(this).attr('val')
		$(this).parent().parent().children("em").text(text);
		$(this).parent().parent().children("input[type=hidden]").val(svalue);
		$(this).parent().fadeOut();	
		return false;
	});
        

 var  iframe　=　$('#emberd2');
		      url=iframe.attr("src");
　　　　　　　　iframe.attr('_name_',iframe.attr('name'))　　　　//备份原来的　name　
　　　　　　　　.attr('src',url)　　　　　　　　　　　　　　　　　　　　　　　　　　　　//设置URL
　　　　　　　　.one('load',function　()　{
　　　　　　　　　　　　this.contentWindow.location　=　"about:blank";　　　　//导向代理页面，我直接使用了这个
　　　　　　　　　　　　$(this).one('load',function　()　{
　　　　　　　　　　　　　　　　var　msg　=　this.contentWindow.name;　　　　　　　　　　　//得到值　这个值就是高度了
　　　　　　　　　　　　　　　　this.contentWindow.name　=　$(this).attr('_name_');　　　　//恢复原来的　Name
　　　　　　　　　　　　　　　　this.contentWindow.location　=　url;　　　　　　　　　　　　//再次导向目标页面
　　　　　　　　　　　　　　　　try
　　　　　　　　　　　　　　　　{
　　　　　　　　　　　　　　　　　　　　var　height　=　eval(msg);　　　　　　　　　　　　　　　　　　　
　　　　　　　　　　　　　　　　　　　　iframe.css('height',　height　+　'px');　　
　　　　　　　　　　　　　　　　}
　　　　　　　　　　　　　　　　catch(e)
　　　　　　　　　　　　　　　　{
　　　　　　　　　　　　　　　　　　　　alert('目标页面没有设置高度到　window.name')
　　　　　　　　　　　　　　　　}
　　　　　　　　　　　　　　　　
　　　　　　　　　　　　})
		  });



$("#hcdj").click(function(){
  if ($(this).hasClass('hshow'))
  {
     $(this).css("background","url(/m/i/jia.gif) no-repeat 0 3px").text("查看指导").removeClass("hshow");
    $("#flagis").hide();
  }else{
     $(this).css("background","url(/m/i/jian.gif) no-repeat 0 3px").text("隐藏指导").addClass("hshow");
     $("#flagis").show();
  }

});












});

