<!--

/*
WRA Javascript include file created 8/5/2002

*/



function pausecomp(numSeconds)
{
var today=new Date();
var now=today.getSeconds();
var today2; now2;

while (1)
{
today2=new Date();
var now2=today2.getSeconds();
if (now2<now) {now2+=60;}
if (now2-now>=numSeconds) {break;}
}
}




function launch(newURL, newName, newFeatures, orgName) {
  var remote = open(newURL, newName, newFeatures);
  if (remote.opener == null)
    remote.opener = window;
  remote.opener.name = orgName;
  return remote;
}

function launchRemote(address) {
  myRemote = launch(address, "popup", "height=560,width=415,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=1,toolbar=0,z-lock=0,noprint", "myWindow");
  myRemote.focus();
}
function launchRemoteXY(address,iWidth,iHeight) {
  myRemote = launch(address, "popup", "height=" + iHeight + ",width=" + iWidth + ",alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=1,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,z-lock=0,noprint", "ParentWindow");
  myRemote.focus();
}
function launchRemoteXYnomenu(address,iWidth,iHeight) {
  myRemote = launch(address, "popup" + iWidth.toString() + iHeight.toString(), "height=" + iHeight + ",width=" + iWidth + ",alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,z-lock=0,noprint", "ParentWindow");
  myRemote.focus();
}
function launchCourseDetail(ProductCode) {
  myRemote = launch("/Education/CourseDetail.asp?pc=" + ProductCode, "popup", "height=550,width=650,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=1,resizable=1,scrollbars=1,status=0,titlebar=1,toolbar=1,z-lock=0,noprint", "ParentWindow");
  myRemote.focus();
}
function launchHelp(helpId) {
  myRemote = launch("/_private/help/hhelp.asp?menuid=" + helpId, "helppopup", "height=480,width=720,alwaysLowered=0,alwaysRaised=0,channelmode=0,dependent=0,directories=0,fullscreen=0,hotkeys=1,location=0,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0,z-lock=0", "myWindow");
  myRemote.focus();
}


function formatphonenumber(txtbox)
{
	var i,j,digitsonly="",outputval,alldigits="0123456789";
	for (i=0;(i<txtbox.value.length) && (digitsonly.length<10);i++)
	{
		if (alldigits.indexOf(txtbox.value.charAt(i)) > -1)
			if (digitsonly.length>1 || txtbox.value.charAt(i)!='1')
				digitsonly += txtbox.value.charAt(i);

	}
	if (digitsonly.length==10)
	{
		outputval="(" + digitsonly.substring(0,3) + ") " + digitsonly.substring(3,6) + "-" + digitsonly.substring(6,10);
		if (i<txtbox.value.length)
		{
			for (j=i;(j<txtbox.value.length) && (txtbox.value.charAt(j)==' ');j++)i++;
			outputval+=' ' + txtbox.value.substring(i,txtbox.value.length);
		} 
		txtbox.value=outputval;
	}
	else
		if (digitsonly.length>0)
		{
			alert("When entering an updated phone number, please be sure to include\nyour complete phone number including area code.");
		}
}





//-->
