function get_params(name) {
    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
    var regexS = "[\\?&]" + name + "=([^&#]*)";
    var regex = new RegExp(regexS);
    var results = regex.exec(window.location.href);
    if (results == null)
        return "";
    else
        return results[1];
}

var site_param = get_params('site').toLowerCase();

if (site_param != 'full') {
    var agent = navigator.userAgent.toLowerCase();
//    alert(agent);

    if (agent.indexOf('blackberry') != -1) {
        window.location = "/#Order-Online";
    }
    else if (agent.indexOf('android') != -1) {
        window.location = "/android.htm";
    }    
    else if (agent.indexOf('iphone') != -1 || agent.indexOf('ipad') != -1 || agent.indexOf('ipod') != -1) {
        window.location = "/iphone.htm";
    }
}

