

function dynamicLayouts()
{

if(xp1_dynamic_opentab() == "tab1") {//alert("pane1");

     //	document.getElementById("pane1").className="pane js-only";
 	document.getElementById("tab1").className="on";
 
 	var xp1_template = xp1_template_cards();
// 	alert("xp1_template_dynamicvalue" + xp1_template);
 	if(xp1_template == "1") {
      document.getElementById("pane1").className="pane";
 }else if(xp1_template == "2"){
      document.getElementById("pane1").className="pane";
 }else if(xp1_template == "3"){
      document.getElementById("pane1").className="pane";
 }else if(xp1_template == "4"){
      document.getElementById("pane1").className="pane";
 }
 for(var i=1;i<=xp1_template;i++){ 
 document.getElementById("card"+i).className="col";
 document.getElementById("apply"+i).className="col4";
 	
 }
 if(xp1_template == 1){}
 else if(xp1_template == 2)
 {
  document.getElementById("card1").style.width="330px";
  document.getElementById("apply1").style.width="330px";
  document.getElementById("apply2").style.width="330px";
 }
 else if(xp1_template == 3)
 {
  document.getElementById("card1").style.padding="3px 0 0 18px";
  document.getElementById("card1").style.width="242px";
  document.getElementById("card2").style.width="242px";
  document.getElementById("card3").style.width="185px";

  document.getElementById("apply1").style.padding="10px 0 0 18px";
  document.getElementById("apply1").style.width="240px";
  document.getElementById("apply2").style.width="240px";
  document.getElementById("apply3").style.width="170px";
  
 }
 else //if (xp1_template == 4)
 {
  document.getElementById("card1").style.width="174px";
  document.getElementById("card2").style.width="174px";
  document.getElementById("card3").style.width="174px";
  document.getElementById("card4").style.width="174px";

  document.getElementById("apply1").style.width="168px";
  document.getElementById("apply2").style.width="172px";
  document.getElementById("apply3").style.width="172px";
  document.getElementById("apply4").style.width="170px";
 }

if(check == '0'){

var xp1_c1_credit1 = xp1_creditcard_row1();
//	alert("xp1_c1_credit1" + xp1_c1_credit1);
	if (xp1_c1_credit1 == "motiva"){
	document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+motiva_details+"'><img  src='/images/discover-motiva-card.jpg' width='150' height='94' alt='Discover Motiva Credit Card' title='Discover Motiva Credit Card' /></a><p><h3><a href='"+xp1_creditcard_row1_TEXT()+motiva_details+"' title='Discover Motiva Credit Card'>Discover Motiva Credit Card</a></h3></p><p>The card that pays you back for paying on time.</p>";
	
document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+motiva_redirect+"' class='apply-now' title='Apply Now for a Discover Motiva Credit Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+motiva_details+"' title='Discover Motiva Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit1 == "miles"){
	document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+miles_details+"'><img src='/images/miles-by-discover-card.jpg' width='150' height='94' alt='Miles by Discover Card' title='Miles by Discover Card' /></a><p><h3><a href='"+xp1_creditcard_row1_TEXT()+miles_details+"' title='Miles by Discover Card'>Miles by Discover Card</a></h3></p><p>Travel with no restrictions.</p>";

document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+miles_redirect+"' class='apply-now' title='Apply Now for a Miles by Discover Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+miles_details+"' title='Discover Miles Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit1 == "escape"){
	document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+escape_details+"'><img src='/credit-cards/images/escape-by-discover-card.jpg' width='150' height='94' alt='Escape by Discover Card' title='Escape by Discover Card' /></a><p><h3><a href='"+xp1_creditcard_row1_TEXT()+escape_details+"' title='Escape by Discover Card'>Escape by Discover Card</a></h3></p><p>Unlimited Double Miles and<br/> unrestricted travel.</p>";

document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+escape_redirect+"' class='apply-now' title='Apply Now for an Escape by Discover Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+escape_details+"' title='Escape by Discover Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit1 == "student"){
	document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+student_details+"'><img src='/credit-cards/images/discover-student-card.jpg' width='150' height='94' alt='Discover Student Card' title='Discover Student Card' /></a><p><h3><a href='"+xp1_creditcard_row1_TEXT()+student_details+"' title='Discover Student Card'>Discover Student Credit Card</a></h3></p><p>Build your credit with the card that fits your style.</p>";
document.getElementById("student").innerHTML="<p>&nbsp;<br/><br/></p>";
/*document.getElementById("student").innerHTML="<br/>";
document.getElementById("student").className="hide";
document.getElementById("student").innerHTML="&nbsp;";*/

document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+student_redirect+"' class='apply-now' title='Apply Now for a Discover Student Credit Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+student_details+"' title='Discover Student Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit1 == "more"){
	document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+more_details+"'><img src='/images/discover-more-card.jpg' width='150' height='94' alt='Discover More Credit Card' title='Discover More Credit Card' /></a><p><h3><a href='"+xp1_creditcard_row1_TEXT()+more_details+"' title='Discover More Credit Card'>Discover More Credit Card</a></h3></p><p>Make your money worth More.</p>";

document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Credit Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+more_details+"' title='Discover More Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit1 == "openroad"){
	document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+"'><img src='/images/discover-open-road-card.jpg' width='150' height='94' alt='Save at the pump and everywhere else.' title='Save at the pump and everywhere else.' /></a><p><h3><a href='"+xp1_creditcard_row1_TEXT()+"' title='Discover Open Road Credit Card'>Discover Open Road Credit Card</a></h3></p><p>Save at the pump and everywhere else.</p>";
	}

	var xp1_c1_credit2 = xp1_creditcard_row2();
	//alert("xp1_c1_credit2" + xp1_c1_credit2);
	if (xp1_c1_credit2 == "motiva"){
	document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+motiva_details+"'><img src='/images/discover-motiva-card.jpg' width='150' height='94' alt='Discover Motiva Credit Card' title='Discover Motiva Credit Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+motiva_details+"' title='Discover Motiva Credit Card'>Discover Motiva Credit Card</a></h3><p>The card that pays you back for paying on time.</p>";

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+motiva_redirect+"' class='apply-now' title='Apply Now for a Discover Motiva Credit Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+motiva_details+"' title='Discover Motiva Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit2 == "miles"){
	document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+miles_details+"'><img src='/images/miles-by-discover-card.jpg' width='150' height='94' alt='Miles by Discover Card' title='Miles by Discover Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+miles_details+"' title='Miles by Discover Card'>Miles by Discover Card</a></h3><p>Travel with no restrictions.</p>";

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+miles_redirect+"' class='apply-now' title='Apply Now for a Miles by Discover Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+miles_details+"' title='Discover Miles Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit2 == "escape"){
	document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+escape_details+"'><img src='/credit-cards/images/escape-by-discover-card.jpg' width='150' height='94' alt='Escape by Discover Card' title='Escape by Discover Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+escape_details+"' title='Escape by Discover Card'>Escape by Discover Card</a></h3><p>Unlimited Double Miles and<br/> unrestricted travel.</p>";

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+escape_redirect+"' class='apply-now' title='Apply Now for an Escape by Discover Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+escape_details+"' title='Escape by Discover Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit2 == "student"){
	document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+student_details+"'><img src='/credit-cards/images/discover-student-card.jpg' width='150' height='94' alt='Discover Student Card' title='Discover Student Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+student_details+"' title='Discover Student Card'>Discover Student Credit Card</a></h3><p>Build your credit with the card that fits your style.</p>";
document.getElementById("student").innerHTML="<p>&nbsp;<br/><br/></p>";
/*document.getElementById("student").innerHTML="<br/>";
document.getElementById("student").className="hide";
document.getElementById("student").innerHTML="&nbsp;";*/

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+student_redirect+"' class='apply-now' title='Apply Now for a Discover Student Credit Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+student_details+"' title='Discover Student Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit2 == "more"){
	document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+more_details+"'><img src='/images/discover-more-card.jpg' width='150' height='94' alt='Discover More Credit Card' title='Discover More Credit Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+more_details+"' title='Discover More Credit Card'>Discover More Credit Card</a></h3><p>Make your money worth More.</p>";

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Credit Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+more_details+"' title='Discover More Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit2 == "openroad"){
	document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+"'><img src='/images/discover-open-road-card.jpg' width='150' height='94' alt='Save at the pump and everywhere else.' title='Save at the pump and everywhere else.' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+"' title='Discover Open Road Credit Card'>Discover Open Road Credit Card</a></h3><p>Save at the pump and everywhere else.</p>";
	}


	var xp1_c1_credit3 = xp1_creditcard_row3();
//	alert("xp1_c1_credit3" + xp1_c1_credit3);
	if (xp1_c1_credit3 == "motiva"){
	document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+motiva_details+"'><img src='/images/discover-motiva-card.jpg' width='150' height='94' alt='Discover Motiva Credit Card' title='Discover Motiva Credit Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+motiva_details+"' title='Discover Motiva Credit Card'>Discover Motiva Credit Card</a></h3><p>The card that pays you back for paying on time.</p>";

document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+
motiva_redirect+"' class='apply-now' title='Apply Now for a Discover Motiva Credit Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+motiva_details+"' title='Discover Motiva Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit3 == "miles"){
	document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+miles_details+"'><img src='/images/miles-by-discover-card.jpg' width='150' height='94' alt='Miles by Discover Card' title='Miles by Discover Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+miles_details+"' title='Miles by Discover Card'>Miles by Discover Card</a></h3><p>Travel with no restrictions.</p>";

document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+miles_redirect+"' class='apply-now' title='Apply Now for a Miles by Discover Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+miles_details+"' title='Discover Miles Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit3 == "escape"){
	document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+escape_details+"'><img src='/credit-cards/images/escape-by-discover-card.jpg' width='150' height='94' alt='Escape by Discover Card' title='Escape by Discover Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+escape_details+"' title='Escape by Discover Card'>Escape by Discover Card</a></h3><p>Unlimited Double Miles and<br/> unrestricted travel.</p>";

document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+escape_redirect+"' class='apply-now' title='Apply Now for an Escape by Discover Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+escape_details+"' title='Escape by Discover Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit3 == "student"){
	document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+student_details+"'><img src='/credit-cards/images/discover-student-card.jpg' width='150' height='94' alt='Discover Student Card' title='Discover Student Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+student_details+"' title='Discover Student Card'>Discover Student Credit Card</a></h3><p>Build your credit with the card that fits your style.</p>";
document.getElementById("student").innerHTML="<p>&nbsp;<br/><br/></p>";
/*document.getElementById("student").innerHTML="<br/>";
document.getElementById("student").className="hide";*/


document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+student_redirect+"' class='apply-now' title='Apply Now for a Discover Student Credit Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+student_details+"' title='Discover Student Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit3 == "more"){
	document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+more_details+"'><img src='/images/discover-more-card.jpg' width='150' height='94' alt='Discover More Credit Card' title='Discover More Credit Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+more_details+"' title='Discover More Credit Card'>Discover More Credit Card</a></h3><p>Make your money worth More.</p>";

document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Credit Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+more_details+"' title='Discover More Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit3 == "openroad"){
	document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+"'><img src='/images/discover-open-road-card.jpg' width='150' height='94' alt='Save at the pump and everywhere else.' title='Save at the pump and everywhere else.' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+"' title='Discover Open Road Credit Card'>Discover Open Road Credit Card</a></h3><p>Save at the pump and everywhere else.</p>";
	}
	
	
	var xp1_c1_credit4 = xp1_creditcard_row4();
//	alert("xp1_c1_credit4" + xp1_c1_credit4);
	if (xp1_c1_credit4 == "motiva"){
	document.getElementById("card4").innerHTML="<a href='"+xp1_creditcard_row4_TEXT()+motiva_details+"'><img src='/images/discover-motiva-card.jpg' width='150' height='94' alt='Discover Motiva Credit Card' title='Discover Motiva Credit Card' /></a><h3><a href='"+xp1_creditcard_row4_TEXT()+motiva_details+"' title='Discover Motiva Credit Card'>Discover Motiva Credit Card</a></h3><p>The card that pays you back for paying on time.</p>";


document.getElementById("apply4").innerHTML="<p class='details'><a href='"+xp1_creditcard_row4_BUT()+motiva_redirect+"' class='apply-now' title='Apply Now for a Discover Motiva Credit Card'/><a class='more' href='"+xp1_creditcard_row4_TEXT()+motiva_details+"' title='Discover Motiva Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit4 == "miles"){
	document.getElementById("card4").innerHTML="<a href='"+xp1_creditcard_row4_TEXT()+miles_details+"'><img src='/images/miles-by-discover-card.jpg' width='150' height='94' alt='Miles by Discover Card' title='Miles by Discover Card' /></a><h3><a href='"+xp1_creditcard_row4_TEXT()+miles_details+"' title='Miles by Discover Card'>Miles by Discover Card</a></h3><p>Travel with no restrictions.</p>";


document.getElementById("apply4").innerHTML="<p class='details'><a href='"+xp1_creditcard_row4_BUT()+miles_redirect+"' class='apply-now' title='Apply Now for a Miles by Discover Card'/><a class='more' href='"+xp1_creditcard_row4_TEXT()+miles_details+"' title='Discover Miles Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit4 == "escape"){
	document.getElementById("card4").innerHTML="<a href='"+xp1_creditcard_row4_TEXT()+escape_details+"'><img src='/credit-cards/images/escape-by-discover-card.jpg' width='150' height='94' alt='Escape by Discover Card' title='Escape by Discover Card' /></a><h3><a href='"+xp1_creditcard_row4_TEXT()+escape_details+"' title='Escape by Discover Credit Card'>Escape by Discover Card</a></h3><p>Unlimited Double Miles and<br/> unrestricted travel.</p>";


document.getElementById("apply4").innerHTML="<p class='details'><a href='"+xp1_creditcard_row4_BUT()+escape_redirect+"' class='apply-now' title='Apply Now for an Escape by Discover Card'/><a class='more' href='"+xp1_creditcard_row4_TEXT()+escape_details+"' title='Escape by Discover Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit4 == "student"){
	document.getElementById("card4").innerHTML="<a href='"+xp1_creditcard_row4_TEXT()+student_details+"'><img src='/credit-cards/images/discover-student-card.jpg' width='150' height='94' alt='Discover Student Card' title='Discover Student Card' /></a><h3><a href='"+xp1_creditcard_row4_TEXT()+student_details+"' title='Discover Student Credit Card'>Discover Student Credit Card</a></h3><p>Build your credit with the card that fits your style.</p>";
/*document.getElementById("student").innerHTML="&nbsp;<br/><br/>";
document.getElementById("student").className="hide";
document.getElementById("student").innerHTML="&nbsp;";*/
document.getElementById("student").innerHTML="<p>&nbsp;<br/><br/></p>";

document.getElementById("apply4").innerHTML="<p class='details'><a href='"+xp1_creditcard_row4_BUT()+student_redirect+"' class='apply-now' title='Apply Now for a Discover Student Credit Card'/><a class='more' href='"+xp1_creditcard_row4_TEXT()+student_details+"' title='Discover Student Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit4 == "more"){
	document.getElementById("card4").innerHTML="<a href='"+xp1_creditcard_row4_TEXT()+more_details+"'><img src='/images/discover-more-card.jpg' width='150' height='94' alt='Discover More Credit Card' title='Discover More Credit Card' /></a><h3><a href='"+xp1_creditcard_row4_TEXT()+more_details+"' title='Discover More Credit Card'>Discover More Credit Card</a></h3><p>Make your money worth More.</p>";


document.getElementById("apply4").innerHTML="<p class='details'><a href='"+xp1_creditcard_row4_BUT()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Credit Card'/><a class='more' href='"+xp1_creditcard_row4_TEXT()+more_details+"' title='Discover More Credit Card Details' class='more'>Details</a></p>";

	} else if (xp1_c1_credit4 == "openroad"){
	document.getElementById("card4").innerHTML="<a href='"+xp1_creditcard_row4_TEXT()+"'><img src='/images/discover-open-road-card.jpg' width='150' height='94' alt='Save at the pump and everywhere else.' title='Save at the pump and everywhere else.' /></a<h3><a href='"+xp1_creditcard_row4_TEXT()+"' title='Discover Open Road Credit Card'>Discover Open Road Credit Card</a></h3><p>Save at the pump and everywhere else.</p>";
	}

if (xp1_template == 3){

var xp1_c1_credit1 = xp1_creditcard_row1();
if (xp1_c1_credit1 == "more") {
document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+more_details+"'><img src='/images/discover-more-card-185x121.jpg' width='185' height='121' alt='Discover More Credit Card' title='Discover More Credit Card' /></a><h3><a href='"+xp1_creditcard_row1_TEXT()+more_details+"' title='Discover More Credit Card'>Discover More Credit Card</a></h3><p>Make your money worth More.</p>";

document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Credit Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+more_details+"' title='Discover More Credit Card Details' class='more'>Details</a></p>";

} else if (xp1_c1_credit1 == "escape") {

document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+escape_details+"'><img src='/images/discover-escape-card-185x121.jpg' width='185' height='121' alt='Escape by Discover Card' title='Escape by Discover Card' /></a><h3><a href='"+xp1_creditcard_row1_TEXT()+escape_details+"' title='Discover Motiva Credit Card'>Escape by Discover Card</a></h3><p>Unlimited Double Miles and<br/> unrestricted travel.</p>";

document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+escape_redirect+"' class='apply-now' title='Apply Now for an Escape by Discover Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+escape_details+"' title='Escape by Discover Card Details' class='more'>Details</a></p>";

} else if (xp1_c1_credit1 == "miles") {

document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+miles_details+"'><img src='/images/discover-miles-card-185x121.jpg' width='185' height='121' alt='Miles by Discover Card' title='Miles by Discover Card' /></a><h3><a href='"+xp1_creditcard_row1_TEXT()+miles_details+"' title='Miles by Discover Card'>Miles by Discover Card</a></h3><p>Travel with no restrictions.</p>";

document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+miles_redirect+"' class='apply-now' title='Apply Now for a Miles by Discover Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+miles_details+"' title='Discover Miles Credit Card Details' class='more'>Details</a></p>";

} else if (xp1_c1_credit1 == "motiva") {

document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+motiva_details+"'><img src='/images/discover-motiva-card-185x121.jpg' width='185' height='121' alt='Discover Motiva Credit Card' title='Discover Motiva Credit Card' /></a><h3><a href='"+xp1_creditcard_row1_TEXT()+motiva_details+"' title='Discover Motiva Credit Card'>Discover Motiva Credit Card</a></h3><p>The card that pays you back<br/> for paying on time.</p>";

document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+motiva_redirect+"' class='apply-now' title='Apply Now for a Discover Motiva Credit Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+motiva_details+"' title='Discover Motiva Credit Card Details' class='more'>Details</a></p>";
} else if (xp1_c1_credit1 == "student") {

document.getElementById("card1").innerHTML="<a href='"+xp1_creditcard_row1_TEXT()+student_details+"'><img src='/images/discover-student-card-185x121.jpg' width='185' height='121' alt='Discover Student Card' title='Discover Student Card' /></a><h3><a href='"+xp1_creditcard_row1_TEXT()+student_details+"' title='Discover Student Card'>Discover Student Credit Card</a></h3><p>Build your credit with the<br/> card that fits your style.</p>";

document.getElementById("apply1").innerHTML="<p class='details'><a href='"+xp1_creditcard_row1_BUT()+student_redirect+"' class='apply-now' title='Apply Now for a Discover Student Credit Card'/><a class='more' href='"+xp1_creditcard_row1_TEXT()+student_details+"' title='Discover Student Credit Card Details' class='more'>Details</a></p>";

}


var xp1_c1_credit2 = xp1_creditcard_row2();
if (xp1_c1_credit2 == "more") {
document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+more_details+"'><img src='/images/discover-more-card-185x121.jpg' width='185' height='121' alt='Discover More Credit Card' title='Discover More Credit Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+more_details+"' title='Discover More Credit Card'>Discover More Credit Card</a></h3><p>Make your money worth More.</p>";

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Credit Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+more_details+"' title='Discover More Credit Card Details' class='more'>Details</a></p>";

} else if (xp1_c1_credit2 == "escape") {

document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+escape_details+"'><img src='/images/discover-escape-card-185x121.jpg' width='185' height='121' alt='Escape by Discover Card' title='Escape by Discover Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+escape_details+"' title='Escape by Discover Card'>Escape by Discover Card</a></h3><p>Unlimited Double Miles and<br/> unrestricted travel.</p>";

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+escape_redirect+"' class='apply-now' title='Apply Now for an Escape by Discover Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+escape_details+"' title='Escape by Discover Card Details' class='more'>Details</a></p>";

} else if (xp1_c1_credit2 == "miles") {

document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+miles_details+"'><img src='/images/discover-miles-card-185x121.jpg' width='185' height='121' alt='Miles by Discover Card' title='Miles by Discover Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+miles_details+"' title='Miles by Discover Card'>Miles by Discover Card</a></h3><p>Travel with no restrictions.</p>";

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+miles_redirect+"' class='apply-now' title='Apply Now for a Miles by Discover Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+miles_details+"' title='Discover Miles Credit Card Details' class='more'>Details</a</p>";

} else if (xp1_c1_credit2 == "motiva") {

document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+motiva_details+"'><img src='/images/discover-motiva-card-185x121.jpg' width='185' height='121' alt='Discover Motiva Credit Card' title='Discover Motiva Credit Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+motiva_details+"' title='Discover Motiva Credit Card'>Discover Motiva Credit Card</a></h3><p>The card that pays you back<br/> for paying on time.</p>";

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+motiva_redirect+"' class='apply-now' title='Apply Now for a Discover Motiva Credit Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+motiva_details+"' title='Discover Motiva Credit Card Details' class='more'>Details</a></p>";

} else if (xp1_c1_credit2 == "student") {

document.getElementById("card2").innerHTML="<a href='"+xp1_creditcard_row2_TEXT()+student_details+student_redirect+"'><img src='/images/discover-student-card-185x121.jpg' width='185' height='121' alt='Discover Student Card' title='Discover Student Card' /></a><h3><a href='"+xp1_creditcard_row2_TEXT()+student_details+"' title='Discover Student Card'>Discover Student Credit Card</a></h3><p>Build your credit with the<br/> card that fits your style.</p>";

document.getElementById("apply2").innerHTML="<p class='details'><a href='"+xp1_creditcard_row2_BUT()+"' class='apply-now' title='Apply Now for a Discover Student Credit Card'/><a class='more' href='"+xp1_creditcard_row2_TEXT()+student_details+"' title='Discover Student Credit Card Details' class='more'>Details</a></p>";

}

var xp1_c1_credit3 = xp1_creditcard_row3();
if (xp1_c1_credit3 == "more") {
document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+more_details+"'><img src='/images/discover-more-card-185x121.jpg' width='185' height='121' alt='Discover More Credit Card' title='Discover More Credit Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+more_details+"' title='Discover More Credit Card'>Discover More Credit Card</a></h3><p>Make your money worth More.</p>";

document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Credit Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+more_details+"' title='Discover More Credit Card Details' class='more'>Details</a></p>";
} else if (xp1_c1_credit3 == "escape") {

document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+escape_details+"'><img src='/images/discover-escape-card-185x121.jpg' width='185' height='121' alt='Escape by Discover Card' title='Escape by Discover Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+escape_details+"' title='Escape by Discover Card'>Escape by Discover Card</a></h3><p>Unlimited Double Miles and<br/> unrestricted travel.</p>";

document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+escape_redirect+"' class='apply-now' title='Apply Now for an Escape by Discover Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+escape_details+"' title='Escape by Discover Card Details' class='more'>Details</a></p>";

} else if (xp1_c1_credit3 == "miles") {

document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+miles_details+ "'><img src='/images/discover-miles-card-185x121.jpg' width='185' height='121' alt='Miles by Discover Card' title='Miles by Discover Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+miles_details+ "' title='Miles by Discover Card'>Miles by Discover Card</a></h3><p>Travel with no restrictions.</p>";

document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+miles_redirect+"' class='apply-now' title='Apply Now for a Miles by Discover Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+miles_details+ "' title='Discover Miles Credit Card Details' class='more'>Details</a></p>";

} else if (xp1_c1_credit3 == "motiva") {

document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+motiva_details+"'><img src='/images/discover-motiva-card-185x121.jpg' width='185' height='121' alt='Discover Motiva Credit Card' title='Discover Motiva Credit Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+motiva_details+"' title='Discover Motiva Credit Card'>Discover Motiva Credit Card</a></h3><p>The card that pays you back<br/> for paying on time.</p>";

document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+motiva_redirect+"' class='apply-now' title='Apply Now for a Discover Motiva Credit Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+motiva_details+"' title='Discover Motiva Credit Card Details' class='more'>Details</a></p>";

} else if (xp1_c1_credit3 == "student") {

document.getElementById("card3").innerHTML="<a href='"+xp1_creditcard_row3_TEXT()+student_details+"'><img src='/images/discover-student-card-185x121.jpg' width='185' height='121' alt='Discover Student Card' title='Discover Student Card' /></a><h3><a href='"+xp1_creditcard_row3_TEXT()+student_details+"' title='Discover Student Card'>Discover Student Credit Card</a></h3><p>Build your credit with the<br/> card that fits your style.</p>";

document.getElementById("apply3").innerHTML="<p class='details'><a href='"+xp1_creditcard_row3_BUT()+student_redirect+"' class='apply-now' title='Apply Now for a Discover Student Credit Card'/><a class='more' href='"+xp1_creditcard_row3_TEXT()+student_details+"' title='Discover Student Credit Card Details' class='more'>Details</a></p>";

}
}

if (xp1_template == 1){
var xp1_c1_credit1 = xp1_creditcard_row1();
if (xp1_c1_credit1 == "more_price") {
document.getElementById("pane1").innerHTML="<div class='pane-content' style='background: url(images/bg-tab3.gif) repeat-x;padding:0;margin-bottom:-4px;border-left: 1px solid #8a9499; border-right: 1px solid #8a9499; min-height: 250px;'><div style='padding:15px 0 0 5px;'><!-- begin left col --><div class='pane1LeftCol'>	<div style='margin: 16px 0 0 20px;'><a href='"+xp1_creditcard_row1_TEXT()+more_details+"'><img src='images/discoverCard.jpg' alt='Discover Card' border='0' /></a></div><div class='details'><a href='"+xp1_creditcard_row1_BUT()+more_redirect+"'/><img src='images/btn_applyNow_out.jpg' alt='Apply Now' title='Apply Now' border='0' style='float: left;' /></a><div style='margin: 13px 0 0 0; float: left;'><a class='more' href='"+xp1_creditcard_row1_TEXT()+more_details+"' title='Discover More Credit Card Details' class='more'>Details</a></div></div><div style='clear:both;'></div><div style='margin: 15px 0 0 15px; font-size: 9px;'><a href='"+xp1_creditcard_row1_TEXT()+more_details+"'>*View rates, fees, rewards, and other important information.</a></div></div><!-- end left col --><!-- begin right col --><div class='pane1RightCol'><div style='margin: 22px 0 0 0;'><img src='images/headline-cardFeatures.gif' alt='Discover More Card Features' border='0' /></div><div style='margin: 30px 0 0 0; width: 398px; height: 126px; line-height: 18px; font-size: 12px;'><img src='images/icon_0.gif' alt='0% APR on purchases for 6 months' border='0' style='float: left; margin: 0 10px 0 8px;' /> intro APR on purchases for 6 months.*<br /> intro APR on balance transfers for 12 months.*<br /><img src='images/arrow.gif' alt='0% APR on purchases for 6 months' border='0' style='margin: 0 7px 0 0;' />with no annual fee.<div class='solidRule'></div><img src='images/icon_dollar.gif' alt='0% APR on purchases for 6 months' border='0' style='float: left; margin: 0 8px 0 0;' /> 5% <em>Cashback Bonus</em> on categories that change.<br />Up to 1% unlimited <em>Cashback Bonus</em> on all other purchases.</div><a href='"+xp1_Browse_All_Card_Credit_Text()+"'><img src='images/btn_browse_out.gif' alt='Browse all Discover credit cards' border='0' style='margin:30px 0 0 0;' /></a></div><!-- end right col --></div><!--[if lt IE 7]><div style='height:1px;padding:0;margin:0;'></div><![endif]-->	<!--[if lt IE 7]><div class='orangeBar' style='position:relative;margin:0px 0px 0px -1px;padding:0px 0px 0px 0px;clear:both;float:left;'></div><![endif]--><!--[if IE 7]><div class='orangeBar' style='position:relative;margin:0;padding:0;clear:both;float:left;margin-left:-1px;'></div><![endif]--><![if gte IE 8]><div class='orangeBar' style='position:relative;margin:0 0 -4px -1px;padding:0;clear:both;float:left;'></div><![endif]><!--[if lt IE 7]><div style='clear:both;margin-bottom:-16px;'></div><![endif]--></div></div></div>"
} else if (xp1_c1_credit1 == "more_feature") {
document.getElementById("pane1").innerHTML="<div class='pane-content' style='background: url(images/bg-tab2.gif) repeat-x;padding:0;margin-bottom:-4px;border-left: 1px solid #8a9499; border-right: 1px solid #8a9499;min-height: 250px;'><div style='padding:15px 0 0 5px;'><!-- begin left col --><div class='pane1LeftCol' style='margin-left: 20px;'><div style='margin: 37px 0 0 20px;'><a href='"+xp1_creditcard_row1_TEXT()+more_details+"'><img src='images/discoverCard2.jpg' alt='Discover Card' border='0' /></a></div><div class='details'><a href='"+xp1_creditcard_row1_BUT()+more_redirect+"'/><img src='images/btn_applyNow_out.jpg' alt='Apply Now' title='Apply Now' border='0' style='float: left;' /></a><div style='margin: 13px 0 0 0; float: left;'><a class='more' href='"+xp1_creditcard_row1_TEXT()+more_details+"' title='Discover More Credit Card Details' class='more'>Details</a></div></div><div style='clear:both;'></div></div><!-- end left col --><!-- begin right col --><div class='pane1RightCol'><div style='margin: 24px 0 0 0;'><img src='images/headline-cardFeatures.gif' alt='Discover More Card Features' border='0' /></div><div style='margin: 55px 0 0 0;'><ul class='tabList' style='font-size: 12px'><li>5% <em>Cashback Bonus</em> on categories that change. </li><li> Up to 1% unlimited <em>Cashback Bonus</em> on all purchases.</li><li> Timely e-mail reminders to help you avoid late fees.</li><li>All with no annual fee.</li></ul></div><a href='"+xp1_Browse_All_Card_Credit_Text()+"'><img src='images/btn_browse_out.gif' alt='Browse all Discover credit cards' border='0' style='margin: 64px 0 0 0;' /></a></div><!-- end right col --></div><!--[if lt IE 7]><div style='height:1px;padding:0;margin:0;'></div><![endif]--><!--[if lte IE 7]><div class='orangeBar' style='position:relative;margin:0px 0px 0px -1px;padding:0px 0px 0px 0px;clear:both;float:left;'></div><![endif]--><![if gte IE 8]><div class='orangeBar' style='position:relative;margin:0 0 -4px -1px;padding:0;clear:both;float:left;'></div><![endif]><!--[if lt IE 7]><div style='clear:both;margin-bottom:-16px;'></div><![endif]--><!--[if IE 7]><div style='clear:both;margin-bottom:-0px;'></div><![endif]--></div></div></div>"
}
//student credit tab
else if (xp1_c1_credit1 == "stud") {
document.getElementById("pane1").innerHTML="<div class='pane-content' style='background: url(images/bg-tab.gif) repeat-x;padding:0;margin-bottom:-4px;border-left: 1px solid #8a9499; border-right: 1px solid #8a9499; min-height: 250px;'><div style='padding:15px 0 0 0px;'><!-- begin left col --><div class='pane1LeftCol'><div style='margin: 19px 0 0 35px;'><a href='"+xp1_creditcard_row1_TEXT()+student_details+"'><img src='images/cards.jpg' alt='Discover Card' title='Discover Card' border='0' /></a></div><div class='details'><a href='"+xp1_creditcard_row1_BUT()+stud_redirect+"'><img src='images/btn_applyNow_over.jpg' alt='Apply Now' title='Apply Now' border='0' style='float: left; padding-left: 45px;' /></a><div style='margin: 13px 0 0 0; float: left;'><a class='more' href='"+xp1_creditcard_row1_TEXT()+stud_details+"' title='Discover Student Card Details' alt='Discover Student Card Details' class='more'>Details</a></div></div></div><!-- end left col --><!-- begin right col --><div class='pane1RightCol'><div style='margin: 22px 0 0 0;'><img src='images/headline-disStudent.gif' alt='The Discover Student card: with tools to help manage credit in college.' title='The Discover Student card: with tools to help manage credit in college.' border='0' /></div><div style='margin: 30px 0 0 0; width: 398px; height: 126px; line-height: 18px;'><ul id='tabList'><li class='spend'><a href='http://www.discovercard.com/spendanalyzer/' alt='Spend Analyzer' title='Spend Analyzer'><strong>Spend Analyzer</strong></a> shows you how you are spending your money.</li><li class='payDown'><a href='http://www.discovercard.com/paydown/' alt='Paydown Planner' title='Paydown Planner'><strong>Paydown Planner</strong></a> estimates how long it will take to pay off your balance.</li><li class='purchase'><strong>Purchase Planner</strong> determines your purchases&#39; impact on your minimum payment.</li><li class='email'><a href='http://www.discovercard.com/customer-service/account/email-reminders.html' alt='Email reminders' title='Email reminders'><strong>Email reminders</strong></a> and <a href='http://www.discovercard.com/customer-service/account/mobile-reminders.html' alt='SMS text message alerts' title='SMS text message alerts'><strong>SMS text message alerts</strong></a> keep you in the know.</li></ul></div></div><!-- end right col --><div style='clear: both;'></div><!-- begin bottom tab --><div style='background: url(images/bg-botTab.gif) repeat-x; height: 38px; margin: 25px 0 0 0;'><div style='padding: 0 0 0 25px; width: 250px; float:left;'><a href='"+xp1_Browse_All_Card_Credit_Text()+"'><img src='images/btn_browse.gif' alt='Browse All Discover Credit Cards' title='Browse All Discover Credit Cards' border='0' /></a></div></div><!-- end bottom tab --></div></div> </div>";
}
}
} //if
	  
} else if (xp1_dynamic_opentab() == "tab2"){
 
 document.getElementById("pane2").className="pane";
 document.getElementById("tab2").className="on";
  }else if (xp1_dynamic_opentab() == "tab3"){
 
 document.getElementById("pane3").className="pane";
 document.getElementById("tab3").className="on";
  }else if (xp1_dynamic_opentab() == "tab4"){	 
 
 document.getElementById("pane4").className="pane";
 document.getElementById("tab4").className="on";
  }else if (xp1_dynamic_opentab() == "tab5"){	 
 
 document.getElementById("pane5").className="pane";
 document.getElementById("tab5").className="on";
  }else if (xp1_dynamic_opentab() == "tab6"){	 
 
 document.getElementById("pane6").className="pane";
 document.getElementById("tab6").className="on";
  }

}

