if (document.cookie.indexOf("iphone_redirect=false") < 0) {
    if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || navigator.userAgent.match(/Android/i)) {
        if (confirm("Go To Iphone Website")) {
            document.cookie = "iphone_redirect=false";
            window.location = "/iphone/";
        } else {
            var date = new Date();
            var days = 1;
            date.setTime(date.getTime()+(days*24*60*60*1000));
            var expires = "; expires="+ date.toGMTString();
            document.cookie = "iphone_redirect=false" + expires;
        }
    }
}



