﻿//var banners = new Array(
//"<div style=\"width: 305px; height: 145px; background: url('/Home/images/SmallBanners/small.banner.1.png') no-repeat;\"><div style=\"color: White; font-size: 12px; font-weight: bold; float: right; text-align: center; width: 126px; padding-top: 30px;\">TRABECTOME TV<br /><br />Watch Trabectome surgeons on TV<br /><br /><a href=\"/News/TrabectomeTV\">WATCH</a></div></div>"
//, "<div style=\"width: 305px; height: 145px; background: url('/Home/images/SmallBanners/small.banner.2.png') no-repeat;\"><div style=\"color: White; font-size: 12px; font-weight: bold; float: right; text-align: center; width: 106px; padding-top: 30px;\">Benefits of Trabectome<span style=\"font-size: 0.6em;\"><sup>&copy;</sup></span><br /><br /><a href=\"/Patients/TrabectomeBenefits\">LEARN MORE</a></div></div>"
//, "<div style=\"width: 305px; height: 145px; background: url('/Home/images/SmallBanners/small.banner.4.png') no-repeat;\"><div style=\"color: White; font-size: 12px; font-weight: bold; float: right; text-align: center; width: 124px; padding-top: 30px;\"><br/>NEWS - <a href=\"javascript:ModalDialogShow('/Data/Patients/TrabectomeBenefits/Trabectome Information for Patients PN190103 Rev A.mp4','Trabectome Information for Patients PN190103 Rev A','Information for Patients');\">Watch<br/>Patient's Information<br/>Video</a></div></div>"
////"<div style=\"width: 305px; height: 145px; background: url('/Home/images/SmallBanners/small.banner.3.png') no-repeat;\"><div style=\"color: Black; font-size: 12px; font-weight: bold; float: right; text-align: center; width: 144px; padding-top: 30px;\">See you at<br/><br/><span style=\"font-size:18px; font-weight: bold;\">World Glaucoma Congress 2009</span><br/><br/>July8-11, Boston, MA</div></div>",
//, "<div style=\"width: 305px; height: 145px; background: url('/Home/images/SmallBanners/small.banner.5.png') no-repeat;\"><div style=\"color: White; font-size: 12px; font-weight: bold; float: right; text-align: center; width: 126px; padding-top: 30px;\">See you at<br/><br/><span style=\"font-size:18px; font-weight: bold;\">AAO 2009</span><br/>San Francisco<br/><br/>24-28 OCT</div></div>"
//);

//var currentBannerIndex = Math.floor( Math.random() * banners.length );

//var timer = null;

//preLoadImages();

//window.onload = function() { timedBanner(); };

//function timedBanner() {
//    document.getElementById('smallBannerSection').innerHTML = banners[currentBannerIndex++];
//    if (currentBannerIndex == banners.length) {
//        currentBannerIndex = 0;
//    }
//    timer = setTimeout("timedBanner()", 5000);
//}

//function preLoadImages() {
//    if (document.images) {
//        for (i = 0; i < banners.length; ++i) {
//            new Image(305, 145).src = "/Home/images/SmallBanners/small.banner." + (i + 1).toString() + ".png";
//        }
//    }
//}

//function prevBanner() {
//    currentBannerIndex -= 2;
//    if (currentBannerIndex == -1) {
//        currentBannerIndex = banners.length - 1;
//    }
//    if (currentBannerIndex == -2) {
//        currentBannerIndex = banners.length - 2;
//    }
//    clearTimeout(timer);
//    timedBanner();
//}

//function nextBanner() {
//    clearTimeout(timer);
//    timedBanner();
//}

function ShowNews(id) {
    var args = 'width=520,height=292,left=100,top=100';
    args += ',toolbar=no,location=no,status=no,menubar=yes,scrollbars=yes,resizable=no';

    ModalDialogWindow = window.open("/Home/News.aspx?id=" + id, "PopupWindowNews", args);
    ModalDialogWindow.focus();
}