// JavaScript Document
var overlay1 = '<h2>Travel Credit&mdash;for Any Travel, Starting at 5,000 Miles</h2>' +
 				'<p>Book any travel through any airline, travel agent, or online travel site and pay with your Miles card. Then redeem your Miles, for every 5,000 Miles get a $50 travel credit to your account towards your travel purchases. </p>' +
				'<p>&nbsp;</p>' +
                '<table width="450" border="0" cellspacing="0" cellpadding="0" style=" margin-left:18px; line-height:20px;"> ' +
                  '<tr>' +
                   ' <td width="215"><strong>Here&rsquo;s an example:</strong></td>' +
                    '<td width="245">&nbsp;</td>' +
					'</tr>' +
                  '<tr>' +
                   ' <td width="215">Miles Available to Redeem:</td>' +
                    '<td width="245">11, 000 Miles</td>' +
                  '</tr>' +
                   '<tr>' +
                    '<td width="215">You Redeem:</td>' +
                    '<td width="245">10, 000 Miles</td>' +
                  '</tr>' +
                   '<tr>' +
                    '<td width="215">Cost for Hotel:</td>' +
                    '<td width="245">$360</td>' +
                  '</tr>' +
                   '<tr>' +
                    '<td width="215" style="padding-bottom:10px;">You Get:</td>' +
                    '<td width="245" style="padding-bottom:10px;">$100 Travel Credit to your account</td>' +
                  '</tr>' +
                  '<tr>' +
                   ' <td width="215" valign="bottom" style="border-top:1px solid grey;padding-top:10px;" >Total Cost:</td>' +
                    '<td width="245" style="border-top:1px solid grey;padding-top:10px;">$260</td>' +
                  '</tr>' +
                '</table>' +
                '<p>&nbsp;</p>';
				
 var overlay2 = '<h2>Travel Redemption Details</h2>' +
                '<p>Redeem your Miles after you book your travel&mdash;business or leisure&mdash;through any airline, travel agent, or online ' +
               ' travel site. You can redeem your Miles for account credits within 90 days of your travel purchases posting to ' +
                'your account. To redeem your Miles or for more information, call us anytime at <strong>1-800-DISCOVER</strong> (1-800-347-2683).</p>' +
                '<p><strong>Travel Credit</strong></p>' +
                '<p>Redeem your Miles for a Travel Credit to your account on any air travel, cruise, hotel, or vacation package ' +
                'when you pay with your card. That means when you fly, you can choose any seat, with no blackout dates or restrictions. ' +
                'For every 5,000 Miles you redeem, you can get a $50 account credit. You can combine your travel purchases to ' +
                'redeem for a Travel Credit&mdash;each travel purchase can only be redeemed against once. Your account credit ' +
                'will not exceed the amount of the travel purchase(s) you&rsquo;re redeeming against.</p>' +
               ' <p><strong>For Example:</strong></p>' +
               ' <p>' +
                	'Redeem 5,000 Miles for a $50 Travel Credit<br />' +
                   ' Redeem 10,000 Miles for a $100 Travel Credit<br />' +
                   ' Redeem 25,000 Miles for a $250 Travel Credit<br />' + 
                '</p>' ;
		
function overLayContent(content) {
	
	document.getElementById('overlay1').onclick = showPopUp;
	document.getElementById('overlay2').onclick = showPopUp2;
	
}
function showPopUp() {
	
	document.getElementById('regular-popup').style.display="block";
	document.getElementById('overlay-content').innerHTML =overlay1;
	document.getElementById('overlay1').focus();
	//OverLayContent(overlay1);
}
function showPopUp2() {
	
	document.getElementById('regular-popup').style.display="block";
	document.getElementById('overlay-content').innerHTML =overlay2;
	document.getElementById('overlay1').focus();
}

function OverLayClose(){
	document.getElementById('close-button').onclick = closeOverLay;
}
function closeOverLay(){
	document.getElementById('regular-popup').style.display="none";
}

addLoadEvent(overLayContent);
addLoadEvent(OverLayClose);				
