﻿if (!(location.pathname.indexOf("/Xtreme_Design/mb/mayhem/") >= 0 && location.host == "event.asus.com")) location.href = "http://event.asus.com/Xtreme_Design/mb/mayhem/" + location.pathname.split("/")[location.pathname.split("/").length - 1];

function getcookiedata(cookieName) {
    theData = "";
    theCookie = document.cookie + ";";
    start = theCookie.indexOf(cookieName + "=");
    if (start != -1) {
        end = theCookie.indexOf(";", start);
        theData = unescape(theCookie.substring(start + cookieName.length + 1, end));
    }
    return theData.replace(";", "");
}

function add_cookie(cookieName, cookieContent, theDay) {
    var setDay = new Date();
    if (theDay == "") theDay = 7;
    setDay.setTime(setDay.getTime() + (theDay * 1000 * 60 * 60 * 24));
    var expDay = setDay.toUTCString();
    document.cookie = cookieName + "=" + cookieContent + ";expires=" + expDay;
}
