

// Show/Hide Divs - SEE: FAQs - //////////////////////////////////////////////////////////////////////////////////////////////////

function hideDiv(pass) { 
var divs = document.getElementsByTagName('div'); 
for(i=0;i<divs.length;i++){ 
if(divs[i].id.match(pass)){//if they are 'see' divs 
if (document.getElementById) // DOM3 = IE5, NS6 
divs[i].style.visibility="hidden";// show/hide 
else 
if (document.layers) // Netscape 4 
document.layers[divs[i]].display = 'hidden'; 
else // IE 4 
document.all.hideshow.divs[i].visibility = 'hidden'; 
} 
} 
} 

function showDiv(pass) { 
var divs = document.getElementsByTagName('div'); 
for(i=0;i<divs.length;i++){ 
if(divs[i].id.match(pass)){ 
if (document.getElementById) 
divs[i].style.visibility="visible";
else 
if (document.layers) // Netscape 4 
document.layers[divs[i]].display = 'visible'; 
else // IE 4 
document.all.hideshow.divs[i].visibility = 'visible'; 
} 
} 
} 

// GET HTTP - CONTENT - //////////////////////////////////////////////////////////////////////////////////////////////////

function getHttpRes() {
  if (http.readyState == 4) {
    res = http.responseText;  // These following lines get the response and update the page
    document.getElementById('todaysContent').innerHTML = res;
  }
}

function getHttpRes2() {
  if (http2.readyState == 4) {
    res2 = http2.responseText;  // These following lines get the response and update the page
    document.getElementById('googleSearch').innerHTML = res2;
  }
}

function getHttpPageContent1() {
  if (pagecontent1.readyState == 4) {
    respg1 = pagecontent1.responseText;  // These following lines get the response and update the page
    document.getElementById('pageContent1').innerHTML = respg1;
  }
}

function getHttpPageContent2() {
  if (pagecontent2.readyState == 4) {
    respage2 = pagecontent2.responseText;  // These following lines get the response and update the page
    document.getElementById('pageContent2').innerHTML = respage2;
  }
}

function getHttpBodyContent1() {
  if (bodycontent1.readyState == 4) {
    resbody1 = bodycontent1.responseText;  // These following lines get the response and update the page
    document.getElementById('bodyContent1').innerHTML = resbody1;
  }
}

function getHttpBodyContent2() {
  if (bodycontent2.readyState == 4) {
    resbdy2 = bodycontent2.responseText;  // These following lines get the response and update the page
    document.getElementById('bodyContent2').innerHTML = resbdy2;
  }
}


// GET HTTP - iUTMB TODAY - //////////////////////////////////////////////////////////////////////////////////////////////////

function getXHTTP() {
  var xhttp;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers
      xhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttp = new XMLHttpRequest();
	    } catch (e3) {
	      xhttp = false;
	    }
      }
    }
  return xhttp; // Return the XMLHTTP object
}

// GET HTTP (2) - SEARCH - /////////////////////////////////////////////////////////////////////////////////////////

function getXHTTP2() {
  var xhttp2;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers
      xhttp2 = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttp2 = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttp2 = new XMLHttpRequest();
	    } catch (e3) {
	      xhttp2 = false;
	    }
      }
    }
  return xhttp2; // Return the XMLHTTP object
}

// GET HTTP PAGE CONTENT 1 - PAGE COLUMN 1 - //////////////////////////////////////////////////////////////////////////////////////////////////

function getPageContent1() {
  var xhttpcontent1;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers
      xhttpcontent1 = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttpcontent1 = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttpcontent1 = new XMLHttpRequest();
	    } catch (e3) {
	      xhttpcontent1 = false;
	    }
      }
    }
  return xhttpcontent1; // Return the XMLHTTP object
}

// GET HTTP PAGE CONTENT 2 - PAGE COLUMN 2 - //////////////////////////////////////////////////////////////////////////////////////////////////

function getPageContent2() {
  var xhttpcontent2;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers
      xhttpcontent2 = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttpcontent2 = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttpcontent2 = new XMLHttpRequest();
	    } catch (e3) {
	      xhttpcontent2 = false;
	    }
      }
    }
  return xhttpcontent2; // Return the XMLHTTP object
}