function dynamicSidepromos()
{
var xp1_lnav_pos1 =  xp1_lnav_pos1_TextImg();
if (xp1_lnav_pos1 == "five")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+fiveper_redirect+"'><img src='/images/icon_5percent.gif' width='59' height='49' alt='5% Cashback Bonus on travel, gas, groceries, restaurants and more.' title='5% Cashback Bonus on travel, gas, groceries, restaurants and more.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+fiveper_redirect+"' title='5% Cashback Bonus on travel, gas, groceries, restaurants and more.'>5% <i>Cashback Bonus</i> on categories that change.</a></p>";
} 
else if (xp1_lnav_pos1 == "spend")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+spendana_redirect+"'><img src='/images/icon_spendanalyzer.gif' width='59' height='49' alt='See how the Spend Analyzer can help you track and compare card purchases.' title='See how the Spend Analyzer can help you track and compare card purchases.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+spendana_redirect+"' title='See how the Spend Analyzer can help you track and compare card purchases.'>Our spend analyzer helps you track and compare purchases.</a></p>";
} 
else if (xp1_lnav_pos1 == "status")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+status_redirect+"'><img src='/images/icon_checkstatus.gif' width='59' height='49' alt='Check on the status of an application.' title='Check on the status of an application.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+status_redirect+"' title='Check on the status of an application.'>Check the status of a credit card application.</a></p>";
}
else if (xp1_lnav_pos1 == "current")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+current_redirect+"'><img src='/images/icon-homepage-teendebitTrans.gif' width='59' height='49' alt='Give teens a debit card to help them manage their money responsibly.' title='Give teens a debit card to help them manage their money responsibly.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+current_redirect+"' title='Give teens a debit card to help them manage their money responsibly.'>Give teens a debit card to help them manage their money responsibly.</a></p>";
}
else if (xp1_lnav_pos1 == "one")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+more_details+"'><img src='/images/icon_number1.gif' width='59' height='49' alt='#1 customer loyalty.' title='#1 customer loyalty' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+more_details+"' title='#1 customer loyalty.'>The card ranked #1 in customer loyalty.*</a></p>";
}
else if (xp1_lnav_pos1 == "support")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+more_details+"'><img src='/images/icon_chatbubble.gif' width='59' height='49' alt='Customer support.' title='Customer support.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+more_details+"' title='Customer support.'>Live customer support in 60 seconds or less.</a></p>";
}
else if (xp1_lnav_pos1 == "design")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+design_redirect+"'><img src='/images/icon_paintbucket.gif' width='59' height='49' alt='Credit card designs.' title='Credit card designs.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+design_redirect+"' title='Credit card designs.'>Customize your card with over 100 designs.</a></p>";
}
else if (xp1_lnav_pos1 == "zero")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+more_details+"'><img src='/images/icon_0percent.gif' width='59' height='49' alt='0 apr credit card.' title='0 apr credit card.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+more_details+"' title='0 apr credit card.'>Low 0% intro rates on purchases and balance transfers.*</a></p>";
}
else if (xp1_lnav_pos1 == "cbb")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+more_details+"'><img src='/images/icon_1percent.gif' width='59' height='49' alt='Cash back bonus.' title='Cash back bonus.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+more_details+"' title='Cash back bonus'>Up to 1% unlimited <i>Cashback Bonus</i> on all purchases.</a></p>";
}
else if (xp1_lnav_pos1 == "soan")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+soan_redirect+"'><img src='/images/icon_securitylock.gif' width='59' height='49' alt='Secure online account numbers.' title='Secure online account numbers.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+soan_redirect+"' title='Secure online account numbers.'>Shop protected with complete fraud protection.</a></p>";
}
else if (xp1_lnav_pos1 == "shopd")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+shopd_redirect+"'><img src='/images/icon_shopdiscover.gif' width='59' height='49' alt='Shop discover.' title='Shop discover.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+shopd_redirect+"' title='Shop discover.'>5% to 20% Cashback Bonus at ShopDiscover, our exclusive online mall.</a></p>";
}
else if (xp1_lnav_pos1 == "tools")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl1_TextImg()+spendana_redirect+"'><img src='/images/icon_toolswrench.gif' width='59' height='49' alt='Spending tools.' title='Spending tools.' /></a>";
document.getElementById("promo1a").innerHTML="<p><a href='"+xp1_lnav_cl1_TextImg()+spendana_redirect+"' title='Spending tools.'>Powerful online tools to manage and make the most of your account.</a></p>";
}


