
var PageFrom="http://www.mst.com.cn/SearchResult.aspx";

$(document).ready(function(){

$("#btnSearch").bind("click",search);

var urlKey=$ID("UrlKeys").value;

var CurUrl=document.location.href.toLowerCase();

if(urlKey!=""&&urlKey!="undefined")PopupSelector.loadSelected(urlKey);

else if(document.location.href.toLowerCase().indexOf('www.epinsoft.com')>-1){

} else if(document.location.href.toLowerCase().indexOf('quanguo.epinsoft.com')>-1){

} else{

var CurName=CurUrl.substring(CurUrl.indexOf("//")+2,CurUrl.indexOf("."));

var Url=ConvertmainArea(CurName);

PopupSelector.loadSelected(Url);

} $("#txtKeys").keydown(function(ev){

if(ev.which==13){

var val=$(this).val();

if(val!=""&&val!="结果中包含该关键词")search();

}

} );

document.getElementById("txtKeys").onclick=function(){

if(this.value=="结果中包含该关键词")this.value="";

}

} );


function search(){

if(($("#txtKeys").val()==""||$("#txtKeys").val().replace(/[ ]/g,"")==""||$("#txtKeys").val()=="结果中包含该关键词")&&($("#txtFunction").val()==""||$("#txtFunction").val()=="请选择职位类别")){

alert("请选择\"职位类别\"，或者填写有效的\"关键词\"进行搜索。");

$("#txtKeys")[0].focus();

return;

} var params={

} ;

var arr1=[],arr2=[];

jQuery.each(PopupSelector._selItems["fun"],function(){

arr1.push(this.id);

if(this.parObj!=null)arr2.push(this.parObj.id);

else arr2.push(this.id);

} );

if(arr1.length>0){

params["FunctionIDList"]=arr1.join(",");

params["FunctionParentIDList"]=arr2.join(",");

} arr1.clear();

arr2.clear();

jQuery.each(PopupSelector._selItems["loc"],function(){

arr1.push(this.id);

if(this.parObj!=null)arr2.push(this.parObj.id);

else arr2.push(this.id);

} );

if(arr1.length>0){

params["LocationIDList"]=arr1.join(",");

params["LocationParentIDList"]=arr2.join(",");

} arr1.clear();

arr2.clear();

jQuery.each(PopupSelector._selItems["ind"],function(){

arr1.push(this.id);

} );

if(arr1.length>0){

params["IndustryIDList"]=arr1.join(",");

} arr1.clear();

arr2.clear();

var url=PageFrom+"?"+jQuery.param(params);

if($("#txtKeys").val()!="结果中包含该关键词"&&$("#txtKeys").val().replace(/[ ]/g,"")!=""){

if($("#radioJob")[0].checked)url+="&positionName="+UrlEncode($("#txtKeys").val());

if($("#radioComp")[0].checked)url+="&companyName="+UrlEncode($("#txtKeys").val());

}

var key_len = url.length;
var key_index = url.indexOf('?');

var keys = url.substring(key_index + 1, key_len);

//获取多选控件value串
GetValues(keys);





} 

function ConvertmainArea(id){

var Item;

switch(id){

default:break;

} 

Item="LocationIDList="+Item;

return Item;

} 

function ConverterLocation(obj){

var Item;

switch(obj){

default:Item=obj;

break;

} return Item;

}

function ConverterIndustry(obj){

var array=new Array();

var strList=",";

array=obj.split(',');

var SubItem="";

for(var i=0;

i<array.length;

i++){

SubItem=ConverterIndustrySubItem(array[i].toString());

strList+=SubItem+",";

} strList=TrimLR(strList,',');

return strList;

} 

function ConverterIndustrySubItem(obj){

var Item;

switch(obj){


default:Item=obj;

break;

} return Item;

} 