function getxxtwo(id)
{
	
	$.get('/index.php/JavaScript/getxxtwo'
			,{id:id}
			,function(data){
				$("#ypxxtwo_id").html(data)
				}
	)
	$("#ypxxtwo_id").ajaxStop(function(){
		//$('#fDiv').html(".....")
		}	
	)
}
function getcity(id)
{
	//$("#addtwo_id").ajaxStart(function(){
	//	$('#addtwo_id').html("<option>Data Loading...</option>")
	//	}	
	//)
	$.get('/index.php/JavaScript/GetCity'
			,{id:id}
			,function(data){
				$("#addtwo_id").html(data)
				}
	)
}
function MgMonthGet(year)
{
	$("#mgMonth").ajaxStart(function(){
		$('#mgMonth').html("Data Loading...")
		}	
	)
	$.get('/index.php/Magazine/MonthMg'
			,{year:year}
			,function(data){
				$("#mgMonth").html(data)
				}
	)
}
//用户名检测
function chk(val)
{
	$("#check_info").ajaxStart(function(){
			$("#check_info").html("<font color=red>检测中......</font>")
		}	
	)
	$.get('/index.php/Login/RegChk'
			,{username:val}
			,function(data){
				$("#check_info").html(data)
			}
	)
}
function setOption(actName,pid,state)
{
	$.get('/index.php/User/'+actName
			,{pid:pid,state:state}
			,function(data){
				$("#show"+pid).html(data)
				}
	)
}
 // 增加行业分类
 function addxx()
 {
   if (document.theForm.xxtwo.value == "" )
   {
     alert("请先选择行业小类！");
     return ;
   }
   if (document.theForm.xxonetwo.options.length >= 1)
   {
     alert("您目前最多只能选择一个行业分类！");
     return;
   }

   idx = document.theForm.xxtwo.selectedIndex;
   val = document.theForm.xxtwo.options[idx].value;
   // 检查是否有重复的选择
   for ( i= document.theForm.xxonetwo.options.length-1 ;i>=0; i-- )
   {
     if ( document.theForm.xxonetwo.options[i].value == val )
     {
       alert("您已经选择过该行业！");
       return;
     }
     else
     {
       if (  document.theForm.xxonetwo.options[i].value == '' && val != '')
       {
           document.theForm.xxonetwo.remove(i);
       }
     }
   }
   xoid=document.theForm.xxone.selectedIndex;
   name = document.theForm.xxone.options[xoid].text+"·"+document.theForm.xxtwo.options[idx].text;
   document.theForm.xxonetwo.add(Option(name,val));
 }
 //删除所选行业
 function delxx()
 {
   if ( document.theForm.xxonetwo.options.length == 0 )
     return ;

   if ( document.theForm.xxonetwo.value != "" )
   {
       document.theForm.xxonetwo.remove(document.theForm.xxonetwo.options.selectedIndex);
   }
 }