﻿/*/////////////////////////////////
房源等其他页面的右侧
作者:zcm123
/////////////////////////////////*/


/*
房源内容页面右侧  
该区域其他房源 top 7 id desc
*/
function get_houselist(op)
{
    var top = 7;
    var msg = $("#left1");
    var houseAreaName = $("#houseAreaNames").val();
    
    msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");

    $.get("/house_msg.aspx?zcm"+Math.random()+"="+Math.random(),
         {op:op,top:top,houseAreaName:escape(houseAreaName)},
         function(data){
         msg.html(data);
        
    });
    
}



//function get_houselist5(op)
//{
//    var top = 5;
//    var msg = $("#left2");
//    
//    msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");

//    $.get("/house_msg.aspx?zcm"+Math.random()+"="+Math.random(),
//         {op:op,top:top},
//         function(data){
//         msg.html(data);
//        
//    });
//    
//}
/*
房源列表页面左侧第一块  
假日房源 top 8 id desc
*/
function get_houselist2(op)
{
    var top = 9;
    var msg = $("#left3");
    
    msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");

    $.get("/house_msg.aspx?zcm"+Math.random()+"="+Math.random(),
         {op:op,top:top},
         function(data){
         msg.html(data);
        
    });
    
}
/*
房源列表页面左侧第一块  
假日房源 top 8 id desc
*/
function get_houselist31(op)
{
    var top = 9;
    var msg = $("#left3");
    
    msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");

    $.get("/house_msgsp.aspx?zcm"+Math.random()+"="+Math.random(),
         {op:op,top:top},
         function(data){
         msg.html(data);
        
    });
    
}
/*
房源内容页面右侧2块  
假日房源 top 5 id desc
*/
function get_houselist3(op)
{
    var top = 8;
    var msg = $("#left2");
    
    msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");

    $.get("/house_msg.aspx?zcm"+Math.random()+"="+Math.random(),
         {op:op,top:top},
         function(data){
         msg.html(data);
        
    });
    
}
function get_houselist4(op)
{
    var top = 4;
    var msg = $("#left2");
    
    msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");

    $.get("/house_msg.aspx?zcm"+Math.random()+"="+Math.random(),
         {op:op,top:top},
         function(data){
         msg.html(data);
        
    });

}

