function showHidd(){
	var topHeg = 500;
	var sTopHeg = 50;
	var getId = function(a1){return document.getElementById(a1);}
	
	function picShow(a1,a2,a3){
		var theObj = getId(a1);
		var v = 1;
		var h = 0;
		theObj.style.display = "block";
		theObj.style.height = h;
		function theShow(){
			v *= a3;
			h += v 
			if(h<a2){
				theObj.style.height = h + "px";
			}
			else{
				theObj.style.height = a2 + "px";
				clearInterval(turn_show);
				//clearTimeout(turn_show);
			}
			//var turn_show = setTimeout(theShow(),20);
		}
		var turn_show = window.setInterval(function(){theShow()},20);
	}
	//picShow("cover1",460,1.1);
	function picHidd(b1,b2,b3){
		var theObj = getId(b1);
		var h = b2;
		var v = 1;
		function theShow(){
			v *= b3;
			h -= v;
			if(h<0){
				theObj.style.display = "none";
				clearInterval(turn_hidd);
			}
			else{
				theObj.style.height = h + "px";
				
			}
		}
		var turn_hidd = window.setInterval(function(){theShow()},20);
	}
	//picHidd("cover1",460,1.1);
	function init_picHidd(b1,b2,b3,b4,b5,b6){
		var theObj = getId(b1);
		var h = b2;
		var v = 1;
		function theShow(){
			v *= b3;
			h -= v;
			if(h<0){
				theObj.style.display = "none";
				theObj.style.height = "0px"
				picShow(b4,b5,b6);
				clearInterval(turn_hidd);
				
			}
			else{
				theObj.style.height = h + "px";
				
			}
		}
		var turn_hidd = window.setInterval(function(){theShow()},20);
	}
	function initia(){
		picShow("cover1",topHeg,1.15);
		setTimeout(function(){init_picHidd("cover1",topHeg,1.2,"cover2",sTopHeg,1.15)},5000)
	}
	initia();
	getId('sp1').onclick = function(){
		init_picHidd("cover2",sTopHeg,1.15,"cover1",topHeg,1.15);
	}
	getId('sp2').onclick = function(){
		init_picHidd("cover1",topHeg,1.15,"cover2",sTopHeg,1.15);
	}
	
}

function checkform(form)
{
	if(jQuery.trim(form.username.value)=='')
	{
		alert('邮箱不能为空');
		form.username.focus();
		return false;
	}

	if(!isEmail(jQuery.trim(form.username.value)))
	{
		alert('邮箱格式错误');
		form.username.focus();
		return false;
	}
	
	if(jQuery.trim(form.nickname.value)=='')
	{
		alert('昵称不能为空');
		form.nickname.focus();
		return false;
	}
	if(jQuery.trim(form.realname.value)=='')
	{
		alert('真实姓名不能为空');
		form.realname.focus();
		return false;
	}
	if(form.salary.value=='')
	{
		alert('月收入不能为空');
		form.salary.focus();
		return false;
	}
	if(jQuery.trim(form.mobile.value)=='')
	{
		alert('手机号不能为空');
		form.mobile.focus();
		return false;
	}
	if(!isMobile(jQuery.trim(form.mobile.value)))
	{
		alert('不是有效的手机号码');
		form.mobile.focus();
		return false;
	}
	if(form.dateForm_year.value=='-1')
	{
		alert('年不能为空！');
		form.dateForm_year.focus();
		return false;
	}
	if(form.dateForm_month.value=='-1')
	{
		alert('月不能为空！');
		form.dateForm_month.focus();
		return false;
	}
	if(form.dateForm_day.value=='-1')
	{
		form.dateForm_day.focus();
		alert('日不能为空！');		
		return false;
	}
	if(form.areaForm_workProvince.value=='-1')
	{
		form.areaForm_workProvince.focus();
		alert('居住地不能为空！');		
		return false;
	}	
	if(form.agree.checked!=true)
	{
		alert('请选择是否同意服务条款！');
		return false;
	}
	return true;
}

//判断是否登录
var now=new Date();
var number = now.getSeconds();
var islogin = false;
jQuery.getJSON("/runajax/checklogin/", function(json){
if(json != false ){
	islogin =true;
	jQuery("#login").hide();
	jQuery("#checklogin").html('<span style="color:#000">欢迎！&nbsp;<b>' + decodeURIComponent(json) + '</b>&nbsp;&nbsp;&nbsp;<a href="/page/logout/">退出</a></span>');
}else{
	jQuery("#logined").hide();
}
});
