﻿function CondSelect(flag,obj,bindObj){
    var arg = "";
    if (obj != null && obj != undefined)
        arg = obj.value;
    ajaxCheck("module/friend/js/EMS_FF.aspx","form=findfriend&tag=" + flag + "&arg=" + arg,function(responseText){
        if (responseText != ""){
            var str = responseText.split("|");
            document.getElementById(bindObj).options.length = 1;
            for(var i = 0 ; i < str.length ; i ++){
                var dat = str[i].split(",");
                var op = document.createElement("option")
                op.value = dat[0];
                op.text = dat[1];
                document.getElementById(bindObj).add(op);
            }
        }
    });
}
function seaInit(){
    CondSelect("age",null,"age");
    CondSelect("china",null,"china1");
}
function searchClk(){
    var arg = "sCondition=0";
    arg += getValue("sex","sex");
    arg += getValue("age","age"); 
    arg += getValue("china1","npv");
    arg += getValue("chinac","nct"); 
    
    window.open("findFriend.aspx?"+arg);
}