var xp1_lnav_pos2 =  xp1_lnav_pos2_TextImg();
if (xp1_lnav_pos2 == "five")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+fiveper_redirect+"'><img src='/images/icon_5percent.gif' width='59' height='49' alt='5% Cashback Bonus on travel, gas, groceries, restaurants and more.' title='5% Cashback Bonus on travel, gas, groceries, restaurants and more.' /></a>";
document.getElementById("promo2a").innerHTML="<p><a href='"+xp1_lnav_cl2_TextImg()+fiveper_redirect+"' title='5% Cashback Bonus on travel, gas, groceries, restaurants and more.'>5% <i>Cashback Bonus</i> on categories that change.</a></p>";
} 
else if (xp1_lnav_pos2 == "spend")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+spendana_redirect+"'><img src='/images/icon_spendanalyzer.gif' width='59' height='49' alt='See how the Spend Analyzer can help you track and compare card purchases.' title='See how the Spend Analyzer can help you track and compare card purchases.' /></a>";
document.getElementById("promo2a").innerHTML="<p><a href='"+xp1_lnav_cl2_TextImg()+spendana_redirect+"' title='See how the Spend Analyzer can help you track and compare card purchases.'>Our spend analyzer helps you track and compare purchases.</a></p>";
} 
else if (xp1_lnav_pos2 == "status")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+status_redirect+"'><img src='/images/icon_checkstatus.gif' width='59' height='49' alt='Check on the status of an application.' title='Check on the status of an application.' /></a>";
document.getElementById("promo2a").innerHTML="<p><a href='"+xp1_lnav_cl2_TextImg()+status_redirect+"' title='Check on the status of an application.'>Check the status of a credit card application.</a></p>";
}
else if (xp1_lnav_pos2 == "current")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+current_redirect+"'><img src='/images/icon-homepage-teendebitTrans.gif' width='59' height='49' alt='Give teens a debit card to help them manage their money responsibly.' title='Give teens a debit card to help them manage their money responsibly.' /></a>";
document.getElementById("promo2a").innerHTML="<p><a href='"+xp1_lnav_cl2_TextImg()+current_redirect+"' title='Give teens a debit card to help them manage their money responsibly.'>Give teens a debit card to help them manage their money responsibly.</a></p>";
}
else if (xp1_lnav_pos2 == "one")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+more_details+"'><img src='/images/icon_number1.gif' width='59' height='49' alt='#1 customer loyalty.' title='#1 customer loyalty.' /></a>";
document.getElementById("promo2a").innerHTML="<p><a href='"+xp1_lnav_cl2_TextImg()+more_details+"' title='#1 customer loyalty'>The card ranked #1 in customer loyalty.*</a></p>";
}
else if (xp1_lnav_pos2 == "support")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+more_details+"'><a><img src='/images/icon_chatbubble.gif' width='59' height='49' alt='Customer support.' title='Customer support.' /></a>";
document.getElementById("promo2a").innerHTML="<p><a href='"+xp1_lnav_cl2_TextImg()+more_details+"' title='Customer support.'>Live customer support in 60 seconds or less.</a></p>";
}
else if (xp1_lnav_pos2 == "design")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+design_redirect+"'><img src='/images/icon_paintbucket.gif' width='59' height='49' alt='Credit card designs.' title='Credit card designs.' /></a>";
document.getElementById("promo2a").innerHTML="<p><a href='"+xp1_lnav_cl2_TextImg()+design_redirect+"' title='Credit card designs.'>Customize your card with over 100 designs.</a></p>";
}
else if (xp1_lnav_pos2 == "zero")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+more_details+"'><img src='/images/icon_0percent.gif' width='59' height='49' alt='0 apr credit card.' title='0 apr credit card.' /></a>";
document.getElementById("promo2a").innerHTML="<p><a href='"+xp1_lnav_cl2_TextImg()+more_details+"' title='0 apr credit card.'>Low 0% intro rates on purchases and balance transfers.*</a></p>";
}
else if (xp1_lnav_pos2 == "cbb")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+more_details+"'><img src='/images/icon_1percent.gif' width='59' height='49' alt='Cash back bonus.' title='Cash back bonus.' /></a>";
document.getElementById("promo2a").innerHTML="<p><a href='"+xp1_lnav_cl2_TextImg()+more_details+"' title='Cash back bonus.'>Up to 1% unlimited <i>Cashback Bonus</i> on all purchases.</a></p>";
}
else if (xp1_lnav_pos2 == "soan")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+soan_redirect+"'><img src='/images/icon_securitylock.gif' width='59' height='49' alt='Secure online account numbers.' title='Secure online account numbers.' /></a>";
document.getElementById("promo2a").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+soan_redirect+"' title='Secure online account numbers.'>Shop protected with complete fraud protection.</a></p>";
}
else if (xp1_lnav_pos2 == "shopd")
{
document.getElementById("promo2").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+shopd_redirect+"'><img src='/images/icon_shopdiscover.gif' width='59' height='49' alt='Shop discover.' title='Shop discover.' /></a>";
document.getElementById("promo2a").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+shopd_redirect+"' title='Shop discover.'>5% to 20% Cashback Bonus at ShopDiscover, our exclusive online mall.</a></p>";
}
else if (xp1_lnav_pos2 == "tools")
{
document.getElementById("promo1").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+spendana_redirect+"'><img src='/images/icon_toolswrench.gif' width='59' height='49' alt='Spending tools.' title='Spending tools.' /></a>";
document.getElementById("promo2a").innerHTML="<a href='"+xp1_lnav_cl2_TextImg()+spendana_redirect+"' title='Spending tools.'>Powerful online tools to manage and make the most of your account.</a></p>";
}


