// JavaScript Document

$(function(){
	var $tabmenuli=$('.protab .2014pro');
	$tabmenuli.hover(function(){
		var tabindex=$tabmenuli.index(this);
		$(this).addClass("hover").siblings().removeClass("hover");
	});
});


function ziliaoDiv_box(ids){
$.ajax({
  type:'get',
  url:'/index.php?m=formguide&c=index&a=show&formid=58',
  data:{
  },
  dataType : 'html',
  cache : false,
  success:function(msg){
	  //alert(msg);
	  $("#"+ids).html(msg);
	  $("#ziliaoDiv").show();
	  $("#bg").show();
	 },
  error : function(XMLHttpRequest, textStatus, errorThrown) {
	  alert("request error!");
  }
  });
}


function jiageDiv_box(ids){
$.ajax({
  type:'get',
  url:'/index.php?m=formguide&c=index&a=show&formid=57',
  data:{
  },
  dataType : 'html',
  cache : false,
  success:function(msg){
		
	  $("#"+ids).html(msg);
	  $("#jiageDiv").show();
	  $("#bg").show();
	 },
  error : function(XMLHttpRequest, textStatus, errorThrown) {
	  alert("request error!");
  }
  });
}

function showDowninfo(id){
	//var id = $(".showDowninfo .a").attr('id');
	//alert(this);
	$.ajax({
	  type:'get',
	  url:'/index.php?m=formguide&c=index&a=Downinfo',
	  data:{zid:id,time:Math.random()},
	  dataType : 'html',
	  cache : false,
	  success:function(msg){
		  $("#down_info").html(msg);
		  $("#Downinfo").show();
		  $("#bg").show();
		 },
	  error : function(XMLHttpRequest, textStatus, errorThrown) {
		  alert("request error!");
	  }
	});
}

function showDowninfo3(id){
	if(id=="1025"){
		//alert(id);
		var down_url = "http://www.zwcad.com/product/mep/zwdown_mep.html?act=zwsoft_1015_1";
	}else{
		var down_url = "http://www.zwcad.com/product/mujucad/zwdown_muju.html?act=zwsoft_1015_1";
	}
	$.ajax({
	  type:'get',
	  url:down_url,
	  data:{
	  },
	  dataType : 'html',
	  cache : false,
	  success:function(msg){
		  $("#down_info").html(msg);
		  $("#Downinfo").show();
		  $("#bg").show();
		 },
	  error : function(XMLHttpRequest, textStatus, errorThrown) {
		  alert("request error!");
	  }
	  });
}

function showDivinfo_2014(){ 
	$.ajax({
	  type:"POST",
	   url:"http://www.zwcad.com/product/plus/zwcad_plus_down.html?act=2d",
	  data:{dosubmit:1},
	  success:function(data){
	  	  $('#down_info').empty().append(data);
	  }
	  });
	$('#Downinfo').show();
	$('.bg').show();
}

function load_zwcadplus(pos){ 
	$.ajax({
	  type:"POST",
	  url:"http://www.zwcad.com/product/plus/zwcad_plus_down.html?act="+pos,
	  data:{dosubmit:1},
	  success:function(data){
		  //alert(data);
	  	  $('.down_info2').empty().append(data);
	  }
	  });
	$('#popDiv13').show();
	$('.bg2').show();
} 

function showDown3Dinfo(pid,zwpname,pcatname,cathtml){
	document.getElementById("ccc_pro_div").innerHTML = "&nbsp;&nbsp;加载中……";
	var dddd =1;
	//ccc_pro_xmls(pid,1,zwpname,pcatname,cathtml);
	$.ajax({
	  type:'get',
	  url:'/index.php?m=formguide&c=index&a=show&formid=64&pid='+pid+'&dddd='+dddd+'&fenlei='+encodeURIComponent(pcatname)+'&zwpname='+encodeURIComponent(zwpname)+'&cathtml='+cathtml,
	  data:{},
	  dataType : 'html',
	  cache : false,
	  success:function(msg){
		  $("#down_info").html(msg);
		  $("#Downinfo").show();
		  $("#bg").show();
		 },
	  error : function(XMLHttpRequest, textStatus, errorThrown) {
		  alert("request error!");
	  }
	});
	//document.getElementById('capopDivOK').style.display='block';
	//document.getElementById('bg').style.display='block';
}

 
function GetQueryStringUrl(sProp)   
{   
	var re = new RegExp("[&,?]"+sProp + "=([^\\&]*)", "i");   
	var a = re.exec(document.location.search);   
	if (a == null)   
		return "";   
	return a[1];   
}  

function setTab_Box(curSel){
	$(".tab_con").eq(curSel).show().siblings('.tab_con').hide();
	$('.pronavlist li').eq(curSel).addClass("qq").siblings().removeClass("qq");
}