<script type="text/javascript">
if(window.location.hash!='#'){
window.onload = function() {
if(!window.location.hash) {
window.location = window.location + '#';
window.location.reload();
}
}
}
var browserlanguageCode = window.navigator.userLanguage || window.navigator.language;
var setlanguageCode = "";
var codeChinese = new Array('zh-tw', 'zh-cn', 'zh-hk', 'zh-sg');
var codeSpanish = new Array('es-mx','es-gt','es-cr','es-pa','es-do','es-ve','es-co','es-pe','es-ar','es-ec','es-cl','es-uy','es-py','es-bo','es-sv','es-hn','es-ni','es-pr');
for (i = 0; i <= codeChinese.length; i++) {
if (codeChinese[i] == browserlanguageCode){
setlanguageCode = "Chinese";
}
}
for (i = 0; i <= codeSpanish.length; i++) {
if (codeSpanish[i] == browserlanguageCode){
setlanguageCode = "Spanish";
}
}
if (typeof Srch.U.fillKeywordQuery != 'undefined') {
var originalFillKeywordQuery = Srch.U.fillKeywordQuery;
Srch.U.fillKeywordQuery = function (query, dp) {
if (setlanguageCode == "Spanish") {
//Search Result source for Spanish
dp.set_sourceID('d8fbaafc-b47c-4436-8b21-0ceac0adb8ae');
} else if (setlanguageCode == "Chinese") {
//Search Result source for Chinese
dp.set_sourceID('d7193f50-e891-5dbf-9eee-2fd82d41b17e');
} else {
dp.set_sourceID('d7193f50-0201-4dbf-9eee-2fd82d41b17e');
}
originalFillKeywordQuery(query, dp);
};
}
</script>
if(window.location.hash!='#'){
window.onload = function() {
if(!window.location.hash) {
window.location = window.location + '#';
window.location.reload();
}
}
}
var browserlanguageCode = window.navigator.userLanguage || window.navigator.language;
var setlanguageCode = "";
var codeChinese = new Array('zh-tw', 'zh-cn', 'zh-hk', 'zh-sg');
var codeSpanish = new Array('es-mx','es-gt','es-cr','es-pa','es-do','es-ve','es-co','es-pe','es-ar','es-ec','es-cl','es-uy','es-py','es-bo','es-sv','es-hn','es-ni','es-pr');
for (i = 0; i <= codeChinese.length; i++) {
if (codeChinese[i] == browserlanguageCode){
setlanguageCode = "Chinese";
}
}
for (i = 0; i <= codeSpanish.length; i++) {
if (codeSpanish[i] == browserlanguageCode){
setlanguageCode = "Spanish";
}
}
if (typeof Srch.U.fillKeywordQuery != 'undefined') {
var originalFillKeywordQuery = Srch.U.fillKeywordQuery;
Srch.U.fillKeywordQuery = function (query, dp) {
if (setlanguageCode == "Spanish") {
//Search Result source for Spanish
dp.set_sourceID('d8fbaafc-b47c-4436-8b21-0ceac0adb8ae');
} else if (setlanguageCode == "Chinese") {
//Search Result source for Chinese
dp.set_sourceID('d7193f50-e891-5dbf-9eee-2fd82d41b17e');
} else {
dp.set_sourceID('d7193f50-0201-4dbf-9eee-2fd82d41b17e');
}
originalFillKeywordQuery(query, dp);
};
}
</script>
No comments:
Post a Comment