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 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 bolPopupAccountURL(aURL)
{
var newWin = window.open(aURL,"bolAccount")
}
function bolPrint()
{
var urlinfo,order;
urlinfo = "entrypoint=print";
var newWin = window.open("BolAccountSummary.aspx?" + urlinfo,"bol","directories=0,height=400,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=yes,width=625");
}

