

	window.onload = function() {

	//	fnScrollUl("ulZxgg");
	}



	function fnScrollUl(id) {
		var parent = $(id).getElementsByTagName("ul")[0];
		var child = $(id).getElementsByTagName("li");
		var i=0;
		var timer;
		var speed = 200;//滚动速度
		var pauseTime = 2500;//停顿时间

		function reset(){
			parent.style.position="absolute";
			parent.style.left=0;
			parent.style.top=0;
		}

		function pauseScroll(){
			clearInterval(timer);
			setTimeout(function(){
				startScroll();
			},pauseTime);
		}

		function startScroll(){
			timer = setInterval(function(){
				parent.style.top = parent.offsetTop-5+"px";
				if(parent.offsetTop%child[0].clientHeight==0){
					pauseScroll();
				}
				if(parent.offsetTop==-child[0].clientHeight*child.length/2){
					reset();
				}
			},speed);
		}

		parent.innerHTML += parent.innerHTML;
		reset();
		pauseScroll();
	}

	function fnChangeTab(id) {

		var max = 6;
	
		var i;
		for (i = 1; i <= max; i++) {
			var Cname = "li" + i
			var Tname = "li" + id
			var TnameON = Tname + "_on"
			document.getElementById(Cname).className = Cname;
			document.getElementById("tabCont" + i).style.display = "none";
			//alert(Cname);
		}
		document.getElementById(Tname).className = TnameON;

		//document.getElementById("tab"+id).className="on";
		document.getElementById("tabCont" + id).style.display = "block";
	}
		function $(id) {
		return document.getElementById(id);
	}
	//显示弹出框
	function showDiv(id) {
		var d = $(id);
		var m = $("divMask");
		m.style.display = "";
		d.style.display = "";
		var body = (document.documentElement || document.body);
		var top = (body.clientHeight - d.offsetHeight) / 2 + body.scrollTop;
		d.style.top = top + "px";
		m.style.height = body.scrollHeight + "px";
	}
	//关闭弹出框
	function closeDiv(id) {
		var m = $("divMask");
		var d = $(id);
		d.style.display = "none";
		m.style.display = "none";
		if(id=="login_div"){
			$('msgpid').style.display='none';
			$('msgpid_en').style.display='none';
		}
	}
	//询价

	function q(index) {	
		var num = $("num" + index).value;
		var patrn = /^[0-9]{1,6}$/;
		if (!patrn.exec(num)) {
			alert("请输入正确的人数");
			$("num" + index).focus();
			return;
		}
		if (num < 5) {
			alert("最少起售5用户");
			return;
		}
		$("regnum").value = num;
		if (num >= 500) {
			fnChangeTab(6);
			return;
		}
		var url = "domain/domainQueryPrice?type=1g&num="
				+ num;
		XMLHttp.sendReq('GET', url, null, callbackQuery, null);
		document.formVIPFake.khcount.value=num;
		$("biz_person").innerHTML = num;
		$("stand_person").innerHTML = num;
		$("biz_size").innerHTML = num + "×3G";
		$("stand_size").innerHTML = num + "×1G";
		showDiv('query_div');
	}
	
	
	function CheckQuick(frm)
	{
		//alert(111);
		
		
		if(frm.quickpro.value.length<2)
		{
			alert("请填写您想购买的产品或需求");
			return false;
		}
		
		
		if(frm.quickname.value.length<2)
		{
			alert("请正确填写您的姓名");
			return false;
		}
		
		
		
		if(frm.quicktel.value.length<7)
		{
			alert("请正确填写您的联系电话");
			return false;
		}
		
		
		return true;
		
	}
