loaded33 = function() { // Position next, control, and prev var width = getWidth(); var prev = document.getElementById('prev22'); if( def(prev) ) prev.style.left = (width-240) + "px"; var control = document.getElementById('control22'); if( def(control) ) control.style.left = (width-220) + "px"; var next = document.getElementById('next22'); if( def(next) ) next.style.left = (width-200) + "px"; addRepos( function() { var width = getWidth(); var prev = document.getElementById('prev22'); if( def(prev) ) prev.style.left = (width-240) + "px"; var control = document.getElementById('control22'); if( def(control) ) control.style.left = (width-220) + "px"; var next = document.getElementById('next22'); if( def(next) ) next.style.left = (width-200) + "px"; }); // Define new object to hold col carousel. if( !def( window.ColCara ) ) { window.ColCara = {}; } // Store header div for future use. ColCara.holder = document.getElementById("holder"); ColCara.holder.style.width = (getWidth()-15)+"px"; // Store header div for future use. ColCara.header = document.getElementById("header"); ColCara.header.style.width = (getWidth()-15)+"px"; ColCara.mainText = document.getElementById("main-text"); ColCara.next = document.getElementById("next22"); ColCara.pause = document.getElementById("control22"); ColCara.prev = document.getElementById("prev22"); ColCara.width = getWidth(); ColCara.prev.style.left = ((ColCara.width/2)-(1200/2)+1000)+"px"; ColCara.next.style.left = ((ColCara.width/2)-(1200/2)+1040)+"px"; ColCara.pause.style.left = ((ColCara.width/2)-(1200/2)+1020)+"px"; ColCara.prev.style.display = "block"; ColCara.next.style.display = "block"; ColCara.pause.style.display = "block"; /** * Repositions the panels of the appliation. * This is called on window.onresize. */ ColCara.repos = function() { ColCara.width = getWidth(); ColCara.holder.style.width = (ColCara.width+-15)+"px"; ColCara.header.style.width = (ColCara.width-15)+"px"; ColCara.next.style.left = ((ColCara.width/2)-(1200/2)+1040)+"px"; ColCara.prev.style.left = ((ColCara.width/2)-(1200/2)+1000)+"px"; ColCara.pause.style.left = ((ColCara.width/2)-(1200/2)+1020)+"px"; ColCara.mainText.style.left = ((ColCara.width/2)-(1200/2)+130)+"px"; }; // ColCara.repos // Add function to list of functions inside window.onresize addRepos( ColCara.repos ); // Store header div for future use. ColCara.header = document.getElementById("header"); // Ad one gets displayed and calls this function. var ad1 = function() { }; // Ad two gets displayed and calls this function. var ad2 = function() { }; ColCara.mainItems = [ { "type": "image", "file": "http://images.catholic.org/carousel/lent/2014041410untitled3.jpg", "logo": false, "url": "/carouselClicks.php?t=%CB%92VO%ACG%D39%07Bmw%AA%9A%C8B", "onclick":"window.location='/carouselClicks.php?t=%CB%92VO%ACG%D39%07Bmw%AA%9A%C8B'" }, { "type": "image", "file": "http://images.catholic.org/carousel/lent/20141217561200-bible.jpg", "logo": false, "url": "/carouselClicks.php?t=J%C1%D71%7F%EB%DC%CBL%D9%DCH%92q%AF%AC", "onclick":"window.location='/carouselClicks.php?t=J%C1%D71%7F%EB%DC%CBL%D9%DCH%92q%AF%AC'" } ]; // Configuration. ColCara.mainConf = { orientation: Carousel.horizontal, logo: false, logoImage: "/images/newcarousel/kn-logo.png", prevOn: "prev-on", pauseOn: "pause-on", playOn: "play-on", nextOn: "next-on", opacity: true, //moveAnimation: 200, //opacityAnimation: { shown: 1.0, hidden: 0.4, duration: 1 }, wait: false, textDiv: "main-text", centered: true, moveArrows: false, changeTime: 5000, videoTime: 15000, mutedVideos: true, carouselWidth: "100%", carouselHeight: 550, panelWidth: 1200, panelHeight: 550, initCallback: null }; // Initialize object. ColCara.mainCarousel = new Carousel( ColCara.header, ColCara.mainConf, ColCara.mainItems ); }; // This adds the function to be called after the page loads. addLoad( loaded33 );