function countdown()
{
var date = new Date(concert);
var description = "";
var now = new Date();
var diff = date.getTime() - now.getTime();
var days = Math.floor(diff / (1000 * 60 * 60 * 24));
if (days > 1) {
document.write(days+1 + " days to " + description);
}
else if (days == 1) {
document.write("Only two days until " + description);
}
else if (days == 0) {
document.write("It's tomorrow!");
}
else if (days == -1) {
document.write("It's today!");
}
else {
document.write("It's too late!");
}
}


function popup(URL)
{
window.open(URL,"","scrollbars,resizable,width=400,height=450,left=200,top=150");
}


function ProgUp(aURL)
	{
	var pwidth=500;
    var pheight=625;
    var wintop = screen.height-pheight-150;
    var winleft = screen.width-pwidth-550;
    var settings = 'toolbar=no, menubar=no, resizable=yes, scrollbars=yes';
    var progwin = null;
        if (!progwin || progwin.closed )
        {
          settings += ',' + 'top=' + wintop;
          settings += ',' + 'left='+ winleft;
          settings += ',' + 'width='+ pwidth;
          settings += ',' + 'height='+ pheight;
          progwin=window.open(aURL,'program', settings);
          progwin.focus();
        }
        else
        {
          progwin.location=aURL;
          progwin.focus();
        }
    }


function PopNew(bURL)
	{
    var settings = 'esizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,status=yes';
    var popwin = null;
        if (!popwin || popwin.closed )
        {
          popwin=window.open(bURL,'newwin', settings);
          popwin.focus();
        }
        else
        {
          popwin.location=bURL;
          popwin.focus();
        }
    }


function opennewwindow(strUrl)
{
	var newwindow = null; // global variable
	var PreviousUrl; /* global variable which will store the
                    url currently in the secondary window */
  if(newwindow == null || newwindow.closed)
  {
   newwindow = window.open(strUrl, "newwin",
         "resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,status=yes");
  }
  else if(newwindow)
  {
   newwindow = window.open(strUrl, "newwin",
      "resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,status=yes");
    /* if the resource to load is different,
       then we load it in the already opened secondary window and then
       we bring such window back on top/in front of its parent window. */
   newwindow.focus();
  }
  else
  {
    newwindow.focus();
  };
  PreviousUrl = strUrl;
  /* explanation: we store the current url in order to compare url
     in the event of another call of this function. */
}

/*
<p><a href="http://www.spreadfirefox.com/"
target="newwin"
onclick="opennewwindow(this.href); return false;"
title="This link will create a new window or re-use
an existing one">Promote Firefox
adoption</a></p>
<p><a href="http://www.mozilla.org/support/firefox/faq"
target="newwin"
onclick="opennewwindow(this.href); return false;"
title="This link will create a new window or re-use
an existing one">Firefox FAQ</a></p>
*/
