function sfHover(){var sfEls=document.getElementById("nav").getElementsByTagName("LI");for(var i=0;i<sfEls.length;i++){sfEls[i].onmouseover=function(){if(!this.className.match("nav-home")){if(this.firstChild.nodeName=='UL'){this.firstChild.style.left='auto';}}}
sfEls[i].onmouseout=function(){this.firstChild.style.left='-999';}
sfEls[i].onunload=function(){sfEls[i].onmouseover=null;sfEls[i].onmouseout=null;}}
sfEls=null;
if(version<7){var sProtocol=String(self.location).substring(0,5);var theSrc;if(sProtocol=="https"){theSrc="javascript:'<html></html>';";}else{theSrc="about:blank";}var ULIframes=document.getElementById("nav").getElementsByTagName("UL");for(var i=0;i<ULIframes.length;i++){newIframe = document.createElement("iframe");newIframe.className = "nav_iframe";newIframe.src=theSrc;ULIframes[i].appendChild(newIframe);}}}
if(checkIt('msie')){Event.addEvent(window,"load",sfHover);}
var homeImage=new Image();homeImage.src="img/global/header/nav-home-on.gif";function recordClientSideClick(actionName,isFormSubmitting,strUrl){_hbPageView(hbx.pn+'@action='+actionName,hbx.mlc);if(strUrl==null||strUrl==undefined||strUrl=="undefined"||strUrl==''||strUrl=="null"){}else{window.location=strUrl;}}
function recordFlashClick(actionName,isFormSubmitting,strUrl,newWindow){_hbLink(actionName);if(strUrl==null||strUrl==undefined||strUrl=="undefined"||strUrl==''||strUrl=="null"){}else{if(newWindow !== true){window.location = strUrl;}}}
function recordFormSubmit(paramString){_hbPageView(hbx.pn+'?'+paramString,hbx.mlc);}
function recordLink(link)
{var id=link.id;var count=0;var linkCount=document.links.length;for(i=0;i<linkCount;i++)
{var thisLink=document.links[i];if(thisLink.id==id)
count++;if(thisLink==link)
{recordClientSideClick(id+'-'+count,false);break;}}}
function ajaxReq(){this.createRequestObject=function(){var xmlhttp;try{xmlhttp=new ActiveXObject('Msxml2.XMLHTTP');}
catch(err){try{xmlhttp=new ActiveXObject('Microsoft.XMLHTTP');}
catch(err){try{xmlhttp=new XMLHttpRequest();}
catch(err){xmlhttp=null;}}}
return xmlhttp;}
this.handleReadyStateChange=function(obj,callback){var timeOut;timeOut=window.setInterval(function(){if(obj&&obj.readyState==4){window.clearInterval(timeOut);callback(obj);}},50);}
this.req=function(url,vars,fnDone){var xmlobj=this.createRequestObject();xmlobj.open('GET',url+"?"+vars,true);this.handleReadyStateChange(xmlobj,fnDone);xmlobj.send(null);}}function findInfo(obj,param)
{switch(param)
{case'top':var curtop=0;if(obj.offsetParent)
{while(obj.offsetParent)
{curtop+=obj.offsetTop
obj=obj.offsetParent;}}
else if(obj.y)curtop+=obj.y;return curtop;break;case'left':var curleft=0;if(obj.offsetParent)
{while(obj.offsetParent)
{curleft+=obj.offsetLeft
obj=obj.offsetParent;}}
else if(obj.x)curleft+=obj.x;return curleft;break;case'height':return obj.offsetHeight;break;case'width':return obj.offsetWidth;break;}}
function scour(obj)
{var result=new Object();var params=['top','left','height','width'];for(var a in params)
{if(browser=='Safari'&&a!='push')
{result[params[a]]=findInfo(obj,params[a]);}else if(browser!='Safari')
{result[params[a]]=findInfo(obj,params[a]);}}
return result;}
function setX(id)
{var e=document.getElementById(id);var results=scour(e)
return-results.left}
function setY(id)
{var e=document.getElementById(id);var results=scour(e)
return-results.top}
function onClickClose(id)
{var theObj=document.getElementById(id);theObj.style.visibility="hidden";if(((id=="help-overlay")||(id=="help-overlay-saved")||(id=="help-overlay-filter2"))&&(browser=="Safari")){theObj.style.width='1px';theObj.style.height='1px';}}
function borderOn(id)
{if(document.getElementById('results')){id=arrQuickFacts[0].cardID;}
var elem=document.getElementById(id);if(elem)elem.style.borderColor="#3299CC";}
function borderOff(id)
{if(document.getElementById('results')){id=arrQuickFacts[0].cardID;}
else{id='cardFrame-0';}
var elem=document.getElementById(id);if(elem)elem.style.borderColor="#ffffff";}SavedCards=function(){return{addCard:function(cardId){var saveMaxCardMsg="You cannot save more credit cards because you have saved 20, which is the maximum number.\nTo save more credit cards, you'll have to remove some you're not interested in first.";if(document.getElementById("save-max-card-msg"))saveMaxCardMsg=document.getElementById("save-max-card-msg").value;recordClientSideClick('saved-cards-adding-'+cardId);var count=this.getCount();if(count>=20){alert(saveMaxCardMsg);return false;}
cardId=cardId.toString();if(this.cardIsSaved(cardId)>0){return true;}
if(this._getCookie()!=null){newCards=this._getCookie().concat(Array(cardId));}else{newCards=Array(cardId);}
this._setCookie(newCards);this._setACardHasBeenSaved(true);this.updateCounter();return true;},removeCard:function(cardId){recordClientSideClick('saved-cards-removing-'+cardId);cardId=cardId.toString();var savedLocation=this.cardIsSaved(cardId);if(savedLocation==0)return true;else{var cards=this._getCookie();var deleted=cards.splice(savedLocation-1,1);this._setCookie(cards);this._setACardHasBeenSaved(true);}
this.updateCounter();},cardIsSaved:function(cardId){cardId=cardId.toString();var cards=this._getCookie();if(cards!=null){for(var i=0;i<cards.length;i++){if(cardId==cards[i].toString()){return(i+1);}}}else{return 0;}},updateCounter:function(){},getCount:function(){if(this._getCookie()!=null){if(document.getElementById("view-saved-enable")){document.getElementById("saved-btn").src=document.getElementById("view-saved-enable").value;}else{document.getElementById("saved-btn").src="img/btn_viewsaved.gif";}
return this._getCookie().length;}
else{if(document.getElementById("view-saved-disable")){document.getElementById("saved-btn").src=document.getElementById("view-saved-disable").value;}else{document.getElementById("saved-btn").src="img/btn_viewsaved-disabled.gif";}
return 0;}},viewSaved:function(){if(this.getCount()==0){var noSavedCardMsg="You've tried to view your saved cards, but you don't have any.\nYou'll need to save at least one credit card before selecting View Cards.";if(document.getElementById("no-saved-card-msg"))noSavedCardMsg=document.getElementById("no-saved-card-msg").value;alert(noSavedCardMsg);return false;}else{window.location.href='comparison.html@saved';return true;}},isCardSavedById:function(id){var cards=this._getCookie();var i=0;if(cards==null){return false;}
for(i=0;i<cards.length;i++){if(cards[i]==id){return true;}}
return false;},_setACardHasBeenSaved:function(flag){var expires=new Date(new Date().getTime()+(7*2*24)*3600000);document.cookie="citi-card-has-been-saved="+(flag?1:0).toString()+";path=/;expires="+expires+";";},_aCardHasBeenSaved:function(){var start=document.cookie.indexOf("citi-card-has-been-saved=");if(start==null||start==-1)return null;var len=start+25;var end=document.cookie.indexOf(";",len);if(end==-1)end=document.cookie.length;return(document.cookie.substring(len,end)==="1"?true:false);},_setCookie:function(cookieValue){if(cookieValue.length==0){document.cookie="citi-saved-cards=;path=/;expires=Fri, 02-Jan-1970 00:00:00 GMT";}else{var expires=new Date(new Date().getTime()+(7*2*24)*3600000);document.cookie="citi-saved-cards="+cookieValue.sort().join("|")+";path=/;expires="+expires+";";}},_getCookie:function(){var start=document.cookie.indexOf("citi-saved-cards=");if(start==null||start==-1)return null;var len=start+17;var end=document.cookie.indexOf(";",len);if(end==-1)end=document.cookie.length;var cookie=document.cookie.substring(len,end).split("|");return cookie;}};}();

//Event.removeEvent(window,"load", initGlossary);
//Event.addEvent(window,"load", initGlossary);