function fabu(state,gotop){
	    if(state==0 || state==1 || state==2){
	    	if(gotop==1){
	    		goto_top();
	    	}
	    }
		if(yonghuexist('username','password')){
//			document.getElementById('zz').style.display='';
//			dwrBusiness.getMemberManagerXinxi(function (rest){
//						var ren,qq,tel,sheng,shi,shi_name;
//						ren="";
//						qq="";
//						tel="";
//						sheng="";
//						shi="";
//						shi_name="";
//						for(var x in rest){
//							if(x=="zhenshixingming"){
//								ren=rest[x];
//							}
//							if(x=="qq"){
//								qq=rest[x];
//							}
//							if(x=="yidong_dianhua")
//							{
//								tel=rest[x];
//							}
//							if(x=="sheng_id"){
//								sheng=rest[x];
//							}
//							if(x=="shi_id"){
//								shi=rest[x];
//							}
//							if(x=="shi"){
//								shi_name=rest[x];
//							}
//						}
//						var Timer=new Date() 
//						var h=Timer.getHours();//小时
//						var m=Timer.getMinutes();//分
//						var s=Timer.getSeconds();//秒
//						var y=Timer.getYear();//年
//						var d=Timer.getDate();//日
//						var yy=Timer.getMonth()+1;//月
//						 s   =  y+"-"+yy+"-"+d+" "+h+":"+m+":"+s;      
//						 d   =   new   Date(Date.parse(s.replace(/-/g,   '/')));      
//						 d.setDate(d.getDate()+30);   
//						  Date.prototype.format = function(format){ 
//							  var o = {  
//							  "M+" : this.getMonth()+1, //month  
//							  "d+" : this.getDate(),    //day     
//							  "h+" : this.getHours(),   //hour     
//							  "m+" : this.getMinutes(), //minute    
//							  "s+" : this.getSeconds(), //second  
//							  "q+" : Math.floor((this.getMonth()+3)/3),  //quarter  
//							  "S" : this.getMilliseconds() //millisecond   
//							  }  
//							  if(/(y+)/.test(format)) 
//							  format=format.replace(RegExp.$1,(this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
//							    for(var k in o)    if(new RegExp("("+ k +")").test(format)) 
//							    format = format.replace(RegExp.$1,RegExp.$1.length==1 ? o[k] : ("00"+ o[k]).substr((""+ o[k]).length));  
//							    return format;
//							    }
//						  document.getElementById("endtime").value= d.format('yyyy-MM-dd hh:mm:ss');
//				        document.getElementById("starttime").value=s;//结束时间
//				        document.getElementById("shi").innerHTML="<select id='shiid' name='shi_id'><option value='"+shi+"'>"+shi_name+"</option>";
//						document.getElementById("sheng").value=sheng;//省
//						document.getElementById("faburen").value=ren;//人
//						document.getElementById("lianxi_fangshi").value=tel;//电话
//						document.getElementById("qq").value=qq;//联系qqq
//				      
//						
//					});
			if(state==1){
				window.location.href=glbRootPath+"/state/state5.html";
			}
			else if(state==2){
				window.location.href=glbRootPath+"/state/state10.html";
			}
			else if(state==3){
				window.location.href=glbRootPath+"/userLogin_userLogin.action"
			}
		}else{
			shangwustate=state;
			document.getElementById("dd").style.display=''; //   显示id="r1"的div标签
	  		//document.getElementById("bb").style.display='none';//   不显示id="r2"的div标签
		}
}
var goto_top_type = -1;
var goto_top_itv = 0;

function goto_top_timer()
{
var y = goto_top_type == 1 ? document.documentElement.scrollTop : document.body.scrollTop;
var moveby = 15;

y -= Math.ceil(y * moveby / 100);
if (y < 0) {
y = 0;
}

if (goto_top_type == 1) {
document.documentElement.scrollTop = y;
}
else {
document.body.scrollTop = y;
}

if (y == 0) {
clearInterval(goto_top_itv);
goto_top_itv = 0;
}
}

function goto_top()
{
if (goto_top_itv == 0) {
if (document.documentElement && document.documentElement.scrollTop) {
goto_top_type = 1;
}
else if (document.body && document.body.scrollTop) {
goto_top_type = 2;
}
else {
goto_top_type = 0;
}

if (goto_top_type > 0) {
goto_top_itv = setInterval('goto_top_timer()', 50);
}
}
}
function selectStr(str){
    var sel=document.getElementById("shiid").options;
    for(var i=0;i<sel.length;i++){
        if(sel.options[i].text==str){
            sel.options[i].selected=true;
        }
    }
}

