// JavaScript Document
function removeSpaces(string) {
	var tstring = "";
	string = '' + string;
	splitstring = string.split(" ");
	for(i = 0; i < splitstring.length; i++)
	tstring += splitstring[i];
	return tstring;
}
var xmlHttp = false;
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
xmlHttp = false;
}
}
// ... for Mozilla, Opera, Safari
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}
function ipshow()
{
if (xmlHttp) {
xmlHttp.open('GET', 'getip.php'); 
xmlHttp.onreadystatechange = function () {
if (xmlHttp.readyState == 4) {
IP = removeSpaces(xmlHttp.responseText);
//document.getElementById("userip").innerHTML = xmlHttp.responseText;
//===================================
if ((IP =="60.243.101.26") || (IP =="60.243.101.27") || (IP =="60.243.31.76") || (IP =="202.63.175.6") || (IP =="203.115.80.30") || (IP =="203.115.80.58") || (IP =="122.169.103.173") || (IP =="122.169.103.174") || (IP =="123.252.144.120") || (IP == "202.149.44.194") || (IP == "202.63.177.226")  || (IP == "202.63.177.227") || (IP == "202.63.177.228") || (IP == "202.63.177.229") || (IP == "202.63.177.230") || (IP == "202.63.177.231") || (IP == "202.63.177.232") || (IP == "202.63.177.237")  || (IP == "203.115.80.42") || (IP == "203.115.80.43") || (IP =="203.115.80.59") || (IP =="203.115.80.60") || (IP =="203.115.80.61") || (IP =="203.115.80.62")) {
} else {
var ctr = geoip_country_code();
//document.write("Country Code :" +ctr);
//alert("UP :" +IP);
if (ctr == "GB" ) { 
window.location = 'http://www.ebrandz.uk.com';
} 
else if (ctr == "UK" ) { 
window.location = 'http://www.ebrandz.uk.com';
} 

else if (ctr == "IN" ) { 
window.location = 'http://www.ebrandz.in';
}
}
//========================================
}
};
xmlHttp.send(null);
}
}
ipshow();
