$(document).ready(function(){
    $(".titleName2").toggle(
      function () {
        $('.typeUlChild').css({display:'none'});
        $(this).next('ul').css({display:'block'});
      },
      function () {
        $('.typeUlChild').css({display:'none'});
        $(this).next('ul').css({display:'none'});
      }
    );

});


//验证码变换
function newgdcode(obj,url)
{
    obj.src = url + '?nowtime=' + new Date().getTime();
    //后面传递一个随机参数，否则在IE7和火狐下，不刷新图片
}

//首页广告
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//显示产品大图。图层
function showBigImg(proName) {
  dialog(proName,"id:textimg","500px","auto","id");
}

//密码强度认证
function checkPwdSafe(test) {
	atext = new Array("太短","很弱","一般","很强");
	if(test.length < 6) {
		$("#chkpswd").attr("class","psdiv1");
		$("#chkpswdcnt").html("太短");
	}else{
		var num = Evaluate(test) + 1;
		$("#chkpswd").attr("class","psdiv" + num);
		$("#chkpswdcnt").html(atext[Evaluate(test)]);
	}
}

function Evaluate(word){
　　	return word.replace(/^(?:([a-z])|([A-Z])|([0-9])|(.)){5,}|(.)+$/g, "$1$2$3$4$5").length;
}
//省份联运菜单
function getRegion(oThis, sel_name, acts) {
    var myThis = jQuery(oThis);
    var curId = myThis.val();

    while(myThis.next().length>0){
        myThis.next().remove();
    }
    if (curId=="") return;

    var webURL="/?ctr=ajax&act="+ acts +"&id="+curId+"&names="+sel_name;

    var html=$.ajax({
        url:webURL,
        cache:false,
        async:false
    }).responseText;

    myThis.parent().append(html);
}

