<!--
var cururl = window.location.href;
var posurl = cururl.indexOf("gb5?");
var newurl;

if (posurl>0) {
	newurl = cururl.substring(posurl+4,cururl.length);
	location.href = newurl;
}
else
{
	newurl = location.href;
}

function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

function set_b5cookie(){
	var now = new Date();

	fixDate(now);
	now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 10000);
	setCookie("LangPref","b5",now,"/",".xiao-en.org");
	setCookie("LangPref","b5",now,"/",".xiao-en.com");
	setCookie("LangPref","b5",now,"/",".xiao-en.com.my");
	
	var temp = newurl.indexOf("v=c");

	if ( temp < 0 ) {
	  var temp2 = newurl.indexOf("?");
	  if (temp2 > 0) {
	    newurl = cururl.substring(0,temp2);
	  }
	  self.location = newurl + "?v=c";
   	}

	else {
	  self.location = newurl;
	}
}

function set_gbcookie(){
	var now = new Date();

	fixDate(now);
	now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 10000);
	setCookie("LangPref","gb",now,"/",".xiao-en.org");
	setCookie("LangPref","gb",now,"/",".xiao-en.com");
	setCookie("LangPref","gb",now,"/",".xiao-en.com.my");
	
	var temp = newurl.indexOf("v=c");

	if ( temp < 0 ) {
	  var temp2 = newurl.indexOf("?");
	  if (temp2 > 0) {
	    newurl = cururl.substring(0,temp2);
	  }
	  self.location = newurl + "?v=c";
   	}

	else {
	  self.location = newurl;
	}
}

// End --> 