var xp1_lnav_pos3 =  xp1_lnav_pos3_TextImg();
if (xp1_lnav_pos3 == "five")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+fiveper_redirect+"'><img src='/images/icon_5percent.gif' width='59' height='49' alt='5% Cashback Bonus on travel, gas, groceries, restaurants and more.' title='5% Cashback Bonus on travel, gas, groceries, restaurants and more.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+fiveper_redirect+fiveper_redirect+"' title='5% Cashback Bonus on travel, gas, groceries, restaurants and more.'>5% <i>Cashback Bonus</i> on categories that change.</a></p></div>";
} 
else if (xp1_lnav_pos3 == "spend")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+spendana_redirect+"'><img src='/images/icon_spendanalyzer.gif' width='59' height='49' alt='See how the Spend Analyzer can help you track and compare card purchases.' title='See how the Spend Analyzer can help you track and compare card purchases.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+spendana_redirect+"' title='See how the Spend Analyzer can help you track and compare card purchases.'>Our spend analyzer helps you track and compare purchases.</a></p>";
} 
else if (xp1_lnav_pos3 == "status")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+status_redirect+"'><img src='/images/icon_checkstatus.gif' width='59' height='49' alt='Check on the status of an application.' title='Check on the status of an application.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+status_redirect+"' title='Check on the status of an application.'>Check the status of a credit card application.</a></p>";
}
else if (xp1_lnav_pos3 == "current")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+current_redirect+"'><img src='/images/icon-homepage-teendebitTrans.gif' width='59' height='49' alt='Give teens a debit card to help them manage their money responsibly.' title='Give teens a debit card to help them manage their money responsibly.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+current_redirect+"' title='Give teens a debit card to help them manage their money responsibly.'>Give teens a debit card to help them manage their money responsibly.</a></p>";
}
else if (xp1_lnav_pos3 == "one")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+more_details+"'><img src='/images/icon_number1.gif' width='59' height='49' alt='#1 customer loyalty.' title='#1 customer loyalty.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+more_details+"' title='#1 customer loyalty.'>The card ranked #1 in customer loyalty.*</a></p>";
}
else if (xp1_lnav_pos3 == "support")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+more_details+"'><img src='/images/icon_chatbubble.gif' width='59' height='49' alt='Customer support.' title='Customer support.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+more_details+"' title='Customer support.'>Live customer support in 60 seconds or less.</a></p>";
}
else if (xp1_lnav_pos3 == "design")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+design_redirect+"'><img src='/images/icon_paintbucket.gif' width='59' height='49' alt='Credit card designs.' title='Credit card designs.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+design_redirect+"' title='Credit card designs.'>Customize your card with over 100 designs.</a></p>";
}
else if (xp1_lnav_pos3 == "zero")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+more_details+"'><img src='/images/icon_0percent.gif' width='59' height='49' alt='0 apr credit card.' title='0 apr credit card.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+more_details+"' title='0 apr credit card.'>Low 0% intro rates on purchases and balance transfers.*</a></p>";
}
else if (xp1_lnav_pos3 == "cbb")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+more_details+"'><img src='/images/icon_1percent.gif' width='59' height='49' alt='Cash back bonus.' title='Cash back bonus.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+more_details+"' title='Cash back bonus.'>Up to 1% unlimited <i>Cashback Bonus</i> on all purchases.</a></p>";
}
else if (xp1_lnav_pos3 == "soan")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+soan_redirect+"'><img src='/images/icon_securitylock.gif' width='59' height='49' alt='Secure online account numbers.' title='Secure online account numbers.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+soan_redirect+"' title='Secure online account numbers.'>Shop protected with complete fraud protection.</a></p>";
}
else if (xp1_lnav_pos3 == "shopd")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+shopd_redirect+"'><img src='/images/icon_shopdiscover.gif' width='59' height='49' alt='Shop discover.' title='Shop discover.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+shopd_redirect+"' title='Shop discover.'>5% to 20% Cashback Bonus at ShopDiscover, our exclusive online mall.</a></p>";
}
else if (xp1_lnav_pos3 == "tools")
{
document.getElementById("promo3").innerHTML="<a href='"+xp1_lnav_cl3_TextImg()+spendana_redirect+"'><img src='/images/icon_toolswrench.gif' width='59' height='49' alt='Spending tools.' title='Spending tools.' /></a>";
document.getElementById("promo3a").innerHTML="<p><a href='"+xp1_lnav_cl3_TextImg()+spendana_redirect+"' title='Spending tools.'>Powerful online tools to manage and make the most of your account.</a></p>";
}


