


                var cookieId = 2008101093159;
                
                // Drop-in content box- By Dynamic Drive
// For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
// This credit MUST stay intact for use


function EmergencyCloseCookie(document, name, minutes, path, domain, secure)
{
    this.$document = document;
    this.$name = name;
    if (minutes)
        this.$expiration = new Date((new Date()).getTime() + minutes*60000);
    else this.$expiration = null;
    if (path) this.$path = path; else this.$path = null;
    if (domain) this.$domain = domain; else this.$domain = null;
    if (secure) this.$secure = true; else this.$secure = false;
}

EmergencyCloseCookie.prototype.Store = function () {
    var cookieval = "";
    for(var prop in this) {
        if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function')) 
            continue;
        if (cookieval != "") cookieval += '&';
        cookieval += prop + ':' + escape(this[prop]);
    }

    var cookie = this.$name + '=' + cookieval;
    if (this.$expiration)
        cookie += '; expires=' + this.$expiration.toGMTString();
    if (this.$path) cookie += '; path=' + this.$path;
    if (this.$domain) cookie += '; domain=' + this.$domain;
    if (this.$secure) cookie += '; secure';

    this.$document.cookie = cookie;
}

EmergencyCloseCookie.prototype.Load = function() { 
    var allcookies = this.$document.cookie;
    if (allcookies == "") return false;

    var start = allcookies.indexOf(this.$name + '=');
    if (start == -1) return false;   // Cookie not defined for this page.
    start += this.$name.length + 1;  // Skip name and equals sign.
    var end = allcookies.indexOf(';', start);
    if (end == -1) end = allcookies.length;
    var cookieval = allcookies.substring(start, end);

    var a = cookieval.split('&');    // Break it into array of name/value pairs.
    for(var i=0; i < a.length; i++)  // Break each pair into an array.
        a[i] = a[i].split(':');

    for(var i = 0; i < a.length; i++) {
        this[a[i][0]] = unescape(a[i][1]);
    }

    return true;
}

EmergencyCloseCookie.prototype.Remove = function() {
    var cookie;
    cookie = this.$name + '=';
    if (this.$path) cookie += '; path=' + this.$path;
    if (this.$domain) cookie += '; domain=' + this.$domain;
    cookie += '; expires=Fri, 02-Jan-1970 00:00:00 GMT';

    this.$document.cookie = cookie;
}

var emergency_close_settings = new EmergencyCloseCookie(document, "message_"+cookieId);


if (!emergency_close_settings.Load() || !emergency_close_settings.visible) {
emergency_close_settings.visible = 'true';
emergency_close_settings.Store();
}



var ewas_ie=document.all
var ewas_dom=document.getElementById
var ewas_ns4=document.layers


function ewas_dismissbox(location){

  var emergency_close_settings = new EmergencyCloseCookie(document, "message_"+cookieId, 10);
  emergency_close_settings.visible = "false";
  emergency_close_settings.Store();

  window.location.reload();
  window.open(location,"emergencyIndex");
}