// GET HTTP BODYCONTENT 1 - PAGE COLUMN 1 - //////////////////////////////////////////////////////////////////////////////////////////////////

function getBodyContent1() {
  var xhttpbody1;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers
      xhttpbody1 = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttpbody1 = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttpbody1 = new XMLHttpRequest();
	    } catch (e3) {
	      xhttpbody1 = false;
	    }
      }
    }
  return xhttpbody1; // Return the XMLHTTP object
}

// GET HTTP BODY CONTENT 2 - PAGE COLUMN 2 - //////////////////////////////////////////////////////////////////////////////////////////////////

function getBodyContent2() {
  var xhttpbody2;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers
      xhttpbody2 = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttpbody2 = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttpbody2 = new XMLHttpRequest();
	    } catch (e3) {
	      xhttpbody2 = false;
	    }
      }
    }
  return xhttpbody2; // Return the XMLHTTP object
}

var http = getXHTTP(); // This executes when the page first loads.
var http2 = getXHTTP2(); // This executes when the page first loads.
var pagecontent1 = getPageContent1(); // This executes when the page first loads.
var pagecontent2 = getPageContent2(); // This executes when the page first loads.
var bodycontent1 = getBodyContent1(); // This executes when the page first loads.
var bodycontent2 = getBodyContent2(); // This executes when the page first loads.

	
// Process Called News request ------------->>
function todaysNews() {  
  		http.open("GET", "/iutmb/todaysNews.aspx", true);
  		http.onreadystatechange = getHttpRes;
  		http.send(null);
	  }
	  
// Process Called Announcement request ------------->>
function todaysAnnouncements() {  
  		http.open("GET", "/iutmb/todays.announcements.asp", true);
  		http.onreadystatechange = getHttpRes;
  		http.send(null);
	  }
	  
// Process Called Calendar request ------------->>
function todaysCalendar() {  
  		http.open("GET", "/iutmb/todaysCalendar.aspx", true);
  		http.onreadystatechange = getHttpRes;
  		http.send(null);
	  }
	  
// Process Called Calendar request ------------->>
function iutmbSearch() {  
  		http2.open("GET", "/includes/x.search.itumb.html", true);
  		http2.onreadystatechange = getHttpRes2;
  		http2.send(null);
	  }
	  
	  
// Process Called Calendar request ------------->>
function publicSearch() {  
  		http2.open("GET", "/includes/x.search.public.html", true);
  		http2.onreadystatechange = getHttpRes2;
  		http2.send(null);
	  }

// Process Page Content 1 Request ------------->>
function loadPageContent1(getcontent) {  
		pagecontent1.open("GET", getcontent, true);
        pagecontent1.onreadystatechange = getHttpPageContent1;
        pagecontent1.send(null);
		}
		
// Process Page Content 2 Request ------------->>
function loadPageContent2(getcontent) {  
		pagecontent2.open("GET", getcontent, true);
        pagecontent2.onreadystatechange = getHttpPageContent2;
        pagecontent2.send(null);
		}

// Process Body Content 2 Request ------------->>
function loadBodyContent1(getcontent) {  
		bodycontent1.open("GET", getcontent, true);
        bodycontent1.onreadystatechange = getHttpBodyContent1;
        bodycontent1.send(null);
		}

// Process Body Content 2 Request ------------->>
function loadBodyContent2(getcontent) {  
		bodycontent2.open("GET", getcontent, true);
        bodycontent2.onreadystatechange = getHttpBodyContent2;
        bodycontent2.send(null);
		}
		
		
// --- / End iUTMB AJAX ----------------------->>



// View Maps & Directions "Google Maps" Pop-Up
function viewMap(){
   var urlmap = '/contact/map.html';
   friendWindow = window.open(urlmap, 'find', ['width=750', 'height=600', 'left=0', 'top=0', 'scrollbars=yes', 'menubar=no', 'resizable=yes']);
   friendWindow.top.focus();
}

// JumpMenu
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


// --- Today's date ----------------------->>

var now = new Date();
            var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
            var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
            var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();

            function fourdigits(number)	{
            return (number < 1000) ? number + 1900 : number;
								}
            today =  days[now.getDay()] + ", " +
            months[now.getMonth()] + " " +
            date + ", " +
            (fourdigits(now.getYear())) ;