var xp1_lnav_pos4 =  xp1_lnav_pos4_TextImg();
if (xp1_lnav_pos4 == "five")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+fiveper_redirect+"'><img src='/images/icon_5percent.gif' width='59' height='49' alt='5% Cashback Bonus on travel, gas, groceries, restaurants and more.' title='5% Cashback Bonus on travel, gas, groceries, restaurants and more.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+fiveper_redirect+"' title='5% Cashback Bonus on travel, gas, groceries, restaurants and more.'>5% <i>Cashback Bonus</i> on categories that change.</a></p>";
} 
else if (xp1_lnav_pos4 == "spend")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+spendana_redirect+"'><img src='/images/icon_spendanalyzer.gif' width='59' height='49' alt='See how the Spend Analyzer can help you track and compare card purchases.' title='See how the Spend Analyzer can help you track and compare card purchases.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+spendana_redirect+"' title='See how the Spend Analyzer can help you track and compare card purchases.'>Our spend analyzer helps you track and compare purchases.</a></p>";
} 
else if (xp1_lnav_pos4 == "status")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+status_redirect+"'><img src='/images/icon_checkstatus.gif' width='59' height='49' alt='Check on the status of an application.' title='Check on the status of an application.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+status_redirect+"' title='Check on the status of an application.'>Check the status of a credit card application.</a></p>";
}
else if (xp1_lnav_pos4 == "current")
{
document.getElementById("promo4").innerHTML="<a href='"+xp1_lnav_cl4_TextImg()+current_redirect+"'><img src='/images/icon-homepage-teendebitTrans.gif' width='59' height='49' alt='Give teens a debit card to help them manage their money responsibly.' title='Give teens a debit card to help them manage their money responsibly.' /></a>"
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+current_redirect+"' title='Give teens a debit card to help them manage their money responsibly.'>Give teens a debit card to help them manage their money responsibly.</a></p>";
}
else if (xp1_lnav_pos4 == "one")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+more_details+"'><img src='/images/icon_number1.gif' width='59' height='49' alt='#1 customer loyalty.' title='#1 customer loyalty.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+more_details+"' title='#1 customer loyalty.'>The card ranked #1 in customer loyalty.*</a></p>";
}
else if (xp1_lnav_pos4 == "support")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+more_details+"'><img src='/images/icon_chatbubble.gif' width='59' height='49' alt='Customer support.' title='Customer support.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+more_details+"' title='Customer support.'>Live customer support in 60 seconds or less.</a></p>";
}
else if (xp1_lnav_pos4 == "design")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+design_redirect+"'><img src='/images/icon_paintbucket.gif' width='59' height='49' alt='Credit card designs.' title='Credit card designs.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+design_redirect+"' title='Credit card designs.'>Customize your card with over 100 designs.</a></p>";
}
else if (xp1_lnav_pos4 == "zero")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+more_details+"'><img src='/images/icon_0percent.gif' width='59' height='49' alt='0 apr credit card.' title='0 apr credit card.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+more_details+"' title='0 apr credit card.'>Low 0% intro rates on purchases and balance transfers.*</a></p>";
}
else if (xp1_lnav_pos4 == "cbb")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+more_details+"'><img src='/images/icon_1percent.gif' width='59' height='49' alt='Cash back bonus.' title='Cash back bonus.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+more_details+"' title='Cash back bonus.'>Up to 1% unlimited <i>Cashback Bonus</i> on all purchases.</a></p>";
}
else if (xp1_lnav_pos4 == "soan")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+soan_redirect+"'><img src='/images/icon_securitylock.gif' width='59' height='49' alt='Secure online account numbers.' title='Secure online account numbers.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+soan_redirect+"' title='Secure online account numbers.'>Shop protected with complete fraud protection.</a></p>";
}
else if (xp1_lnav_pos4 == "shopd")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+shopd_redirect+"'><img src='/images/icon_shopdiscover.gif' width='59' height='49' alt='Shop discover.' title='Shop discover.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+shopd_redirect+"' title='Shop discover.'>5% to 20% Cashback Bonus at ShopDiscover, our exclusive online mall.</a></p>";
}
else if (xp1_lnav_pos4 == "tools")
{
document.getElementById("promo4").innerHTML="<div class='promo-icon'><a href='"+xp1_lnav_cl4_TextImg()+spendana_redirect+"'><img src='/images/icon_toolswrench.gif' width='59' height='49' alt='Spending tools.' title='Spending tools.' /></a>";
document.getElementById("promo4a").innerHTML="<p><a href='"+xp1_lnav_cl4_TextImg()+spendana_redirect+"' title='Spending tools.'>Powerful online tools to manage and make the most of your account.</a></p>";
}
}

function dynamicfooter()
{
if (xp1_lnav_pos1 == "one" || xp1_lnav_pos2 == "one" || xp1_lnav_pos3 == "one" || xp1_lnav_pos4 == "one")
{
document.getElementById("dynamicfooter").innerHTML="<p>* Discover Card ranked #1 in customer loyalty among leading credit card brands according to the 2009 Brand Keys Customer Loyalty Engagement Index Report</p>";
}
}

