function showmenu()
{
	document.write("<DIV class='topmenu'><table cellSpacing=0 cellPadding=0 border=0><TR><TD>");
	for (i=0; i<menus.length; i+=2)
	 {
		if (i>0)
			document.write("&nbsp;|&nbsp;");
	  document.write("<A onmouseover=\"this.style.color='red'\" style='CURSOR: hand' onmouseout=\"this.style.color='black'\" href=\""+menus[i+1]+"\" target=_blank><B>"+menus[i]+"</B></A>");
	 }  
	document.write("</TD></TR></table></DIV>");
}



rcata=new Array(6);
rcata[0]="私人产权";
rcata[1]="1";
rcata[2]="居住权";
rcata[3]="2";
rcata[4]="公有产权";
rcata[5]="3";

function rc(ci)
{
  for (i=0; i<rcata.length; i+=2)
   {
   if (rcata[i+1]==ci)
  document.write(rcata[i]);
   }
}

function rcall(ci)
{
  for (i=0; i<rcata.length; i+=2)
   {
     document.write("<input type=radio name=houseright value="+rcata[i+1]);
     if (rcata[i+1]==ci)
     	document.write(" checked ");
     if (i==0 && ci==0)
      	document.write(" checked ");     	
     document.write(">"+rcata[i]);
   }
}




hcata=new Array(11);
hcata[0]="住宅";
hcata[1]="1";
hcata[2]="别墅";
hcata[3]="2";
hcata[4]="写字楼";
hcata[5]="3";
hcata[6]="商铺";
hcata[7]="4";
hcata[8]="厂房与库房";
hcata[9]="5";
hcata[10]="其它";
hcata[11]="6";

function sc(ci)
{
  for (i=0; i<hcata.length; i+=2)
   {
   if (hcata[i+1]==ci)
  document.write(hcata[i]);
   }
}

function scall(ci)
{
  for (i=0; i<hcata.length; i+=2)
   {
     document.write("<input type=radio name=housecata value="+hcata[i+1]);
     if (hcata[i+1]==ci)
     	document.write(" checked ");
     if (i==0 && ci==0)
      	document.write(" checked ");     	
     document.write(">"+hcata[i]);
   }
}

htype=new Array(7);
htype[0]="一室/一室一厅";
htype[1]="1";
htype[2]="两室/两室一厅";
htype[3]="2";
htype[4]="三室/三室二厅";
htype[5]="3";
htype[6]="三室以上";
htype[7]="4";


function ht(ci)
{
  for (i=0; i<htype.length; i+=2)
   {
   if (htype[i+1]==ci)
  	document.write(htype[i]);
   }
}

function htall_chen(cid,frmx)
{
	  frmx.length=0;
	  frmx.length++;
  		  frmx.options[0].value='0';
          frmx.options[0].text='不限制';


      for(i=0;i<htype.length;i+=2)
      {
          frmx.length++;
//		  frmx.options[0].value='0';
//          frmx.options[0].text='不限制';

          frmx.options[frmx.length-1].value=htype[i+1];
          frmx.options[frmx.length-1].text=htype[i];
          if (cid!=0)
    	    {
          	if (htype[i+1]==cid)
          		frmx.options[frmx.length-1].selected=true;
            }
      }
}

function htall(cid,frmx)
{
      frmx.length=0;
      for(i=0;i<htype.length;i+=2)
      {
          frmx.length++;
          frmx.options[frmx.length-1].value=htype[i+1];
          frmx.options[frmx.length-1].text=htype[i];
          if (cid!=0)
    	    {
          	if (htype[i+1]==cid)
          		frmx.options[frmx.length-1].selected=true;
            }
      }
}



btype=new Array(7);
btype[0]="多层住宅";
btype[1]="1";
btype[2]="小高层(不超过15层)";
btype[3]="2";
btype[4]="高层(15层以上)";
btype[5]="3";
btype[6]="平房";
btype[7]="4";
btype[8]="其他";
btype[9]="5";

function bt(ci)
{
  for (i=0; i<btype.length; i+=2)
   {
   if (btype[i+1]==ci)
  	document.write(btype[i]);
   }
}

function btall(cid,frmx)
{
      frmx.length=0;
      for(i=0;i<btype.length;i+=2)
      {
          frmx.length++;
          frmx.options[frmx.length-1].value=btype[i+1];
          frmx.options[frmx.length-1].text=btype[i];
          if (cid!=0)
    	    {
          	if (btype[i+1]==cid)
          		frmx.options[frmx.length-1].selected=true;
            }
      }
}





rtype=new Array(7);
rtype[0]="全租";
rtype[1]="1";
rtype[2]="合租";
rtype[3]="2";
rtype[4]="合租限男性";
rtype[5]="3";
rtype[6]="合租限女性";
rtype[7]="4";


function rt(ci)
{
  for (i=0; i<rtype.length; i+=2)
   {
   if (rtype[i+1]==ci)
  	document.write(rtype[i]);
   }
   	
}


function rtall(ci)
{
  for (i=0; i<rtype.length; i+=2)
   {
     document.write("<input type=radio name=renttype value="+rtype[i+1]);
     if (rtype[i+1]==ci)
	document.write(" checked ");
     if (i==0 && ci==0)
      	document.write(" checked ");

     document.write(">"+rtype[i]);
   }
}
