var quickHelp = "width=600, height=400, dependent=no, resizable=yes, alwaysRaised=yes, scrollbars=yes";

function spawnWin(theContent, winName)
{

  if (window.winName && !window.winName.closed)
  {   
     window.winName.location.href=theContent;
     window.winName.focus();
  }
  else
  {
    window.winName = window.open(theContent, winName, quickHelp);
    window.winName.focus();
  }
}

var formSubmit = 0;

function formSubmitted(submitValue)
{
  formSubmit = submitValue;
}

function onClosePopup() 
{
   if (formSubmit == 0)
   window.onclose = MM_openBrWindow('TollFreeNumPopup.htm','step4popup','width=660,height=340');
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function spawnWin(theContent, winName)
{

	if (window.winName && !window.winName.closed)
	{		
	   window.winName.location.href=theContent;
		window.winName.focus();
		
	}
	else
	{
		window.winName = window.open(theContent, winName, quickHelp);
		window.winName.focus();
	
	}
}

function P7_JumpMenu(selObj,restore){
	var theFullString = selObj.options[selObj.selectedIndex].value;
	if (restore) selObj.selectedIndex=0;
	var theLength = theFullString.length;
	var endPos = theFullString.lastIndexOf("~");
	var theUrl, theTarget, theParent;
	if (endPos > 0) {theUrl = theFullString.substring(0,endPos);}
	else {theUrl = theFullString;}
	endPos++
	if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)}
	else {theTarget = "window:Main";}
	if (theTarget == "window:New") {window.open(theUrl);}
	else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");}
	else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
}

function P7_JumpMenuGo(selName,restore){
var selObj = MM_findObj(selName); if (selObj) P7_JumpMenu(selObj,restore);
}

function DecisionURL(message, urlOnOk, urlOnCancel) { 
	if( confirm(message) )
		location.href = urlOnOk;
	else
	  {
				location.href = urlOnCancel;			
		}
}

function PopUpDecision(message, leaveHere) { 
	if( confirm(message) )
		location.href = leaveHere;
}

function displayYear() {
  var now = new Date();
  var year = now.getYear();
  
  if (year >= 100 && year <= 1999) {
	  year=year + 1900
  }

  return year;
}