if (emergency_close_settings.visible == "true")
{
  {
    var ewas_styleVar = document.createElement('style');
    var ewas_contentVar = '';
    ewas_contentVar += '.ewas-alert-box { display:block; top:50px; width:100%; left:0px;} ';
    ewas_contentVar += '.ewas-alert-box-inside { margin-left:auto; margin-right:auto;} ';
    ewas_contentVar += ' .ewas-mini-box { display:none; }';
    ewas_contentVar += ' object { display:none; visibility:hidden; }';
    ewas_contentVar += ' .ewas-no-display { display:none; }';
    ewas_styleVar.setAttribute('type', 'text/css');
    if (ewas_styleVar.styleSheet)
    {   // IE
      ewas_styleVar.styleSheet.cssText = ewas_contentVar;
    }
    else
    {                // the world
      var tt1 = document.createTextNode(ewas_contentVar);
      ewas_styleVar.appendChild(tt1);
    }
    var ewas_headVar = document.getElementsByTagName('head')[0];
	ewas_headVar.insertBefore(ewas_styleVar,ewas_headVar.firstChild);
  }

  document.title = "Emergency Announcement from the University of Illinois";
}
else
{
  {
    var ewas_styleVar = document.createElement('style');
    var ewas_contentVar = '';
    ewas_contentVar += '.ewas-alert-box { display:none; } ';
    ewas_contentVar += ' .ewas-mini-box { display:block; top:0px; right:0px; }';

    ewas_styleVar.setAttribute('type', 'text/css');
    if (ewas_styleVar.styleSheet)
    {   // IE
      ewas_styleVar.styleSheet.cssText = ewas_contentVar;
    }
    else
    {                // the world
     var tt1 = document.createTextNode(ewas_contentVar);
     ewas_styleVar.appendChild(tt1);
    }
    var ewas_headVar = document.getElementsByTagName('head')[0];
	ewas_headVar.insertBefore(ewas_styleVar,ewas_headVar.firstChild);
  }
}



                
                                       ewas_title="Test Emergency Message Title";
                                       ewas_title_url="";
                                
                            ewas_description="Test emergency message description.";
                            ewas_img_src="https://emergency.webservices.illinois.edu/test/images/logo.gif";
                            ewas_show_details="http://emergency.webservices.illinois.edu/test/index-alert.html"; 
                        


    var ewas_wrapper_div = document.createElement("div");

    ewas_wrapper_div.style.cssText='position:absolute;font-family:Arial, Helvetica, sans-serif; z-index:100000; line-height:1.2em';
    ewas_wrapper_div.setAttribute('id', 'ewas-alert-wrapper');
    if (ewas_ie)
        {   // IE
	    ewas_wrapper_div.setAttribute('className', 'ewas-alert-box');
        }
        else
        {                // the world
	    ewas_wrapper_div.setAttribute('class', 'ewas-alert-box');
        }


    var ewas_div1 = document.createElement("div");
    ewas_wrapper_div.appendChild(ewas_div1);
  
    if (ewas_ie)
        {   // IE
            ewas_div1.setAttribute('className', 'ewas-alert-box-inside');
        }
        else
        {                // the world
            ewas_div1.setAttribute('class', 'ewas-alert-box-inside');
        }


    ewas_div1.style.cssText='width:550px;background-color:#D60000;  padding-top:12px;';
  
    var ewas_h1= document.createElement("h1");
    ewas_div1.appendChild(ewas_h1);

    ewas_h1.style.cssText='text-align:center;color:white;margin:0px;font-size:200%;';

    {
      var ewas_alert_text = document.createTextNode("ALERT");
      ewas_h1.appendChild(ewas_alert_text);    
    }

    var ewas_div2 = document.createElement("div");
    ewas_div1.appendChild(ewas_div2);
    ewas_div2.style.cssText='text-align:center;border:18px solid #D60000;background-color:white;padding:12px;';



      var ewas_h2= document.createElement("h2");
      ewas_div2.appendChild(ewas_h2);
      ewas_h2.style.cssText='color:#D60000;text-align:left; margin-top:4px;margin-bottom:4px; font-weight:bold;';


    if(ewas_title_url =='')
      {
        var ewas_title_text = document.createTextNode(ewas_title);
        ewas_h2.appendChild(ewas_title_text);    
      }
    else
    {
      var ewas_a= document.createElement("a");
      ewas_h2.appendChild(ewas_a);
    
        ewas_a.setAttribute('href', ewas_title_url);
        ewas_a.style.cssText='color:#D60000; text-decoration:underline;';
    
        var ewas_title_text = document.createTextNode(ewas_title);
        ewas_a.appendChild(ewas_title_text);    
    }

    var ewas_hr= document.createElement("hr");
    ewas_div2.appendChild(ewas_hr);
  
    ewas_hr.style.cssText='color:black';

    var ewas_p1= document.createElement("p");
    ewas_div2.appendChild(ewas_p1);

    ewas_p1.style.cssText='font-size:100%;text-align:left;min-height:40px;color:black;';

   {
      var ewas_description_text = document.createTextNode(ewas_description);
      ewas_p1.appendChild(ewas_description_text);    
   }


    var ewas_img= document.createElement("img");
    ewas_div2.appendChild(ewas_img);
  
    ewas_img.style.cssText='padding-top:24px;';
    ewas_img.setAttribute('src', ewas_img_src);


    var ewas_p2= document.createElement("p");
    ewas_div2.appendChild(ewas_p2);
  
    ewas_p2.style.cssText='text-align:right;margin-bottom:0px;';

    var ewas_a= document.createElement("a");
    ewas_p2.appendChild(ewas_a);

    ewas_a.setAttribute('href', '#');
    ewas_a.style.cssText='color:#333333;font-size:80%;text-decoration:underline;';
    if (ewas_ie)
    	{   // IE
		ewas_a.onclick=function(){ewas_dismissbox(ewas_show_details);};
	    }
    	else
    	{                // the world
		ewas_a.setAttribute('onclick', 'javascript:ewas_dismissbox(ewas_show_details)');
    	}


    {
        var ewas_show_details_text = document.createTextNode("[Show Details]");
        ewas_a.appendChild(ewas_show_details_text);    
    }


    var ewas_clear_div = document.createElement("div");

    ewas_clear_div.style.cssText='clear:both';


    var ewas_mini_a = document.createElement("a");

    ewas_mini_a.style.cssText='text-decoration:underline;position:absolute; background-color:#D60000; color:white; text-align:center; font-family:arial; width:200px; padding-top:5px; padding-bottom:5px; cursor:pointer; z-index:100000';
    ewas_mini_a.setAttribute('href', 'javascript:ewas_dismissbox(ewas_show_details)');
    ewas_mini_a.setAttribute('id', 'ewas-mini-wrapper');
    if (ewas_ie)
	{   // IE
		ewas_mini_a.setAttribute('className', 'ewas-mini-box');
	}
	else
	{                // the world
		ewas_mini_a.setAttribute('class', 'ewas-mini-box');
	}

    
    {
    var ewas_campusAlertText = document.createTextNode("CAMPUS ALERT");
    ewas_mini_a.appendChild(ewas_campusAlertText);
    
    var ewas_campusBr = document.createElement("br");
    ewas_mini_a.appendChild(ewas_campusBr);
        
    var ewas_campusClickText = document.createTextNode("click for details");
    ewas_mini_a.appendChild(ewas_campusClickText);
    }


    document.body.insertBefore(ewas_clear_div, document.body.firstChild);
    document.body.insertBefore(ewas_mini_a, document.body.firstChild);
    document.body.insertBefore(ewas_wrapper_div, document.body.firstChild);


 

            