function CheckForm_advertising(theform)
{   

	if(theform.advertising_menu.value==0)
   {
      alert("广告类别不能为空，请填写！！"); 
	  theform.advertising_menu.focus(); 
	  return false;
    }
	
	if(theform.advertising_name.value=="")
   {
      alert("广告名称不能为空，请填写！！"); 
	  theform.advertising_name.focus(); 
	  return false;
    }
	

	 //判断网址链接开始
	   var   b   =   document.getElementsByName("advertising_urlflag"); 
      for(i=0;i<b.length;i++)   
      {  
  if(b[i].checked&&parseInt(b[i].value)==1)   
   {
   
	if(theform.advertising_url.value==""||theform.advertising_url.value=="http://")
   {
      alert("链接地址不能为空，请填写！！"); 
	  theform.advertising_url.focus(); 
	  return false;
    }
	
	 }  
      }   
	 //判断网址链接结束
	
		//判断图片上传开始
	  var   a   =   document.getElementsByName("advertising_imageflag"); 
      for(i=0;i<a.length;i++)   
      {  
  if(a[i].checked&&parseInt(a[i].value)==1)   
   {
   if (theform.advertising_image.value =="")
     {
        alert("请上传图片!");
		theform.advertising_image.focus(); 
	return false;
     }
   }  
      }   
	 //判断图片上传结束
	

}