
// create and insert CSS into the head //

var wsStyleVar = document.createElement('style');
var wsContentVar = '';
wsContentVar += '#ws-mbox {background-color:#ffffff; padding-left:80px; padding-right:80px; padding-top:20px; padding-bottom:40px; border:1px solid red; outset #666;font-size:12px;}';
wsContentVar += '#ws-mbm{font-family:sans-serif;font-weight:bold;float:right;padding-bottom:5px;}';
wsContentVar += '#ws-ol{background-image: url(https://illinois.edu/webservices/images/application/overlay.png);}';
wsContentVar += '.ws-dialog {display:none; }';
wsContentVar += '* html #ws-ol{background-image:none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src="https://illinois.edu/webservices/images/application/overlay.png", sizingMethod="scale");}';

wsStyleVar.setAttribute('type', 'text/css');
if (wsStyleVar.styleSheet)
{   // IE
    wsStyleVar.styleSheet.cssText = wsContentVar;
}
else
{                // the world
    var tt1 = document.createTextNode(wsContentVar);
    wsStyleVar.appendChild(tt1);
}
var wsHeadVar = document.getElementsByTagName('head')[0];
wsHeadVar.appendChild(wsStyleVar);

// create the submit button and message box //

document.write("<input style='display:none' type='submit' value='go' name='go'/>");

document.write("<div id='ws-box' class='ws-dialog'>");
document.write("	<div style='text-align:center'><span id='ws-txt'>");
document.write("		<img src='https://illinois.edu/webservices/images/application/processing.gif' alt='please wait, the request is processing' />");
document.write("		<br/><br/>");
document.write("		Processing, please wait.");
document.write("	</span></div>");
document.write("</div> ");


// Modal Dialog Box
// copyright 8th July 2006 by Stephen Chapman
// http://javascript.about.com/
// permission to use this Javascript on your web page is granted
// provided that all of the code in this script (including these
// comments) is used without any alteration

var delayTime = "1000";
var wd='200';
var ht='50';

function pageWidth() {return window.innerWidth != null? window.innerWidth: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth:document.body != null? document.body.clientWidth:null;}
	
function pageHeight() {return window.innerHeight != null? window.innerHeight: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight:document.body != null? document.body.clientHeight:null;}
	
function posLeft() {return typeof window.pageXOffset != 'undefined' ? window.pageXOffset:document.documentElement && document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft? document.body.scrollLeft:0;}
	
function posTop() {return typeof window.pageYOffset != 'undefined' ? window.pageYOffset:document.documentElement && document.documentElement.scrollTop? document.documentElement.scrollTop: document.body.scrollTop?document.body.scrollTop:0;}
	
function $(x){return document.getElementById(x);}
	
function scrollFix(){var obol=$('ws-ol');obol.style.top=posTop()+'px';obol.style.left=posLeft()+'px';}
	
function sizeFix(){var obol=$('ws-ol');obol.style.height=pageHeight()+'px';obol.style.width=pageWidth()+'px';}
	
function kp(e){ky=e?e.which:event.keyCode;if(ky==88||ky==120)hm();return false}
	
function inf(h){tag=document.getElementsByTagName('select');for(i=tag.length-1;i>=0;i--)tag[i].style.visibility=h;tag=document.getElementsByTagName('iframe');for(i=tag.length-1;i>=0;i--)tag[i].style.visibility=h;tag=document.getElementsByTagName('object');for(i=tag.length-1;i>=0;i--)tag[i].style.visibility=h;}
	
function sm(){var obl='ws-box'; var h='hidden';var b='block';var p='px';var obol=$('ws-ol'); var obbxd = $('mbd');obbxd.innerHTML = $(obl).innerHTML;obol.style.height=pageHeight()+p;obol.style.width=pageWidth()+p;obol.style.top=posTop()+p;obol.style.left=posLeft()+p;obol.style.display=b;var tp=posTop()+((pageHeight()-ht)/2)-12;var lt=posLeft()+((pageWidth()-wd)/2)-12;var obbx=$('ws-mbox');obbx.style.top=(tp<0?0:tp)+p;obbx.style.left=(lt<0?0:lt)+p;obbx.style.width=wd+p;obbx.style.height=ht+p;inf(h);obbx.style.display=b;return false;}
	
function hm(){var v='visible';var n='none';$('ws-ol').style.display=n;$('ws-mbox').style.display=n;inf(v);document.onkeypress=''}
	
function initmb(){var ab='absolute';var n='none';var obody=document.getElementsByTagName('body')[0];var frag=document.createDocumentFragment();var obol=document.createElement('div');obol.setAttribute('id','ws-ol');obol.style.display=n;obol.style.position=ab;obol.style.top=0;obol.style.left=0;obol.style.zIndex=998;obol.style.width='100%';frag.appendChild(obol);var obbx=document.createElement('div');obbx.setAttribute('id','ws-mbox');obbx.style.display=n;obbx.style.position=ab;obbx.style.zIndex=999;var obl=document.createElement('span');obbx.appendChild(obl);var obbxd=document.createElement('div');obbxd.setAttribute('id','mbd');obl.appendChild(obbxd);frag.insertBefore(obbx,obol.nextSibling);obody.insertBefore(frag,obody.firstChild);

window.onscroll = scrollFix; window.onresize = sizeFix;}

//window.onload = initmb;
initmb();