function marqueeDecisioning()
{

if (Xp1Decisioning()=="motiva"){
            // document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+"'><img src='/images/bg-homepage-promo-motiva.jpg' width='710' height='234' alt='Get paid for paying on time.' title='Get paid for paying on time.' /></a><div id='homepage-promo-apply' style='position:absolute; top:165px; left:192px;'><a href='"+Xp1DecisioningURL1()+"' class='apply-now' title='Apply Now for a Discover Motiva Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+"' class='more' title='See Motiva Card Details'>See Details</a></div></div>");
	   document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+motiva_redirect+"'><img src='/images/bg-homepage-promo-motiva.jpg' width='710' height='234' alt='Get paid for paying on time.' title='Get paid for paying on time.' /></a><div id='homepage-promo-apply' style='position:absolute; top:165px; left:192px;'><a href='"+Xp1DecisioningURL1()+motiva_redirect+"' class='apply-now' title='Apply Now for a Discover Motiva Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+motiva_details+"' class='more' title='See Motiva Card Details'>See Details</a></div></div>");	
}
else if (Xp1Decisioning()=="miles"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+miles_redirect+"'><img src='/images/bg-homepage-promo-miles.jpg' width='710' height='234' alt='Travel with no restrictions.' title='Travel with no restrictions.' /></a><div id='homepage-promo-apply' style='position:absolute; top:165px; left:192px;'><a href='"+Xp1DecisioningURL1()+miles_redirect+"' class='apply-now' title='Apply Now for a Discover Miles Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+miles_details+"' class='more' title='See Miles Card Details'>See Details</a></div></div>");
}
else if (Xp1Decisioning()=="more"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_details+"'><img src='/images/bg-homepage-promo-more.jpg' width='710' height='234' alt='Put more cash in your pocket.' title='Put more cash in your pocket.' /></a><div id='homepage-promo-apply' style='position:absolute; top:165px; left:192px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+more_details+"' class='more' title='See More Card Details'>See Details</a></div></div>");

}
else if (Xp1Decisioning()=="openroad"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+"'><img src='/images/bg-homepage-promo-openroad.jpg' width='710' height='234' alt='Save at the pump and everywhere else.' title='Save at the pump and everywhere else.' /></a><div id='homepage-promo-apply' style='position:absolute; top:165px; left:192px;'><a href='"+Xp1DecisioningURL1()+"' class='apply-now' title='Apply Now for a Discover OpenRoad Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+"' class='more' title='See OpenRoad Card Details'>See Details</a></div></div>");
}
else if (Xp1Decisioning()=="student"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+student_redirect+"'><img src='/images/bg-homepage-promo-student.jpg' width='710' height='234' alt='Build your credit with the card that fits your style.' title='Build your credit with the card that fits your style.' /></a><div id='homepage-promo-apply' style='position:absolute; top:180px; left:307px;'><a href='"+Xp1DecisioningURL1()+student_redirect+"' class='apply-now' title='Apply Now for a Discover Student Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+student_details+"' class='more' title='See Student Card Details'>See Details</a></div></div>");
}
else if (Xp1Decisioning()=="dbc_core"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+"'><img src='/images/bg-homepage-promo-business.jpg' width='710' height='234' alt='Let the cash flow.' title='Let the cash flow.' /></a><div id='homepage-promo-apply' style='position:absolute; top:165px; left:192px;'><a href='"+Xp1DecisioningURL1()+"' class='apply-now' title='Apply Now for a Discover Business Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+"' class='more' title='See Business Card Details'>See Details</a></div></div>");
}
else if (Xp1Decisioning()=="PDP"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+"' title='Get Started'><img src='/images/paydown_marquee.jpg' alt='Don&rsquo;t just make payments. Make progress. Start reaching your goals today with a little help from our Paydown Planner. Get Started.' width='710' height='234' /></a><div id='homepage-promo-apply' style='position:absolute; top:165px; left:192px;'></div></div>");
}
else if (Xp1Decisioning()=="spendsmarter"){
                document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+"'><img src='/images/spendsmarter-staticbanner-ht.jpg' width='710' height='234' alt='What if we helped you spend smarter?' title='What if we helped you spend smarter?' /></a><div id='homepage-promo-apply' style='position:absolute; top:160px; left:30px; height:30px;'><a href='"+Xp1DecisioningURL1()+"' title='Show Me How'><img src='/images/spensmarter-button-ht.gif' height='28' width='118' class='rollover' /></a>&nbsp;<a href='"+Xp1DecisioningURL2()+"' class='more' title='Compare Cards'>Compare Cards</a></div></div>");
}
else if (Xp1Decisioning()=="spendanalyzer"){
                        document.write("<div id='spend-analyzer-homepage-promo'> <div id='spend-analyzer-content'><h1>Know where your money goes.</h1><h2>The Spend Analyzer provides a fast, easy way to see how you are really spending on your Discover Card.</h2><p><a href='"+Xp1DecisioningURL2()+"' title='See How it Works'>See How it Works</a></p><h2>Want to use this tool with your own spending?</h2>  <a href='"+Xp1DecisioningURL1()+"' id='spendanalyzer-second-btn' title='Apply Now'><img src='/images/btn-apply-now-lg.png' alt='Apply Now' width='96' height='28' class='rollover' /></a>  </div> </div>");
}
else if (Xp1Decisioning()=="5pctback"){

      		if (navigator.plugins != null) {


 		x = GetSwfVer();
 
              
     		if (!(x != -1))

     		{
        	
			document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_redirect+"'><img src='/images/discover_cashBack.jpg' width='710' height='234' alt='5% Cashback Bonus.' title='5% Cashback Bonus.' /></a><div id='homepage-promo-apply' style='position:absolute; top:180px; left:344px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for 5% Cashback Bonus'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+fiveper_redirect+"' class='more' title='See 5% Cashback Bonus Details'>See Details</a></div></div>");        		 
		
     		}else {
					//document.write("<div id='homepage-promo'><a href='#'> <div id='flashcontent'> </div> </a></div>");
						  document.write("<div id='homepage-promo'></div>");
                        var so2 = new SWFObject("/home/discover-summer.swf", "5pctback", "710", "234", "8", "#FFFFFF");
                        so2.addParam("base", "/home/");
		        so2.addParam("wmode", "transparent"); 
                        so2.addParam("allowscriptaccess", "always");
			so2.write("homepage-promo");
     		}

  	}else{
   	document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_redirect+"'><img src='/images/discover_cashBack.jpg' width='710' height='234' alt='5% Cashback Bonus.' title='5%Cashback Bonus.' /></a><div id='homepage-promo-apply' style='position:absolute; top:180px; left:344px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for 5% Cashback Bonus'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+fiveper_redirect+"' class='more' title='See 5% Cashback Bonus Details'>See Details</a></div></div>");
  	}

                        
}
else if (Xp1Decisioning()=="more_exp"){

      		if (navigator.plugins != null) {


 		x = GetSwfVer();
 
              
     		if (!(x != -1))

     		{
        	
			document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_redirect+"'><img src='/images/more-marqueeStatic.jpg' width='710' height='234' alt='Put more cash in your pocket.' title='Put more cash in your pocket.' /></a><div id='homepage-promo-apply' style='position:absolute; top:200px; left:580px; color: #FFFFFF'><a href='"+Xp1DecisioningURL2()+more_details+"' class='more' title='Discover More Card Details'><font color='#FFFFFF'>See Details</font></a></div></div>");        		 
		
     		}else {
         		//document.write("<div id='homepage-promo'><a href='#'> <div id='flashcontent'> </div> </a></div>");
						document.write("<div id='homepage-promo'></div>");
                        var so2 = new SWFObject("/home/more-flash-marquee.swf", "more_exp", "710", "234", "8", "#FFFFFF");
                        so2.addParam("base", "/home/");
		        so2.addParam("wmode", "transparent"); 
                        so2.addParam("allowscriptaccess", "always");
			so2.write("homepage-promo");
     		}

  	}else{
   	document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_redirect+"'><img src='/images/more-marqueeStatic.jpg' width='710' height='234' alt='Put more cash in your pocket.' title='Put more cash in your pocket.' /></a><div id='homepage-promo-apply' style='position:absolute; top:200px; left:580px; color:#FFFFFF'><a href='"+Xp1DecisioningURL2()+more_details+"' class='more' title='Discover More Card Details'><font color='#FFFFFF'>See Details</font></a></div></div>");
  	}

                        
}
// holiday09 marquee
//else if (Xp1Decisioning()=="holiday09"){

//	if (navigator.plugins != null) {

 //		x = GetSwfVer();
               
   //  		if (!(x != -1))

     //		{ 
		//	 document.write("<div id='homepage-promo'><div id='holidaydouble'><a href='"+Xp1DecisioningURL1()+holiday09_details+"' alt='Holiday Double Cashback Bonus with Discover card.' title='Holiday Double Cashback Bonus with Discover card.' style='text-decoration: none; cursor: hand; color: #000000'><div id='leftHoliday'></div><div id='topHoliday'><strong><h1><span class='orange_holiday'>DOUBLE</span> <em>Cashback Bonus</em><br /></h1><h2>Just in time for the holidays.</h2></strong></div></a><a href='"+Xp1DecisioningURL1()+holiday09_details+"' alt='Holiday Double Cashback Bonus with Discover card.' title='Holiday Double Cashback Bonus with Discover card.' style='text-decoration: none; cursor: hand; color: #000000'><div id='middleHoliday'><div class='middletextHoliday'><p style='line-height:1.2;'>Get a Discover card and earn DOUBLE <em>Cashback Bonus</em> on any online shopping--or at department, clothing, shoe and jewelry stores.</p></div></div></a><a href='"+Xp1DecisioningURL1()+holiday09_details+"' alt='Holiday Double Cashback Bonus with Discover card.' title='Holiday Double Cashback Bonus with Discover card.' style='text-decoration: none; cursor: hand; color: #000000'><div id='bottomSpender'></div><div id='bottomRightSpender'></div></a><div style='position:absolute; top:165px; left:270px;'><a href='"+Xp1DecisioningURL2()+holiday09_details+"' class='more-button' title='More Details'></a>&nbsp;&nbsp;<a href='"+Xp1DecisioningURL1()+holiday09_redirect+"' class='more' title='Apply Now'><b style='font-family:Arial,Helvetica,sans-serif; font-size:10pt;'>Apply Now</b> </a></div></div></div>");
		
     	//	}else { 
         //		document.write("<div id='homepage-promo'></div>");
				//document.write("<div id='homepage-promo'><a href='#'><div id='flashcontent'></div></a></div>");
           //             var so2 = new SWFObject("/home/DFS609_acquisitions_marquee_FINAL_my.swf", "holiday09", "710", "234", "8", "#FFFFFF");
             //           so2.addParam("base", "/home/");
				//		so2.addParam("wmode", "transparent"); 
                  //      so2.addParam("allowscriptaccess", "always");
					//	so2.write("homepage-promo");
     		//}

//  	}else{

  // 	document.write("<div id='homepage-promo'><div id='holidaydouble'><a href='"+Xp1DecisioningURL1()+holiday09_details+"' alt='Holiday Double Cashback Bonus with Discover card.' title='Holiday Double Cashback Bonus with Discover card.' style='text-decoration: none; cursor: hand; color: #000000'><div id='leftHoliday'></div><div id='topHoliday'><strong><h1><span class='orange_holiday'>DOUBLE</span> <em>Cashback Bonus</em><br /></h1><h2>Just in time for the holidays.</h2></strong></div></a><a href='"+Xp1DecisioningURL1()+holiday09_details+"' alt='Holiday Double Cashback Bonus with Discover card.' title='Holiday Double Cashback Bonus with Discover card.' style='text-decoration: none; cursor: hand; color: #000000'><div id='middleHoliday'><div class='middletextHoliday'><p style='line-height:1.2;'>Get a Discover card and earn DOUBLE <em>Cashback Bonus</em> on any online shopping--or at department, clothing, shoe and jewelry stores.</p></div></div></a><a href='"+Xp1DecisioningURL1()+holiday09_details+"' alt='Holiday Double Cashback Bonus with Discover card.' title='Holiday Double Cashback Bonus with Discover card.' style='text-decoration: none; cursor: hand; color: #000000'><div id='bottomSpender'></div><div id='bottomRightSpender'></div></a><div style='position:absolute; top:165px; left:270px;'><a href='"+Xp1DecisioningURL2()+holiday09_details+"' class='more-button' title='More Details'></a>&nbsp;&nbsp;<a href='"+Xp1DecisioningURL1()+holiday09_redirect+"' class='more' title='Apply Now'><b style='font-family:Arial,Helvetica,sans-serif; font-size:11pt;'>Apply Now</b> </a></div></div></div>");

  	//}
                        
//}
// student marquee

else if (Xp1Decisioning()=="studflash"){

	if (navigator.plugins != null) {

 		x = GetSwfVer();
               
     		if (!(x != -1))

     		{ 
        	
			document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+studflash_details+"'><img src='/images/DIS9011-StudentMarquee.jpg' width='710' height='234' border='0' alt='Discover Student card' title='Discover Student card'  usemap='#Map' /></a><map name='Map' id='Map'><area shape='rect' alt='See Details' title='See Details' coords='535,183,598,198' href='"+Xp1DecisioningURL2()+studflash_details+"' /><area shape='circle' alt='Apply Now' title='Apply Now' coords='640,177,30' href='"+Xp1DecisioningURL1()+studflash_redirect+"' /></map></div>");        		 
		
     		}else { 
         		document.write("<div id='homepage-promo'></div>");
				
                        var so2 = new SWFObject("/home/DIS9011-StudentMarquee01.swf", "studflash", "710", "234", "8", "#FFFFFF");
                        so2.addParam("base", "/home/");
						so2.addParam("wmode", "transparent"); 
                        so2.addParam("allowscriptaccess", "always");
						so2.write("homepage-promo");
     		}

  	}else{ 
   	document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+studflash_details+"'><img src='/images/DIS9011-StudentMarquee.jpg' width='710' height='234' border='0' alt='Discover Student card' title='Discover Student card'  usemap='#Map' /></a><map name='Map' id='Map'><area shape='rect' alt='See Details' title='See Details' coords='535,183,598,198' href='"+Xp1DecisioningURL2()+studflash_details+"' /><area shape='circle' alt='Apply Now' title='Apply Now' coords='640,177,30' href='"+Xp1DecisioningURL1()+studflash_redirect+"' /></map></div>");

	}
                        
}
else if (Xp1Decisioning()=="motiva2"){
                document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+"' title='Get paid for paying on time.'><img src='/images/bg-homepage-motiva-cbb.jpg' width='710' height='234' alt='Get paid for paying on time.' title='Get paid for paying on time.' /></a><div class='question'><a href='#' class='question-popup' id='double-rewards-cashback'><img src='/images/question-popup-off.gif' width='12' height='12' alt='Double Cashback Bonus' title='Double Cashback Bonus' /></a></div><div id='homepage-promo-cbb'><a href='"+Xp1DecisioningURL1()+"' title='Apply Now'><img src='/images/btn-apply-now.png' width='92' height='25' alt='Apply Now' title='Apply Now' class='rollover' /></a> <a href='"+Xp1DecisioningURL2()+"' title='See Details' class='more'>See Details</a></div></div>");
}
 
