var intCurrentWait = 5
var blnOddLine		 = true

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ ANIMATE WAIT                                                        +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function AnimateWait() {

//	eval("document.Wait"+intCurrentWait+".src='/images/wait_off.gif'")
	eval("document.getElementById('Wait"+intCurrentWait+"').src='/images/btn_green.gif'")
	intCurrentWait++
	if (intCurrentWait>=6) {
		intCurrentWait = 1
	}
//	eval("document.Wait"+intCurrentWait+".src='/images/wait_on.gif'")
	eval("document.getElementById('Wait"+intCurrentWait+"').src='/images/btn_yellow.gif'")

	setTimeout("AnimateWait()",700)
}


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ CLEAR CONTACT INFO                                                  +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function ClearContact() {
   objForm.txtContactName.value = ""
   objForm.txtContactEmail.value = ""
   objForm.txtContactPhone.value = ""
   objForm.txtContactPhoneExt.value = ""
   objForm.txtContactFax.value = ""
}


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ DISPLAY WAIT			                                                +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function DisplayWait(strMessage)
{
   if (strMessage != "")
   {
      document.getElementById("WaitMessage").innerHTML = "<FONT CLASS='pgParaTtl'>" + strMessage + '</FONT>'
   }
	document.getElementById("WholePage").className = "hidden";
	setTimeout('document.getElementById("PleaseWait").className = "visible";',400)
   window.scroll(0,0)
}


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ DISPLAY WINDOW		                                                +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function displayWindow(windowURL,xLoc,yLoc,blnPDF,blnHTML,blnRTF) {
	var BOLWindow
	var strFeatures

	strFeatures = ""
	strFeatures = strFeatures + "dependent=yes,"
	strFeatures = strFeatures + "dependent=yes,"
	strFeatures = strFeatures + "menubar=no,"
	strFeatures = strFeatures + "resizable=yes,"
	strFeatures = strFeatures + "status=no,"
	strFeatures = strFeatures + "toolbar=no,"
	strFeatures = strFeatures + "scrollbars=yes"

	window.open(windowURL,"", strFeatures)
}

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ GET BACKGROUND COLOR                                                +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function getBGColor() {
	if (blnOddLine)
	{
		blnOddLine = false
		return '"#E1E1FF"'
	}
	else
	{
		blnOddLine = true
		return '"#F8F8FF"'
	}
}

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ LINK TO ROUTE SEARCH                                                +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function LinkToRSearch(intCustSub) {
	var strLinkPage = '/tools/shared/PrintExitPopup.asp' //rsearch.asp'
	var strQueryString = "?src=/rsearch.asp&title=Service::Center::Lookup"
	var strCountry

	// City
	if (objForm.txtAcctCity[intCustSub].value != "")
	{
	   if (strQueryString == "")
	   {
	      strQueryString = "?cit=" + objForm.txtAcctCity[intCustSub].value
	   }
	   else
	   {
	      strQueryString += "&cit=" + objForm.txtAcctCity[intCustSub].value
	   }
	}

	// State
	if (objForm.cboAcctState[intCustSub].value != "")
	{
		if (strQueryString == "")
		{
			strQueryString = "?st=" + objForm.cboAcctState[intCustSub].value
		}
		else
		{
			strQueryString += "&st=" + objForm.cboAcctState[intCustSub].value
		}
	}

	// Zip
	if (objForm.txtAcctZip[intCustSub].value != "")
	{
		if (strQueryString == "")
		{
			strQueryString = "?zip=" + objForm.txtAcctZip[intCustSub].value
		}
		else
		{
			strQueryString += "&zip=" + objForm.txtAcctZip[intCustSub].value
		}
	}

	// Country
   if (eval('objForm.radAcctCountry'+intCustSub+'[0]').checked)
   {
   	strCountry = "US"
   }
   else if (eval('objForm.radAcctCountry'+intCustSub+'[1]').checked)
   {
   	strCountry = "CA"
   }
   else
	{
   	strCountry = "MX"
	}

	if (strQueryString == "")
	{
		strQueryString = "?co=" + strCountry
	}
	else
	{
		strQueryString += "&co=" + strCountry
	}

	if (strQueryString != "")  strLinkPage += strQueryString + "&optReturnWhat=2"

	upWinXY('xWin',strLinkPage,650,600,true,false,true)
}


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ REQUIRE EMAIL                                                       +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function RequireEmail(blnRequireEmail)
{
   if (blnRequireEmail)
   {
      document.getElementById("ContactEmail").className="pgTxtT"
		document.getElementById("ContactEmail").innerText="E-mail*: "
      document.getElementById("ContactFax").className="pgTxt"
		document.getElementById("ContactFax").innerText="Fax: "
      document.getElementById("ContactPhone").className="pgTxt"
		document.getElementById("ContactPhone").innerText="Phone: "
   }
}


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ REQUIRE FAX                                                         +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function RequireFax(blnRequireFax)
{
   if (blnRequireFax)
   {
      document.getElementById("ContactFax").className="pgTxtT"
		document.getElementById("ContactFax").innerText="Fax*: "
      document.getElementById("ContactEmail").className="pgTxt"
		document.getElementById("ContactEmail").innerText="E-mail: "
      document.getElementById("ContactPhone").className="pgTxt"
		document.getElementById("ContactPhone").innerText="Phone: "
   }
}


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ REQUIRE PHONE                                                       +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function RequirePhone(blnRequirePhone)
{
   if (blnRequirePhone)
   {
      document.getElementById("ContactPhone").className="pgTxtT"
		document.getElementById("ContactPhone").innerText="Phone*: "
      document.getElementById("ContactEmail").className="pgTxt"
		document.getElementById("ContactEmail").innerText="E-mail: "
      document.getElementById("ContactFax").className="pgTxt"
		document.getElementById("ContactFax").innerText="Fax: "
   }
}


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ SHOW				                                                      +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function show(id) {
   if (ns4) document.layers[id].visibility = "show"
   else if (ie4 && document.all[id]) document.all[id].style.visibility = "visible"
}


//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ HIDE				                                                      +
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function hide(id) {
   if (ns4) document.layers[id].visibility = "hide"
   else if (ie4 && document.all[id]) document.all[id].style.visibility = "hidden"
}