// JavaScript Document

// Old Content and Nav Swapping Stuff

// this function clears all child elements out of the object that is passed in
function clearcontent(obj) {
	while(obj.firstChild) obj.removeChild(obj.firstChild);
}
function swapcontent(contentObject)	{
	var ContentContainer = document.getElementById("content_display");
	var ContentHolding = document.getElementById("content_holder");
	while(ContentContainer.firstChild) {
		ContentHolding.appendChild(ContentContainer.firstChild);
	}
	ContentContainer.appendChild(contentObject);
}

// End Content and Nav Swapping Stuff

// New Content Swapping Stuff
function include(xUrl,xId) {

  var xmlhttp = false;

  /*@cc_on @*/

  /*@if (@_jscript_version >= 5)

  // JScript gives us Conditional compilation, we can cope with old IE versions.
  // and security blocked creation of the objects.

  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
   }

  /*@end @*/

  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }

  xmlhttp.open("GET", xUrl,true);
  xmlhttp.onreadystatechange=function() {

          if (xmlhttp.readyState==4) {
                document.getElementById(xId).innerHTML = xmlhttp.responseText;
				
          }
  }
  xmlhttp.send(null)

}

// End Content Swapping Stuff

// Rollovers

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;

// End Rollovers

// Popup Script
var openwin;
function popupwin(url,myname,w,h,s)
{ 
settings='height='+h+',width='+w+',scrollbars='+s+',toolbar=no,location=no,status=no,menubar=no,resizable=no,dependent=no'
openwin=window.open(url,myname,settings);
}
// End Popup Script