else if (Xp1Decisioning()=="openroad2"){
                        document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+"' title='Save at the pump and everywhere else.'><img src='/images/bg-homepage-openrd-cbb.jpg' width='710' height='234' alt='Save at the pump and everywhere else.' title='Save at the pump and everywhere else.' /></a><div class='question openroad'><a href='#' class='question-popup' id='double-rewards-cashback'><img src='/images/question-popup-off.gif' width='12' height='12' alt='Double Cashback Bonus' title='Double Cashback Bonus' /></a></div><div id='homepage-promo-cbb' class='openroad'><a href='"+Xp1DecisioningURL1()+"' title='Apply Now'><img src='/images/btn-apply-now.png' width='92' height='25' alt='Apply Now' title='Apply Now' class='rollover' /></a> <a href='"+Xp1DecisioningURL2()+"' title='See Details' class='more'>See Details</a></div></div>");
}
 
else if (Xp1Decisioning()=="miles2"){
                        document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+"' title='Save at the pump and everywhere else.'><img src='/images/bg-homepage-miles-cbb.jpg' width='710' height='234' alt='Travel with no restrictions.' title='Travel with no restrictions.' /></a><div class='question miles'><a href='#' class='question-popup' id='double-rewards-promo'><img src='/images/question-popup-off.gif' width='12' height='12' alt='Double Rewards Promotion' title='Double Rewards Promotion' /></a></div><div id='homepage-promo-cbb' class='openroad'><a href='"+Xp1DecisioningURL1()+"' title='Apply Now'><img src='/images/btn-apply-now.png' width='92' height='25' alt='Apply Now' title='Apply Now' class='rollover' /></a> <a href='"+Xp1DecisioningURL2()+"' title='See Details' class='more'>See Details</a></div></div>");
}
else if (Xp1Decisioning()=="escape"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+escape_redirect+"'><img src='/images/bg-homepage-promo-escape.jpg' width='710' height='234' alt='Simply a smart way to travel.' title='Simply a smart way to travel.' /></a><div id='homepage-promo-apply' style='position:absolute; top:180px; left:220px;'><a href='"+Xp1DecisioningURL1()+escape_redirect+"' class='apply-now' title='Apply Now for a Discover Escape Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+escape_details+"' class='more' title='See Escape Card Details'>See Details</a></div></div>");
}
else if (Xp1Decisioning()=="more_ctrl"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_details+"'><img src='/images/bg-homepage-promo-controlitsyourmoney.gif' width='710' height='234' alt='Discover puts you in control.' title='Discover puts you in control.' /></a><div id='homepage-promo-apply' style='position:absolute; top:190px; left:300px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+more_details+"' class='more' title='See More Card Details'>Learn More</a></div></div>");
                            
}
else if (Xp1Decisioning()=="more_sw"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_details+"'><img src='/images/bg-homepage-promo-switch.gif' width='710' height='234' alt='Put more cash in your pocket.' title='Put more cash in your pocket.' /></a><div id='homepage-promo-apply' style='position:absolute; top:190px; left:230px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+more_details+"' class='more' title='See More Card Details'>Learn More</a></div></div>");
                            
}
else if (Xp1Decisioning()=="more_rew"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_details+"'><img src='/images/bg-homepage-promo-rewardyourself.gif' width='710' height='234' alt='Reward yourself with Discover.' title='Reward yourself with Discover.' /></a><div id='homepage-promo-apply' style='position:absolute; top:190px; left:42px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+more_details+"' class='more' title='See More Card Details'>Learn More</a></div></div>");
                            
}
else if (Xp1Decisioning()=="more_spnd"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_details+"'><img src='/images/bg-homepage-promo-returntospender.gif' width='710' height='234' alt='5% Cashback Bonus Rewards.' title='5% Cashback Bonus Rewards.' /></a><div id='homepage-promo-apply' style='position:absolute; top:190px; left:225px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+more_details+"' class='more' title='See More Card Details'>Learn More</a></div></div>");
                            
}
else if (Xp1Decisioning()=="more_test"){
               document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_details+"'><img src='/images/bg-homepage-promo-more.jpg' width='710' height='234' alt='Put more cash in your pocket.' title='Put more cash in your pocket.' /></a><div id='homepage-promo-apply' style='position:absolute; top:165px; left:192px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+more_details+"' class='more' title='See More Card Details'>See Details</a></div></div>");

}
else if (Xp1Decisioning()=="more_prc"){
               //document.write("<div id='homepage-promo'><a href='"+Xp1DecisioningURL1()+more_redirect+"'><img src='/images/bg-homepage-promo-morecard-marqueerate.jpg' width='710' height='234' alt='Make your money worth more.' title='Make your money worth more.' /></a><div id='homepage-promo-apply' style='position:absolute; top:192px; left:320px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+more_details+"' class='more' title='See More Card Details'>View rates, fees, rewards, and other important information</a></div></div>");		
                document.write("<div id='homepage-promo'><div id='container_rate'><div id='left_rate'></div><div id='top_rate'><img style='margin-top:15px;' src='images/makeyourmoneyworthmore.jpg' title='Make your money worth More' alt='Make your money worth More' /></div><div id='middle_rate'><div class='product-box-rate'><div class='product-rate'><h1><span class='rate-value1'>0</span><span class='rate-unit'><span class='rate-unit-top'>%</span><span class='rate-unit-bottom'>APR</span></span></h1></div><div class='text_rate1'>on  purchases <br />for 6 months*</div></div><div class='product-box-rate'><div class='product-rate'><h1><span class='rate-value'>0</span><span class='rate-unit'><span class='rate-unit-top'>%</span><span class='rate-unit-bottom'>APR</span></span></h1></div><div class='text_rate'>on balance transfers<br />for 12 months*</div></div><div class='product-box-right'><div class='unlimited'>Unlimited<br />cash rewards</div><div class='textR'>on all your purchases<br />automatically</div></div></div><div id='bottom_rate'><div id='homepage-promo-apply' style='position:absolute; top:190px; left:300px; width: 380px;'><a href='"+Xp1DecisioningURL1()+more_redirect+"' class='apply-now' title='Apply Now for a Discover More Card'></a>&nbsp;<a href='"+Xp1DecisioningURL2()+more_details+"' style='font-size:10px;' class='more' title='See More Card Details'>*View rates, fees, rewards and other important information</a></div></div></div></div>");
}
else //display a default marquee
{
		  document.write("<div id='homepage-promo'><a href='https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MORE&hcmpgn=0712_uhp_mrq_mot_txt_potb'><img src='/images/bg-homepage-promo-more.jpg' width='710' height='234' alt='Put more cash in your pocket.' title='Put more cash in your pocket.' /></a><div id='homepage-promo-apply' style='position:absolute; top:165px; left:192px;'><a href='https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MORE&hcmpgn=0712_uhp_mrq_mot_txt_potb' class='apply-now' title='Apply Now for a Discover More Card'></a>&nbsp;<a href='/more' class='more' title='See More Card Details'>See Details</a></div></div>");
                //document.write("<div id='spend-analyzer-homepage-promo'> <div id='spend-analyzer-content'><h1>Know where your money goes.</h1><h2>The Spend Analyzer provides a fast, easy way to see how you are really spending on your Discover Card.</h2><p><a href='/spendanalyzer/' title='See How it Works'>See How it Works</a></p><h2>Want to use this tool with your own spending?</h2>  <a href='https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MORE' id='spendanalyzer-second-btn' title='Apply Now'><img src='/images/btn-apply-now-lg.png' alt='Apply Now' width='96' height='28' class='rollover' /></a>  </div> </div>");
                

}

}


var applybut_def = "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MOTV&hcmpgn=0712_uhp_mrq_mot_txt_potb";
var motiva_redirect = "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MOTV";
var miles_redirect = "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MILE";
var student_redirect = "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=STUD";
var escape_redirect = "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=KXER";
var more_redirect = "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MORE";
var fiveper_redirect = "http://discovercard.com/customer-service/rewards/get-more-calendar.html";
var spendana_redirect = "http://www.discovercard.com/spendanalyzer";
var status_redirect = "https://www.discovercard.com/cardmembersvcs/acqs/app/displayStatusRequest";
var current_redirect = "http://www.discovercard.com/current";
var shopd_redirect ="http://www.discovercard.com/customer-service/rewards/shopdiscover.html";
var soan_redirect = "http://discovercard.com/customer-service/security/create-soan.html";
var design_redirect = "http://www.discovercard.com/more";
var register_link = "https://www.discovercard.com/cardmembersvcs/registration/reg/goto?forwardName=reghome";
var creditcards_link = "http://discovercard.com/credit-cards";
var browseall_link = "http://www.discovercard.com/credit-cards";
var student_link = "http://www.discovercard.com/student";
//var holiday09_redirect = "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MORE";
//var holiday09_details = "http://www.discovercard.com/holidaydouble";
var studflash_redirect = "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=STUD";
var studflash_details = "https://www.discovercard.com/student";

var stud_redirect = "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=STUD";
var stud_details = "https://www.discovercard.com/student/";
var more_details = "http://www.discovercard.com/more";
var motiva_details ="http://www.discovercard.com/motiva";
var miles_details = "http://www.discovercard.com/miles";
var escape_details = "http://www.discovercard.com/escape";
var student_details = "http://www.discovercard.com/student";


function Xp1Decisioning(){
if(typeof xp1_c1_marquee === "undefined"){ 
return "other";
} 
else {
return xp1_c1_marquee;

}
} 

function Xp1DecisioningURL1(){
if(typeof xp1_cl2_marquee === "undefined"){
return applybut_def;
} else {
return xp1_cl2_marquee;
}
}
function Xp1DecisioningURL2(){
if(typeof xp1_cl3_marquee === "undefined"){ 
return more_details;
} else {
return xp1_cl3_marquee;
}
}


function xp1_Student_D_Credit_Text(){
if(typeof xp1_Student_D === "undefined"){
return student_link;
} else {
return xp1_Student_D+student_link;
}
}

function xp1_Browse_All_Card_Credit_Text(){
if(typeof xp1_Browse_All_Card === "undefined"){
return browseall_link;
}else {
return xp1_Browse_All_Card+ browseall_link;
}
}

function xp1_Login_Lnk(){
if(typeof xp1_Login == "undefined" || xp1_Login == "null")
{
return "https://www.discovercard.com/cardmembersvcs/loginlogout/app/ac_main";
}else {
return xp1_Login+"https://www.discovercard.com/cardmembersvcs/loginlogout/app/ac_main";
}
}

function xp1_lnav_pos1_TextImg(){ //alert("entered the new function");
if(typeof xp1_lnav_pos1 === "undefined") {
return "five";
} else {
return xp1_lnav_pos1;
}
}

function xp1_lnav_pos2_TextImg(){
if(typeof xp1_lnav_pos2 === "undefined") {
return "spend";
} else {
return xp1_lnav_pos2;
}
}

function xp1_lnav_pos3_TextImg(){
if(typeof xp1_lnav_pos3 === "undefined") {
return "status";
} else {
return xp1_lnav_pos3;
}
}

function xp1_lnav_pos4_TextImg(){
if(typeof xp1_lnav_pos4 === "undefined") {
return "current";
} else {
return xp1_lnav_pos4;
}
}

function xp1_lnav_cl1_TextImg(){
if(typeof xp1_lnav_cl1 === "undefined") {
return fiveper_redirect;
} else {
return xp1_lnav_cl1;
}
}

function xp1_lnav_cl2_TextImg(){
if(typeof xp1_lnav_cl2 === "undefined") {
return spendana_redirect;
} else {
return xp1_lnav_cl2;
}
}

function xp1_lnav_cl3_TextImg(){
if(typeof xp1_lnav_cl3 === "undefined") {
return status_redirect;
} else {
return xp1_lnav_cl3;
}
}

function xp1_lnav_cl4_TextImg(){
if(typeof xp1_lnav_cl4 === "undefined") {
return current_redirect;
} else {
return xp1_lnav_cl4;
}
}

function xp1_lnav_5pctback_TextImg(){
if(typeof xp1_lnav_5pctback === "undefined") {
return fiveper_redirect;
} else {
return xp1_lnav_5pctback+fiveper_redirect;
}
}

