function openPrintCD() {
        printWin =
        window.open('https://home.capitalone.com/servlet/dmis-ie?s=510514&p=/cd/cd_choose.shtml', 'printWindow',
        'menubar=yes,toolbar=yes,status=yes,location=yes,scrollbars=yes,resizable=yes,width=620,height=480,left=150,top=1')
     }

function openPrintMMA(){
        printWin =
        window.open('https://home.capitalone.com/servlet/dmis-ie?s=510514&p=/savings/mma_choose.shtml', 'printWindow',
        'menubar=yes,toolbar=yes,status=yes,location=yes,scrollbars=yes,resizable=yes,width=620,height=480,left=150,top=1')
    }
	
function getCookieValues(defaultSource, defaultPhoneNo)
{	
	var caponeCookie = getCookie("savOffer");
	if (caponeCookie == null)
	{
		cookieSource = defaultSource;
		cookieNumber = defaultPhoneNo;
	}
	else
	{
		var startLocation = document.cookie.indexOf("savOffer");
		var cookieBegin = document.cookie.substring( startLocation, document.cookie.length );
		var endLocation = document.cookie.indexOf(" ", startLocation);
		var cookieIndex = cookieBegin.indexOf("; ");
		if( cookieBegin.indexOf("; ") != -1 )
		{
			finalCookie = cookieBegin.substring(0, cookieBegin.indexOf("; ") );
		}
		else
		{
			finalCookie = cookieBegin;
		}
		finalCookie = unescape(finalCookie);
		finalCookie2 = finalCookie.substring(finalCookie.indexOf(":")+1,finalCookie.length);
		cookieSource = finalCookie.substring((finalCookie.indexOf("=")+1),finalCookie.indexOf(":"));
		cookieNumber = finalCookie2.substring(0,finalCookie2.indexOf(":"));
		var check_entity = cookieSource.charAt(0);
		if((cookieSource.length != 6 )||((check_entity!="1")&&(check_entity!="2")))
		{
			cookieSource = defaultSource;
		}
		if(cookieNumber.length != 14)
		{
			cookieNumber = defaultPhoneNo;
		}
	}
}

function getEntity(cookieSource)
{
	var entity_value = cookieSource.charAt(0);
	if(entity_value=="1")
	{
		entity = "Capital One Bank (USA), N.A.";
		flag   = "true";
	}
	else 
	{ 
		entity = "Capital One F.S.B.";
		flag   = "false";
	}
	
}

	
