// JScript File // iypCommonAPI项目所在服务器的URL var iypCommonAPI_HostURL = "http://www.yp.com.hk"; // iyp_keyword_suggestion项目所在服务器的URL var iypKeywordSuggestion_HostURL = "http://www.yp.com.hk"; // iyp e12 keyword search result 所在服务器的URL var iypSearchResult_Server = "http://www.yp.com.hk"; //var iypSearchResult_Server_SC = "http://gb.yp.com.hk/han3/7/6/9/0/0/0/0" + iypSearchResult_Server.substring(6); // msg alert var enAlert0 = "aaaPlease type keyword."; var enAlert1 = "aaaCan not use the following characters at the same time.\n\","; var enAlert2 = "aaaThe following symbols must be used with other characters."; var enAlert3 = "aaThe following keyword must be used with other words:\n"; var scAlert0 = "aaa请先输入关键字"; var scAlert1 = "aaa以下符合不能一同使用\n,\""; var scAlert2 = "aaa以下符合必须与其它字符一同使用"; var scAlert3 = "aaa不能单独使用以下关键词:\n"; var chAlert0 = "aaaa請先輸入關鍵字"; var chAlert1 = "aaa以下符號不能一同使用\n,\""; var chAlert2 = "aaa以下符號必須與其他字符一同使用"; var chAlert3 = "aaa不能單獨使用以下關鍵詞:\n"; var alert0Name = "iypSearch.searchBarMessage_keywordEmpty"; var alert1Name = "iypSearch.searchBarMessage_Alert1"; var alert2Name = "iypSearch.searchBarMessage_Alert2"; var alert3Name = "iypSearch.searchBarMessage_Alert3"; var msgAPIUrl = "http://www1.yp.com.hk/iypcommonapi/MessageAPI/getMessageData.aspx?type=iypsearch&format=json&callback=?"; $.getJSON(msgAPIUrl, function(data){ $.each(data.messages, function(i,msg){ if (msg.LanguageID == 8){ if (msg.Name == GetMessageName(alert0Name)) { enAlert0 = msg.Content; } if (msg.Name == GetMessageName(alert1Name)) { enAlert1 = msg.Content; } if (msg.Name == GetMessageName(alert2Name)) { enAlert2 = msg.Content; } if (msg.Name == GetMessageName(alert3Name)) { enAlert3 = msg.Content; } } if (msg.LanguageID == 9){ if (msg.Name == GetMessageName(alert0Name)) { chAlert0 = msg.Content; } if (msg.Name == GetMessageName(alert1Name)) { chAlert1 = msg.Content; } if (msg.Name == GetMessageName(alert2Name)) { chAlert2 = msg.Content; } if (msg.Name == GetMessageName(alert3Name)) { chAlert3 = msg.Content; } } if (msg.LanguageID == 10){ if (msg.Name == GetMessageName(alert0Name)) { scAlert0 = msg.Content; } if (msg.Name == GetMessageName(alert1Name)) { scAlert1 = msg.Content; } if (msg.Name == GetMessageName(alert2Name)) { scAlert2 = msg.Content; } if (msg.Name == GetMessageName(alert3Name)) { scAlert3 = msg.Content; } } }); }); // static district pull down data var pulldowndataCH = ""; // ch pull down pulldowndataCH += "
"; pulldowndataCH += "
所有地區
"; pulldowndataCH += "
九龍
"; pulldowndataCH += "
"; pulldowndataCH += " "; pulldowndataCH += "
"; pulldowndataCH += "
香港
"; pulldowndataCH += "
"; pulldowndataCH += " "; pulldowndataCH += "
"; pulldowndataCH += "
新界
"; pulldowndataCH += "
"; pulldowndataCH += " "; pulldowndataCH += "
"; pulldowndataCH += "
"; var pulldowndataEN = ""; // en pull down pulldowndataEN += "
"; pulldowndataEN += "
All Districts
"; pulldowndataEN += "
Kowloon
"; pulldowndataEN += "
"; pulldowndataEN += " "; pulldowndataEN += "
"; pulldowndataEN += "
Hong Kong
"; pulldowndataEN += "
"; pulldowndataEN += " "; pulldowndataEN += "
"; pulldowndataEN += "
New Territories
"; pulldowndataEN += "
"; pulldowndataEN += " "; pulldowndataEN += "
"; pulldowndataEN += "
"; // static district pull down data var pulldowndataSC = ""; // sc pull down pulldowndataSC += "
"; pulldowndataSC += "
所有地区
"; pulldowndataSC += "
九龙
"; pulldowndataSC += "
"; pulldowndataSC += " "; pulldowndataSC += "
"; pulldowndataSC += "
香港
"; pulldowndataSC += "
"; pulldowndataSC += " "; pulldowndataSC += "
"; pulldowndataSC += "
新界
"; pulldowndataSC += "
"; pulldowndataSC += " "; pulldowndataSC += "
"; pulldowndataSC += "
"; function GetMessageName(typeName){ if (typeName != ""){ return typeName.substring(typeName.indexOf('.') + 1); }else{ return ""; } }