// Set Global Variables
var theSpaces = / /g;
var theChars = /\D/g;
var theNums = /\d/g;
var newWindow;

// Rotate Messages
if (document.getElementById || document.all) {
var theMessages = new Array();
	theMessages[1] = "Professional Services";
	theMessages[2] = "PACS Replacements and/or Upgrades";
	theMessages[3] = "Integrating Disparate PACS Systems";
	theMessages[4] = "Vendor Neutral Achieve (VNA) Services";
	theMessages[5] = "<A HREF=\"Education.asp\" CLASS=\"CourseText\">PACS System Administration<BR>September 21-24</A>";
var i = 0;

function rotateMessages(theID) {
if (i < theMessages.length - 1) {
	i++;
	}
else {
	i = 1;
	}
if (document.getElementById) {
	document.getElementById(theID).innerHTML = theMessages[i];
	}
else if (document.all) {
	document.all[theID].innerHTML = theMessages[i];
	}
}
setInterval("rotateMessages('CourseText')", 4000);
}

// Swap Image
function swapImage(theAction, theImage, theOriginalImage) {
if (theAction == 1) {
	document[theImage].src = eval(theImage + "_On.src");
	}
if (theAction == 0) {
	document[theImage].src = eval(theImage + "_Off.src");
	}
if (theOriginalImage) {
	document[theOriginalImage].src = eval(theOriginalImage + "_On.src");
	}
}

// Swap Style
function swapStyle(theID, theClass) {
	theID.className = theClass;
}

// Give Focus
function giveFocus(theForm, theField) {
	eval("document.forms[" + theForm + "]." + theField + ".focus()");
}

// Write Email
function writeEmail(theUser, theDomain) {
var theAddress = theUser + "@" + theDomain
	document.write("<A HREF=\"mailto:" + theAddress + "\">" + theAddress + "</A>");
}

// Make Remote
function makeRemote(theURL, theWidth, theHeight, theOptions) {
var theCenterWidth = (window.screen.width - theWidth) / 2;
var theCenterHeight = (window.screen.height - theHeight) / 2;
if (newWindow) {
	newWindow.close();
	}
	newWindow = window.open(theURL, "Remote", "Width=" + theWidth + ",Height=" + theHeight + "," + theOptions);
	newWindow.moveTo(theCenterWidth, theCenterHeight - 50);
	newWindow.focus();
}
