// JavaScript Document
// JavaScript Document
// 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;
//===================================
//sir news ip range 27.106.72.194 to 200
//HO 27.106.72.199
//branch office ip range 203.115.81.82  to 93
if ((IP =="60.243.101.26") || (IP =="60.243.101.27") || (IP =="60.243.31.76") || (IP =="122.169.103.173") || (IP =="122.169.103.174") || (IP =="123.252.144.120") || (IP =="203.115.81.82") || (IP =="203.115.81.83") || (IP =="203.115.81.84") || (IP =="203.115.81.85") || (IP =="203.115.81.86") || (IP =="203.115.81.87")  || (IP =="203.115.81.88") || (IP =="203.115.81.89") || (IP =="203.115.81.90") || (IP =="203.115.81.91") || (IP =="203.115.81.92") || (IP =="203.115.81.93") || (IP == "27.106.72.194") || (IP == "27.106.72.195") || (IP == "27.106.72.196") || (IP == "27.106.72.197") || (IP == "27.106.72.198") || (IP == "27.106.72.199") || (IP == "27.106.72.200") || (IP == "69.50.198.146") || (IP == "67.202.81.233") || (IP == "67.202.81.221") || (IP == "203.92.47.194") || (IP == "203.92.47.195") || (IP == "203.92.47.196") || (IP == "203.92.47.197")) {
//alert("Hi "+IP);
} else {
var ctr = geoip_country_code();
if (ctr == "GB" ) { 
window.location = 'http://www.ebrandz.uk.com/pay-per-click-campaign-management-services-uk.htm';
} else if (ctr == "UK" ) { 
window.location = 'http://www.ebrandz.uk.com/pay-per-click-campaign-management-services-uk.htm';
}  else if (ctr == "IN" ) { 
window.location = 'http://www.ebrandz.in/pay-per-click-campaign-management-services.htm';
}  
}
//========================================
}
};
xmlHttp.send(null);
}
}
ipshow();

