function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
return ft[1];
}
}
}

var vendortype = querySt("vendortype");
var vendorid = querySt("vendorid");
var lang = querySt("lang");
var sitelink = querySt("sitelink");

switch(lang){

case "UK": case "BUL": case "CZECH": case "DAN": case "GER": case "GR": case "ENEU": case "HUNG": case "POL": case "RUS": case "ROM": case "SWED": case "SPA":  case "IT": case "LITH":
window.location = "http://www.188bet.com/en-gb?vendorId="+vendorid+"&vendorType="+vendortype+"";break

case "ENUK":
window.location = "http://www.188bet.com/en-gb?vendorId="+vendorid+"&vendorType="+vendortype+"";break

case "POR":
window.location = "http://www.188bet.com/en-gb?vendorId="+vendorid+"&vendorType="+vendortype+"";break

case "EN": case "ENG":
window.location = "http://www.188bet.com/en-gb?vendorId="+vendorid+"&vendorType="+vendortype+"";break

case "CHS":
window.location = "http://www.188bet.com/zh-cn?vendorId="+vendorid+"&vendorType="+vendortype+"";break

case "CHT":
window.location = "http://www.188bet.com/zh-tw?vendorId="+vendorid+"&vendorType="+vendortype+"";break

case "VI":
window.location = "http://www.188bet.com/vi-vn?vendorId="+vendorid+"&vendorType="+vendortype+"";break

case "TH":
window.location = "http://www.188asia.com/th-th?vendorId="+vendorid+"&vendorType="+vendortype+"";break

case "KR":
window.location = "http://www.myjbb.com/ko-kr?vendorId="+vendorid+"&vendorType="+vendortype+"";break

case "KOR":
window.location = "http://www.myjbb.com/"+sitelink+"";break

}