function xp1_lnav_spanalyze_TextImg(){
if(typeof xp1_lnav_spanalyze === "undefined") {
return spendana_redirect;
} else {
return xp1_lnav_spanalyze+spendana_redirect;
}
}
function xp1_lnav_chkstatus_TextImg(){
if(typeof xp1_lnav_chkstatus === "undefined") {
return status_redirect;
} else {
return xp1_lnav_chkstatus+status_redirect;
}
}

function xp1_lnav_current_TextImg(){
    if(typeof xp1_lnav_current === "undefined") {
	return current_redirect;
     } 
      else {
	return xp1_lnav_current+current_redirect;
	   }
}

function xp1_tab_smbus_TextImg(){
   if(typeof xp1_tab_smbus === "undefined"){
	return "http://discovercard.com#Small";
    }
   else  {
   	return xp1_tab_smbus;
	  }
}

function xp1_tab_giftcard_TextImg(){
  if(typeof xp1_tab_giftcard === "undefined"){
	return "http://discovercard.com#Gift";
     }
else  {
	return xp1_tab_giftcard;
      }
}

function xp1_tab_stloans_TextImg(){
   if(typeof xp1_tab_stloans === "undefined"){
	return "http://discovercard.com#Loans";
   }
  else  {
	return xp1_tab_stloans;
	}
}


function xp1_tab_savings_TextImg(){
if(typeof xp1_tab_savings === "undefined"){
return "http://discovercard.com#Savings";
}
else  {
return xp1_tab_savings;
}
}

function xp1_tab_insurance_TextImg(){
if(typeof xp1_tab_insurance === "undefined"){
return "http://discovercard.com#Insurance";
}
else  {
return xp1_tab_insurance;
}
}

function xp1_searchbar_TextImg(){
if(typeof xp1_searchbar === "undefined"){
return "http://search.discovercard.com/search";
}
else {
return xp1_searchbar+"http://search.discovercard.com/search";
}
}

function xp1_tnav_credit_TextImg(){
if(typeof xp1_tnav_credit === "undefined"){
return creditcards_link;
}
else {
return xp1_tnav_credit+creditcards_link;
}
}

function xp1_register_lnk(){
if(typeof xp1_register === "undefined"){
return register_link;
}else  {
return xp1_register+register_link;
}
}

var check='0';
function xp1_dynamic_opentab(){
if(typeof xp1_opentab === "undefined" ){ check='1';
return "tab1";
} 
else {// alert("xp1_opentab:- " + xp1_opentab);
return xp1_opentab;
}
}


function xp1_template_cards(){
if(typeof xp1_template === "undefined"){
xp1_template = "4";
return xp1_template;
}else {
return xp1_template;
}
}
//var xp1_c1_credit1 = "motiva";
function xp1_creditcard_row1(){ 
if(typeof xp1_c1_credit1 === "undefined"){
return "more";
}else {
return xp1_c1_credit1;
}
}

function xp1_creditcard_row1_BUT(){
if(typeof xp1_cl2_credit1 === "undefined"){
return "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=KXJA&hcmpgn=0801_hpu_cc_More_btn"; 
} else {
return xp1_cl2_credit1;
}
}

function xp1_creditcard_row1_TEXT(){
if(typeof xp1_cl3_credit1 === "undefined"){
return "http://www.discovercard.com/more/?hcmpgn=0801_hpu_cc_More_det"; 
} else {
return xp1_cl3_credit1;
}
}


function xp1_creditcard_row2(){
if(typeof xp1_c1_credit2 === "undefined"){
return "motiva";
}
else {
return xp1_c1_credit2;
}
}


function xp1_creditcard_row2_BUT(){
if(typeof xp1_cl2_credit2 === "undefined"){
return "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MOTV&hcmpgn=0801_hpu_cc_motiva_btn"; 
} else {
return xp1_cl2_credit2;
}
}


function xp1_creditcard_row2_TEXT(){
if(typeof xp1_cl3_credit2 === "undefined"){
return "http://www.discovercard.com/motiva/?hcmpgn=0801_hpu_cc_motiva_det"; 
} else {
return xp1_cl3_credit2;
}
}


function xp1_creditcard_row3(){
if(typeof xp1_c1_credit3 === "undefined"){
return "miles"; 
} else {
return xp1_c1_credit3;
}
}
function xp1_creditcard_row3_BUT(){
if(typeof xp1_cl2_credit3 === "undefined"){
return "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=MILE&hcmpgn=0801_hpu_cc_miles_btn"; 
} else {
return xp1_cl2_credit3;
}
}
function xp1_creditcard_row3_TEXT(){
if(typeof xp1_cl3_credit3 === "undefined"){
return "http://www.discovercard.com/miles/?hcmpgn=0801_hpu_cc_miles_det"; 
} else {
return xp1_cl3_credit3;
}
}
function xp1_creditcard_row4(){
if(typeof xp1_c1_credit4 === "undefined"){
return "escape"; 
} else {
return xp1_c1_credit4;
}
}
function xp1_creditcard_row4_BUT(){
if(typeof xp1_cl2_credit4 === "undefined"){
return "https://www.discovercard.com/cardmembersvcs/acqs/app/getapp?sc=KXER&aicmpgn=0801_ccm_cc_escape_btn"; 
} else {
return xp1_cl2_credit4;
}
}
function xp1_creditcard_row4_TEXT(){
if(typeof xp1_cl3_credit4 === "undefined"){
return "http://discovercard.com/escape/"; 
} else {
return xp1_cl3_credit4;
}
}

function xp1_tabtracking(xptab){
        var xptabtrack = "";
        var xptabimg = document.createElement('img');
        xptabimg.width=1;
        xptabimg.height=1;
        xptabimg.style.display='none';
        var xprand = Math.floor(Math.random()*10000000001);
      if(xptab=="tab1"){ 

	var xp1_template = xp1_template_cards();
 	//alert("xp1_template_dynamicvalue" + xp1_template);
 	if(xp1_template == "1") {
         //document.getElementById("pane1").className="col1";
 	}else if(xp1_template == "2"){
         //document.getElementById("pane1").className="col2";
 	}else if(xp1_template == "3"){
         //document.getElementById("pane1").className="col3";
	 }else if(xp1_template == "4"){
         //document.getElementById("pane1").className="col4";
	
 	}

 	for(var i=1;i<=xp1_template;i++){
 	//document.getElementById("card"+i).className="col";
	//document.getElementById("apply"+i).className="col4";
	 
	}

 if(xp1_template == 2)
 {
  document.getElementById("card1").style.width="330px";
  document.getElementById("apply1").style.width="330px";
  document.getElementById("apply2").style.width="330px";
 }
 if(xp1_template == 3)
 {
  document.getElementById("card1").style.padding="0 0 0 18px";
  document.getElementById("card1").style.width="242px";
  document.getElementById("card2").style.width="242px";
  document.getElementById("card3").style.width="185px";

  document.getElementById("apply1").style.padding="0 0 0 18px";
  document.getElementById("apply1").style.width="240px";
  document.getElementById("apply2").style.width="240px";
  document.getElementById("apply3").style.width="170px";
 }
 if(xp1_template == 4)
 {
  document.getElementById("card1").style.width="174px";
  document.getElementById("card2").style.width="174px";
  document.getElementById("card3").style.width="174px";
  document.getElementById("card4").style.width="174px";

  document.getElementById("apply1").style.width="168px";
  document.getElementById("apply2").style.width="172px";
  document.getElementById("apply3").style.width="172px";
  document.getElementById("apply4").style.width="170px";
 }
		
	if (typeof xp1_tab_smbus === "undefined"){
	return "#Credit";}
	else {	
	xptabimg.src=xp1_tab_creditcards+"&rand="+xprand;
        document.body.insertBefore(xptabimg,document.body.firstChild);}

        }
        if(xptab=="tab2"){ if (typeof xp1_tab_smbus === "undefined"){
	return "#small";}
	else {
        xptabimg.src=xp1_tab_smbus+"&rand="+xprand;
        document.body.insertBefore(xptabimg,document.body.firstChild); } 
        }
        if(xptab=="tab3"){ if (typeof xp1_tab_giftcard === "undefined"){
	 return "#Gift";}
	else {
        xptabimg.src=xp1_tab_giftcard+"&rand="+xprand;
        document.body.insertBefore(xptabimg,document.body.firstChild);  }
        }
        if(xptab=="tab4"){ if (typeof xp1_tab_stloans === "undefined"){
	return "#Loans";}
	else {
        xptabimg.src=xp1_tab_stloans+"&rand="+xprand;
        document.body.insertBefore(xptabimg,document.body.firstChild); }  
        }
        if(xptab=="tab5"){ if (typeof xp1_tab_savings === "undefined"){
	return "#Savings";}
	else {
        xptabimg.src=xp1_tab_savings+"&rand="+xprand;
        document.body.insertBefore(xptabimg,document.body.firstChild); }
		/*discover.rateFeed.populateSavings(); // Fusebox call for Bank rates
		// Bank rates getting from mm_rates.xml whenever fusebox call fails
		if(saving_heading1.length == 0 || saving_heading2.length == 0){ callBackXml();}*/
		
        }
        if(xptab=="tab6"){ if (typeof xp1_tab_insurance === "undefined"){
	return "#Insurance";}
	else {
        xptabimg.src=xp1_tab_insurance+"&rand="+xprand;
        document.body.insertBefore(xptabimg,document.body.firstChild); } 
        }
}  

function googlesearch()
{
var xsearch=xp1_searchbar_TextImg();
document.search.action=xsearch;
document.search.submit();
}

function delay(msecs)
{
var start = new Date().getTime();
var cur = start
while(cur - start < msecs)
{
cur = new Date().getTime();
}
} 

function xp1_logintrack(){
       
       if(typeof xp1_Login_btn === "undefined"){
        accountTypeChange();
		    document.loginForm.action="https://www.discovercard.com/cardmembersvcs/loginlogout/app/signin";
       document.loginForm.submit();
       } else {
       
       var xploginimg = document.createElement('img');
       xploginimg.width=1;
       xploginimg.height=1;
       xploginimg.style.display='none';
       var xprand = Math.floor(Math.random()*10000000001);
       
       xploginimg.src=xp1_Login_btn+"&rand="+xprand;
       	  
		  document.body.insertBefore(xploginimg,document.body.firstChild);
		  accountTypeChange();
		  document.loginForm.action="https://www.discovercard.com/cardmembersvcs/loginlogout/app/signin";
		  var m = xploginimg.complete;
		 // alert(m);
		 	 //var t =  xploginimg.readyState;
		   //alert(t);
        
        var start = new Date().getTime();
				var cur = start
        while ( m != true)
         {
          	//t =  xploginimg.readyState;
          	m = xploginimg.complete;
          	cur = new Date().getTime();
          	if(cur - start > 1000){
          	 	 	 	// alert("inside" + m);
          	 	 	 	 break;
            }
            // alert(m);
          }
     m = xploginimg.complete;
   // alert(m);
    if (m == true) {
        //alert("The image is fully loaded");
        document.loginForm.submit();
    } else {
        //alert("The image is not completely loaded");
        //setTimeout(document.loginForm.submit(), 500);
        document.loginForm.submit();
    }
  }
}

/*function callBackXml()
{
	$(document).ready(function() {

        $.ajax({

        type: "GET",

        url: "assets/mm_rates.xml",

        dataType: "xml",

        success: function(xml) {

                                $(xml).find('rate').each(function() {
                                        var discover = $(this).attr('discover');
                                        var national = $(this).attr('national');

                                        $('#saving-heading1').html(discover + '%<br />APY ');
                                        $('#saving-heading2').html(national + '%<br />APY ');
                                }); //close each(

                }

        });

 });
}*/