function get_houselist5(op,cls) {
    var top = 13;
    var msg = $("#left1");
    var price = $("#housePrice").val();

    msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");
   // alert(op);
   // alert(top);
    // alert($("#housePrice").val()*5);
    // alert(price);
    
    $.get("/house_msg.aspx?zcm" + Math.random() + "=" + Math.random(),
         { op: op, top: top, price: parseInt(price),cls:cls },
         function(data) {
             msg.html(data);

         });

     }

     function get_houselist6(op, cls) {
         var top = 10;
         var msg = $("#left2");
         var tags = $("#tags").val();

         msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");
         // alert(op);
         // alert(top);
         // alert($("#housePrice").val()*5);
         // alert(price);

         $.get("/house_msg.aspx?zcm" + Math.random() + "=" + Math.random(),
         { op: op, top: top, tags: escape(tags), cls: cls },
         function(data) {
             msg.html(data);

         });

     }

     function get_houselist1(op) {
         var top = 10;
         var msg = $("#xqHouseLists");
         var houseAreaName = $("#xqName").html();
        //    alert(houseAreaName);
         msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");
//          alert(op);
//          alert(top);
//          alert($("#titleTxt").val()*5);
//          alert(price);

         $.get("/house_msg.aspx?zcm" + Math.random() + "=" + Math.random(),
         { op: op, top: top, houseAreaName: escape(houseAreaName) },
         function(data) {
             msg.html(data);
         });

     }

     function get_houselist11(op) {
         var top = 30;
         var msg = $("#xqHouseLists");
         var houseAreaName = $("#xqName").html();
         //    alert(houseAreaName);
         msg.html("<ol id=\"gbook\"><img src=\"/load.gif\" align=\"absmiddle\" /> 房源加载中…</ol>");
         //          alert(op);
         //          alert(top);
         //          alert($("#titleTxt").val()*5);
         //          alert(price);

         $.get("/house_msg.aspx?zcm" + Math.random() + "=" + Math.random(),
         { op: op, top: top, houseAreaName: escape(houseAreaName) },
         function(data) {
             msg.html(data);
         });

     }

     function outPutCal() {
       
         document.writeln("       <table id=\"cal\" width=\"730\" border=\"1\" align=\"center\" cellpadding=\"5\"  style=\"border-collapse: collapse; display:none");
         document.writeln("                line-height: 2.6em;\" bordercolor=\"#DABD77\" bgcolor=\"#FFFFFF\">");
         document.writeln("                <tr>");
         document.writeln("                    <td height=\"28\">");
         document.writeln("                        <table cellpadding=\"5\" style=\" margin:10px;\">");
         document.writeln("                            <tr>");
         document.writeln("                             <td width=\"160\" height=\"30\">");
         document.writeln("                                    [按揭成数]  <SELECT size=1 name=\"ajcs\" id=\"ajcs\">");
         document.writeln("                                      <OPTION value=7 selected>7成<\/OPTION>");
         document.writeln("                                      <OPTION value=6>6成<\/OPTION>");
         document.writeln("                                      <OPTION value=5>5成<\/OPTION>");
         document.writeln("                                      <OPTION value=4>4成<\/OPTION>");
         document.writeln("                                      <OPTION  value=3>3成<\/OPTION>");
         document.writeln("                                      <OPTION  value=2>2成<\/OPTION>");
         document.writeln("                                  <\/SELECT>");
         document.writeln("                                <\/td>");
         document.writeln("                                <td width=\"160\" height=\"30\">");
         document.writeln("                                    [评估单价]<input id=\"pgPrice\" runat=\"server\" readonly=\"true\" \/> 元\/m<sup>2<\/sup>");
         document.writeln("                                <\/td>");
         document.writeln("                                <td width=\"160\">");
         document.writeln("                                    [面积]<input id=\"houseAreatxt2\" runat=\"server\"  readonly=\"true\" \/> m<sup>2<\/sup>");
         document.writeln("                                <\/td>");
         document.writeln("                                <td width=\"180\">");
         document.writeln("                                    [按揭年数]");
         document.writeln("                                    <select id=\"years\" size=\"1\" name=\"ajns\" >");
         document.writeln("                                        <option value=\"1\">1<\/option>");
         document.writeln("                                        <option value=\"2\">2<\/option>");
         document.writeln("                                        <option value=\"3\">3<\/option>");
         document.writeln("                                        <option value=\"4\">4<\/option>");
         document.writeln("                                        <option value=\"5\">5<\/option>");
         document.writeln("                                        <option value=\"6\">6<\/option>");
         document.writeln("                                        <option value=\"7\">7<\/option>");
         document.writeln("                                        <option value=\"8\">8<\/option>");
         document.writeln("                                        <option value=\"9\">9<\/option>");
         document.writeln("                                        <option value=\"10\">10<\/option>");
         document.writeln("                                        <option value=\"11\">11<\/option>");
         document.writeln("                                        <option value=\"12\">12<\/option>");
         document.writeln("                                        <option value=\"13\">13<\/option>");
         document.writeln("                                        <option value=\"14\">14<\/option>");
         document.writeln("                                        <option value=\"15\">15<\/option>");
         document.writeln("                                        <option value=\"16\">16<\/option>");
         document.writeln("                                        <option value=\"17\">17<\/option>");
         document.writeln("                                        <option value=\"18\">18<\/option>");
         document.writeln("                                        <option value=\"19\">19<\/option>");
         document.writeln("                                        <option value=\"20\" selected>20<\/option>");
         document.writeln("                                        <option value=\"25\">25<\/option>");
         document.writeln("                                        <option value=\"30\">30<\/option>");
         document.writeln("                                    <\/select> 年");
         document.writeln("                                <\/td>");
         document.writeln("                               ");
         document.writeln("                            <\/tr>");
         document.writeln("                            <tr> ");
         document.writeln("                            <td width=\"180\">");
         document.writeln("                                    [评估总房款]<input id=\"pgze\" value=\"35.22\" type=\"text\"  \/>");
         document.writeln("                                    万元");
         document.writeln("                                <\/td>");
         document.writeln("                                <td class=\"a\">");
         document.writeln("                                    [贷款总额]<input id=\"dkze\" type=\"text\"  \/>");
         document.writeln("                                    万元");
         document.writeln("                                <\/td>");
         document.writeln("                                <td>");
         document.writeln("                                    [还款总额]<input id=\"hkze\" type=\"text\"  \/>");
         document.writeln("                                    万元");
         document.writeln("                                <\/td>");
         document.writeln("                                <td>");
         document.writeln("                                    [支付利息款]<input id=\"zflx\" type=\"text\"  \/>");
         document.writeln("                                    万元");
         document.writeln("                                <\/td>");
         document.writeln("                                ");
         document.writeln("                            <\/tr>");
         document.writeln("                            <tr>");
         document.writeln("                            <td>");
         document.writeln("                              [首期付款额]<input id=\"sqfk\" type=\"text\"  \/>");
         document.writeln("                                    万元");
         document.writeln("                                <\/td>");
         document.writeln("                                <td>");
         document.writeln("                                    [贷款月数]<input id=\"dkys\" type=\"text\"  \/>");
         document.writeln("                                    (月)");
         document.writeln("                                <\/td>");
         document.writeln("                                <td>");
         document.writeln("                                    [月均还款]<input id=\"yjhk\" type=\"text\"  \/>");
         document.writeln("                                    元");
         document.writeln("                                <\/td>");
         document.writeln("                                 <td>");
         document.writeln("                                  <input type=\"button\"  onclick=\"cal();\" class=\"cal\" value=\"重新计算\" \/>");
         document.writeln("                                <\/td>");
         document.writeln("                            <\/tr><tr><td colspan=4><font color=#cccccc>以上数据仅供参考,准确数据请向经纪人咨询.或咨电:<\/font><\/td><\/tr>");
         document.writeln("                        <\/table>");
         document.writeln("                    <\/td>");
         document.writeln("                <\/tr>");
         document.writeln("            <\/table>")


         $("#pgPrice").val($("#pgPriceTemp").val());
         $("#houseAreatxt2").val($("#houseAreaTemp").val()); 
         
     }
