/*
 * Holds common code used across multiple pages in the Sprint Site
 */

/*
 * Flash Redirection - Holds scripts called by flash pieces to allow
 * dynamic changing of links without reworking the flash code.
 */

/**
 * Used on the business/products/whySprint/index.jsp wow flash.
 *The following code must be embeded in the flash image in order to use the following function:
 *
 * on(release)
 * {
 *  getUrl( "javascript:whySprintLink()", "_self");
 * }
 */
function whySprintLink() {
   // 15-minute flash rotation logic 
//   var currentTime = new Date();
//   var m = currentTime.getMinutes();
//    if ((m >= 0 && m < 15) || (m >= 30 && m < 45)) {
        window.location.href="/business/products/whySprint/cs-bmw.jsp?internalId=SBS_BMW_print_flash_541x185";
 //   } else {
 //       window.location.href="/business/products/whySprint/cs-PGA.jsp?internalId=10";
 //   }
}

//function whySprintFlash() {  
   // 15-minute flash rotation logic
//   var currentTime = new Date();
//   var m = currentTime.getMinutes();
 //   if ((m >= 0 && m < 15) || (m >= 30 && m < 45)) {
 //      document.write(sprint_makeFlash(541,185,"","/business/images/whySprint/whySprint.swf"));
 //   } else {
 //      document.write(sprint_makeFlash(541,185,"","/business/images/whySprint/whySprint_PGA2.swf"));
 //  }
//}


//function promoHomepageTop() {  
   // 15-minute flash rotation logic
//   var currentTime = new Date();
//   var m = currentTime.getMinutes();
//    if ((m >= 0 && m < 15) || (m >= 30 && m < 45)) {
//       document.write('<a href="/business/products/sections/whySprint.jsp?internalId=1" title="With Sprint, business is beautiful(SM)"><img src="images/promo-homepageTop.jpg" alt="With Sprint, business is beautiful(SM)" /></a>');
//    } else {
//       document.write('<a href="/business/products/sections/whySprint.jsp?internalId=4" title="With Sprint, business is beautiful(SM)"><img src="images/promo-homepageTop2.jpg" alt="With Sprint, business is beautiful(SM)" /></a>');
//   }
//}

