function changViewDesc(bdid,bddesc,bid2,bd2,rvs,rvsn,rve,rven){
		changeText(bdid,bddesc,bid2,bd2);
		bgid(rvs).value=rvsn;
		bgid(rve).value=rven;
	}
	
function changViewDescN(bdid,bddesc,bid2,bd2,rvs,rvsn,rve,rven){
		changeText(bdid,bddesc,bid2,bd2);
		bgbuy(rvs).value=rvsn;
		bgbuy(rve).value=rven;
	}	
function changViewDescN2(bdid,bddesc,bid2,bd2,rvs,rvsn,rve,rven){
		changeText(bdid,bddesc,bid2,bd2);
		bgzl(rvs).value=rvsn;
		bgzl(rve).value=rven;
	}
function changViewDescEN2(bdid,bddesc,bid2,bd2,rvs,rvsn,rve,rven){
		changeText(bdid,bddesc,bid2,bd2);
		bgzl(rvs).value=rvsn;
		bgzl(rve).value=rven;
		
	}	
function selectHouseKindMethod(divcss,des,n,csscont,name,id){
		changeText(divcss,des,n,csscont);
		bgzl(name).value=id;		
	}	
	
	
	
function bgbuy(rn){
		return eval('document.househzhsearchform.'+rn);
	}	
function bgzl(rn){
		return eval('document.househzhsearchlzform.'+rn);
	}		
	
	
function bgid(dom){
		return document.getElementById(dom);
	}

function checkhzcomment(theForm){
	if(theForm.contents.value==''){
		alert('请您输入留言或评论');
		theForm.contents.focus();
		return false;
	}
	if(theForm.contents.value.length<2||theForm.contents.value.length>120){
		alert('输入字符在2---120之间');
		theForm.contents.focus();
		return false;		
	}
}
 

function submitDuiBi(){if(!hcheckcontrast(document.getElementById('contralFormEx'))){}else{document.getElementById('contralFormEx').submit();}}



function clubSaveSearchMethod(){
	var theform = document.getElementById('houseSearchFormDesc');
	theform.myClubSaveValue.value='';
	var favform=document.getElementById('contralFormEx');
	var favobj=document.getElementById('contastid');
	if(!hcheckcontrast(favform)){ 
	}else{
		for(var i=0;i<favform.contastid.length;i++){
			if(favform.contastid[i].checked){
				setClubSaveStr(favform.contastid[i].value,theform);
				
			}
		}
		theform.submit();
	}
	
}
function setClubSaveStr(fav,theform){
	if(theform.myClubSaveValue.value==''){
		theform.myClubSaveValue.value=fav;
	}else{
	theform.myClubSaveValue.value=theform.myClubSaveValue.value+','+fav;}
 
}
function hcheckcontrast(theForm){var s=0;if(theForm.contastid.length>1){for(var ij=0;ij<theForm.contastid.length;ij++){if(theForm.contastid[ij].checked){s=2;}}if(s==0){alert("请选择对比");return false;}}else{if(!theForm.contastid.checked){alert("请选择对比");return false;}}return true;}

function clubBrokerIdea(pid){
	var request='http://club.homelink.com.cn/json.aspx?action=setBrokerIdeaInsertForm&pointid='+pid;
	window.open(request,'ideaWindow','width=600,height=400');
}
function clubCommont(pid){
	var request='http://club.homelink.com.cn/json.aspx?action=setUserVoteCommentEx&pointid='+pid+'&kind=1&types=2&score=1&aimtype=1&aimid='+pid;
		window.open(request,'voteDetail','width=500,height=400')
	}

function checkFunctionLeaveWord(theForm){
	if(theForm.descriptions.value==''){
		alert('请您输入留言或评论');
		theForm.descriptions.focus();
		return false;
	}
	if(theForm.descriptions.value.length<2||theForm.descriptions.value.length>120){
		alert('输入字符在2---120之间');
		theForm.descriptions.focus();
		return false;		
	}
}
function bakid(id){
	return document.getElementById(id);
}
function submitBack(pid,pname){
	if(pname.value==''){
		alert('请您输入留言或评论');
		pname.focus();
		return false;
	}
	if(pname.value.length<2||pname.value.length>120){
		alert('输入字符在2---120之间');
		pname.focus();
		return false;		
	}
	bakid('objid').value=pid;
	bakid('brokerdesc').value=pname.value;
	bakid('brokerLeaveWordForm').submit();
}
function clearShowDialg(objid){
	objid.style.display='none';
	//objid.style.display);
}
function loadTag(id,pid,cname){
	var mygmsues='';
	viewTagControl(id,cname);
    var sid=id-1;
	var res='houseinfo_con_'+id;
	bakid(res).innerHTML='<table width="100%" border="0" cellspacing="0" height="200" align="center">  <tr> <td align="center"><img src="images/ldata.gif" /></td> </tr> </table>';
	var ajax=new AJAXRequest;
	 ajax.get(
	  "/json.aspx?action=getBrokerInfoDesc&pointid="+pid+'&tag='+id+'&TAB_VALUE='+sid+"&n="+Math.random(),
	  function(obj) {
		mygmsues=obj.responseText;
			bakid(res).innerHTML=mygmsues;
			
		 })
 
}
function viewTagControl(vid,cname){
	var vdesc='houseinfo_con_'+vid;
	for(var i =1;i<=5;i++){
		bakid('houseinfo_con_'+i).style.display='none';
		bakid(cname+i).className='';
	}bakid(vdesc).style.display='block';
	bakid(cname+vid).className='on';
}
    // The idea borrowed from dynamicDrive.com

    var initialtab = [1, "sc1"]

    var previoustab = "";
    var intv;

    function expandcontent(cid, aobject)
        {
        stopTimer();

        highlighttab(aobject)

        if (previoustab != "")
            document.getElementById(previoustab).style.display = "none"

        document.getElementById(cid).style.display = "block"
        previoustab = cid
        }

    function highlighttab(aobject)
        {
        stopTimer();

        if (typeof tabobjlinks == "undefined")
            collectddimagetabs()

        for (i = 0; i < tabobjlinks.length; i++)
            tabobjlinks[i].className = ""

        aobject.className = "current"
        }

    function collectddimagetabs()
        {
        var tabobj = document.getElementById("ddimagetabs")
        tabobjlinks = tabobj.getElementsByTagName("A")
        }

    function do_onload()
        {
        collectddimagetabs()
        expandcontent(initialtab[1], tabobjlinks[initialtab[0] - 1])
        }

    function startTimer()
        {
        intv = setTimeout("expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])", 2000);
        }

    function stopTimer()
        {
        clearTimeout(intv);
        }
	//Event.observe(window, 'load', do_onload, false);
