﻿function OnCompareClick() {
    var frm = document.getElementsByTagName("form");
    frm[0].style.display = "none";

    var newdiv = document.createElement("div");
    newdiv.setAttribute("align", "center");
    newdiv.setAttribute("id", "divWait");
    newdiv.style.marginTop = "15%";

    var txt = document.createTextNode("Please wait while we try to find tickets for this event");
    var txt2 = document.createTextNode(".");
    var h3 = document.createElement("h3");
    var br = document.createElement("br");
    var lbl = document.createElement("label");

    h3.appendChild(txt);
    h3.setAttribute("id", "h3");
    h3.style.color = "#ffffff";
    h3.style.padding = "50px";
    h3.style.backgroundColor = "#ff6600";
    h3.style.borderWidth = "1px;"
    h3.style.borderStyle = "solid";
    h3.style.borderColor = "#ffffff";
    h3.style.width = "400px";
    h3.appendChild(br);
    h3.appendChild(lbl);

    lbl.setAttribute("id", "lbl");
    lbl.appendChild(txt2);

    newdiv.appendChild(h3);

    document.body.appendChild(newdiv);
    window.scrollTo(0, 0);

    setInterval("TickWaitNotification();", 1000);
}

function TickWaitNotification() {
    var newdiv = document.getElementById("divWait");
    var lbl = document.getElementById("lbl");
    lbl.innerText += ".";
}