// JavaScript Document

<!-- Hide
function killErrors() {
return true;
}
window.onerror = killErrors;
// -->


// 获取本站或网络。。。
function comefroms($par)
{
  document.getElementById("comefrom").value = $par;
	}


//弹出zcms对话框
function dailog($w,$h,$title,$url)
{
	var diag = new Dialog();
	diag.Width = $w;
	diag.Height = $h;
	diag.Title = $title;
	diag.URL = $url;
	diag.show();
}


// menu菜单判断
  function menu_change()
  {
	 var obj1=document.getElementById('menu_type'); 
	 var index=obj1.selectedIndex; 
     var val = obj1.options[index].value;
     //alert(val);
	 
	 /*****************新闻列表***********************/	
	 if (val == "news")
	 {
	    document.getElementById("news_").style.display= "block";
		document.getElementById("showfile").value = "EMS_News.php";
		document.getElementById("adminfile").value = "admin_news.php";
		 }
	 else 
	 {
		document.getElementById("news_").style.display= "none"; 
		 }
	
	/*****************文章单页***********************/
	if (val == "content")
	{
		document.getElementById("showfile").value = "EMS_Content.php";
		document.getElementById("adminfile").value = "admin_content.php";
		}
	
	/*****************图片列表***********************/
	if (val == "picture")
	{
		document.getElementById("pic_").style.display = "block";
		document.getElementById("showfile").value = "EMS_Picture.php";
		document.getElementById("adminfile").value = "admin_picture.php";
		}
	else 
	{
		document.getElementById("pic_").style.display = "none";
		}	
		 
	/*****************产品列表***********************/	 
	 if (val == "product") 
	 {
		 document.getElementById("pro_").style.display = "block";
		 document.getElementById("showfile").value = "EMS_Product.php";
		 document.getElementById("adminfile").value = "admin_product.php";
		 }
	 else 
	 {
		 document.getElementById("pro_").style.display= "none"; 
		 }	
	
	/*****************下载列表***********************/
	if (val == "download")
	{
		document.getElementById("download_").style.display = "block";
		document.getElementById("showfile").value = "EMS_Download.php";
		document.getElementById("adminfile").value = "admin_download.php";
		}
	else
	{
		document.getElementById("download_").style.display = "none";
		}	
	
	/*****************订单列表***********************/
	if (val == "order")
	{
		document.getElementById("ord_").style.display = "block";
		document.getElementById("showfile").value = "EMS_Order.php";
		document.getElementById("adminfile").value = "admin_order.php";
		}
	else
	{
		document.getElementById("ord_").style.display = "none";
		}	
	
	
	/*****************人才招聘***********************/
	if (val == "jobs")
	{
		document.getElementById("showfile").value = "EMS_Jobs.php";
		document.getElementById("adminfile").value = "admin_jobs.php";
		}
	
	/*****************在线留言***********************/
	if (val == "gbook")
	{
		document.getElementById("showfile").value = "EMS_Gbook.php";
		document.getElementById("adminfile").value = "admin_gbook.php";
		}
		
	/*****************友情链接***********************/
	if (val == "link")
	{
		document.getElementById("showfile").value = "EMS_Link.php";
		document.getElementById("adminfile").value = "admin_link.php";
		}
		
	/*****************调查投票***********************/
	if (val == "vote")
	{
		document.getElementById("showfile").value = "EMS_Vote.php";
		document.getElementById("adminfile").value = "admin_vote.php";
		}
		
	/******************视频列表**********************/
	if (val == "video")
	{
		document.getElementById("showfile").value = "EMS_Video.php";
		document.getElementById("adminfile").value = "admin_video.php";
		}
		
	/*****************广告系统***********************/
	if (val == "ads")
	{
		document.getElementById("showfile").value = "EMS_Ads.php";
		document.getElementById("adminfile").value = "admin_ads.php";
		}	
	 
	 /*****************其他类型***********************/
	if (val == "other")
	{
		document.getElementById("showfile").value = "#";
		document.getElementById("adminfile").value = "#";
		}
  }
  
  
 // 复选框操作,下载模块 应用平台栏目调用
 
function ReplaceAll(str, sptr, sptr1)  // 替换字符串函数
{
while (str.indexOf(sptr) >= 0)
{
   str = str.replace(sptr, sptr1);
}
return str;
}

function getcheck($id)
{
  if (document.getElementById($id).checked)
  {
	  if (document.getElementById("win").value.indexOf(document.getElementById($id).value) < 0) 
	  {
	  document.getElementById("win").value += document.getElementById($id).value + "/";
	  }
  }
  else 
  {
	   document.getElementById("win").value = ReplaceAll(document.getElementById("win").value,document.getElementById($id).value + "/","");
  }
				  
} 
