function selectMethod()
{
	if (document.bolForm.CheckType[0].checked)
	{
		document.location="Order_New_Checks.html";
	}
	
	if (document.bolForm.CheckType[1].checked)
	{
		document.location="Checkbook_Reorder.html";
	}
}

function enableAddrFields(form,field)
{
	if((field.value) == "altAddress")
	{		
		document.getElementById("Addr1Label").style.color = "Black";
		document.getElementById("Addr2Label").style.color = "Black";
		document.getElementById("CityLabel").style.color = "Black";
		document.getElementById("StateLabel").style.color = "Black";
		document.getElementById("ZipLabel").style.color = "Black";
		document.getElementById("CountryLabel").style.color = "Black";
		
		form.addr1.style.backgroundColor = "White";
		form.addr2.style.backgroundColor = "White";
		form.city.style.backgroundColor = "White";
		form.state.style.backgroundColor = "White";
		form.zip.style.backgroundColor = "White";
		form.country.style.backgroundColor = "White";
		
		form.addr1.disabled = false;
		form.addr2.disabled = false;
		form.city.disabled = false;
		form.state.disabled = false;
		form.zip.disabled = false;
		form.country.disabled = false;
	}
	
	if((field.value) == "acctAddress")
	{
		document.getElementById("Addr1Label").style.color = "Gray";
		document.getElementById("Addr2Label").style.color = "Gray";
		document.getElementById("CityLabel").style.color = "Gray";
		document.getElementById("StateLabel").style.color = "Gray";
		document.getElementById("ZipLabel").style.color = "Gray";
		document.getElementById("CountryLabel").style.color = "Gray";
		
		form.addr1.style.backgroundColor = "Gray";
		form.addr2.style.backgroundColor = "Gray";
		form.city.style.backgroundColor = "Gray";
		form.state.style.backgroundColor = "Gray";
		form.zip.style.backgroundColor = "Gray";
		form.country.style.backgroundColor = "Gray";
		
		form.addr1.disabled = true;
		form.addr2.disabled = true;
		form.city.disabled = true;
		form.state.disabled = true;
		form.zip.disabled = true;
		form.country.disabled = true;
		
		form.addr1.value = "";
		form.addr2.value = "";
		form.city.value = "";
		form.state.value = "";
		form.zip.value = "";
		form.country.value = "";
	}
}



function bolSetFieldFocus(field){
if(field!=null){
if(field.type!="hidden")field.focus();
}
}
/* Start GDS Changes
 * Modified by: Sanjeewa
 */
function bolGetCookie(p_CookieName)
{

}

function bolSetCookie(p_Name, p_Value)
{
  document.cookie = p_Name + "=" + escape (p_Value);
}

/* End GDS Changes
 */
function bolPopupURL(aURL){
var newWin=window.open(aURL,"bol","directories=0,height=480,width=578,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=yes");
var agt=navigator.userAgent.toLowerCase(); 
if(!(agt.indexOf("msie")!=-1 && (parseInt(agt.substr(agt.indexOf("msie")+5,1))==4))){
newWin.focus();
}
}
function bolPopupURL2(aURL){
var newWin=window.open(aURL,"bol","directories=0,height=480,width=578,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,toolbar=yes");
var agt=navigator.userAgent.toLowerCase(); 
if(!(agt.indexOf("msie")!=-1 && (parseInt(agt.substr(agt.indexOf("msie")+5,1))==4))){
newWin.focus();
}
}
function bolPopupURLClose(aURL){
winArray[winArray.length] = window.open(aURL,"bol","directories=0,height=480,width=578,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=yes");
var agt=navigator.userAgent.toLowerCase(); 
}
function bolCloseChildren()
{
	for(i=0;i<winArray.length;i++)
	{
		// check if window wasn't already closed 
		if (winArray[i] && !winArray[i].closed) 
		{	
		  winArray[i].close();
		}		
	}
	winArray.length = 0;
}
function bolBillPayPopup(aURL){
var newWin=window.open(aURL,"bol","directories=0,height=280,width=463,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no");
var agt=navigator.userAgent.toLowerCase(); 
if(!(agt.indexOf("msie")!=-1 && (parseInt(agt.substr(agt.indexOf("msie")+5,1))==4))){
newWin.focus();
}
}
function bolAdPopupURL(aURL){
var leftOffset=0;
var topOffset=0;
var popupwidth=800;
var popupheight=400;
if(screen.width){
if(screen.width>popupwidth){
leftOffset=((screen.width-popupwidth)/2);
}  
}
var newWin=window.open(aURL,"bol",'directories=0,left='+leftOffset+',top='+topOffset+',screenx='+leftOffset+',screeny='+topOffset+',height='+popupheight+',location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=yes,width='+popupwidth);
var agt=navigator.userAgent.toLowerCase(); 
if(!(agt.indexOf("msie")!=-1&&(parseInt(agt.substr(agt.indexOf("msie")+5,1))==4))){
newWin.focus();
}
}
function bolTONWPopupURL(bolObj,aURL){
if(bolObj.selectedIndex!=0){
var leftOffset=50;
var topOffset=30;
var popupwidth=795;
var popupheight=475;
bolObj.selectedIndex = 0;
if(screen.width){	
if(screen.width>popupwidth){	
leftOffset=((screen.width-popupwidth)/2);
}  
}
var newWin=window.open(aURL,"ICMLayout",'directories=0,left='+leftOffset+',top='+topOffset+',screenx='+leftOffset+',screeny='+topOffset+',height='+popupheight+',width='+popupwidth+',location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no');
var agt=navigator.userAgent.toLowerCase(); 
if(!(agt.indexOf("msie")!=-1&&(parseInt(agt.substr(agt.indexOf("msie")+5,1))==4))){	
newWin.focus();	
}
}
}
function bolSelAct(bolObj,bolIdx,bolUseFirstOption){
var bolOffLink=bolObj.options[bolObj.selectedIndex].value;
if(bolUseFirstOption=="true" || (bolUseFirstOption==null && bolObj.selectedIndex!=0)){
if(bolOffLink!="VisaDNDLink" && bolOffLink != "UALMilesPlusLink" && bolOffLink != "SONYREWARDS"){
if(bolIdx=='' || bolOffLink.indexOf("AcctIndex=")==-1){
eval("top.location='"+bolObj.options[bolObj.selectedIndex].value+"'");
}else{
eval("top.location='"+bolObj.options[bolObj.selectedIndex].value+bolIdx+"'");
}
}else{
if (bolOffLink =="UALMilesPlusLink")
{
bolOffSiteLink('UAL Miles Plus','http://mileageplusvisa.ualmiles.com/');	
}
else if (bolOffLink == "SONYREWARDS")
{
bolOffSiteLink('Sony Rewards','http://www.sony.com/sonycard/');	
}
else
{
var bolBrandGoto = "";
if (document.bolForm["bolBrand" + bolIdx] != null)
{
bolBrandGoto = document.bolForm["bolBrand" + bolIdx].value;
}
else
{
var cookieVal = document.cookie;
if ( (cookieVal.indexOf("bolBrand=")) + 0 == -1 )
bolBrandGoto = "";
var temp = cookieVal.substring(cookieVal.indexOf("bolBrand=")+ 9, cookieVal.length);
var offset = temp.indexOf(";");
if (offset + 0 == -1)
{
offset = temp.length;
}
bolBrandGoto = unescape(temp.substring(0, offset));
}
switch(bolBrandGoto)
{
case "BA":
bolOffSiteLink('Visa','http://www.usa.visa.com/personal/shopping/visa_special_offers/First_USA_British_Airways.jsp');
break;
case "AMAZON":
bolOffSiteLink('Visa','https://usa.visa.com/specialOffers/FUSA_Amazon/offers.jsp');
break;
case "AOL":
bolOffSiteLink('Visa','http://usa.visa.com/specialOffers/AOLVisaOffers/offers.jsp');
break;
case "CMSFI":
bolOffSiteLink('Visa','http://usa.visa.com/specialOffers/CMS/offers.jsp');
break;
case "CMS":
bolOffSiteLink('Visa','http://usa.visa.com/specialOffers/CMS/offers.jsp');
break;
case "FROST":
bolOffSiteLink('Visa','http://usa.visa.com/specialOffers/CMS/offers.jsp');
break;
case "YAHOO":
bolOffSiteLink('Visa','http://usa.visa.com/specialOffers/Yahoo/offers.jsp');
break;
case "NETBANK":
bolOffSiteLink('Visa','https://www.usa.visa.com/specialOffers/NetBankVisaOffers/offers.jsp');
break;
default:
bolOffSiteLink('Visa','https://www.usa.visa.com/specialOffers/BankOne/offers.jsp');
break;
}
}
bolObj.selectedIndex=0;
}
}
}
function bolOffSiteLink(gotoName,gotoURL){  
gotoName = escape(gotoName);
gotoURL = escape(gotoURL); 
var OffSitePopUpURL;
var leftOffset=0;
var topOffset=0;    
OffSitePopUpURL="/bolOffSiteLink.aspx"; 
if(screen.width){
if(screen.width < 800){
leftOffset=60;
topOffset=90;
}else{
if(screen.width>=800&&screen.width<1024){
leftOffset=160;
topOffset=134;
}else{
if(screen.width>=1024){
leftOffset=272;
topOffset=250;
}
}
}
}
var loadURL=OffSitePopUpURL+'?gotoName='+gotoName+'&gotoURL='+gotoURL;
var webLinkWin=window.open(loadURL,"view",'width=480,height=295,left='+leftOffset+',top='+topOffset+',screenx='+leftOffset+',screeny='+topOffset+',resizable=no,scrollbars=yes,menubar=no');
webLinkWin.focus();
}
function printPage()
{
  var pr =  (window.print) ? 1 : 0;

  if (pr)	//Browser is Internet Explorer 5 or Netscape 4
    window.print()
  else		//Browser is not Internet Explorer 5 nor is it Netscape 4
    alert("Sorry, your browser doesn't support this feature.");
}

function bolClientSelectionListIsNotValid(list) {
  var itemSelected = list.selectedIndex;
  if (list.options[itemSelected].value == "") {
    list.focus();
    return true;
  }
  return false;
}
var isValid = false;
function bolValidateForm(form){
if (bolClientSelectionListIsNotValid(form.accountIndex)){
alert("Please select an account.");
form.accountIndex.focus();
return false;
}else{
isValid = true;
return true;
}
}
