// Engagements Pages Slide Show var EventUtil = new Object; EventUtil.addEventHandler = function (oTarget, sEventType, fnHandler) { if (oTarget.addEventListener) { // For DOM-Compliant Browsers oTarget.addEventListener(sEventType, fnHandler, false); } else if (oTarget.attachEvent) { // For MS IE oTarget.attachEvent("on" + sEventType, fnHandler); } else { // For Others oTarget["on" + sEventType] = fnHandler; } }; var spot = document.createElement("img"); spot.src = "portraits/First.gif"; spot.alt = "Tampa Bay Brides Has All Your Wedding Needs."; spot.name = "spot"; spot.id = "spot"; spot.width = "190"; spot.height = "200"; this.document.getElementById("spot_container").appendChild(spot); spot.style.position = "relative"; spot.style.pixelWidth = "190"; spot.style.pixelHeight = "200"; var spotCtrl = document.createElement("div"); spotCtrl.id = "spot_controls"; spotCtrl.style.position = "relative"; spotCtrl.style.paddingTop = "20px"; spotCtrl.style.left = "35px"; this.document.getElementById("spot_container").appendChild(spotCtrl); var prevs = document.createElement("img"); prevs.src = "images/reverse.jpg"; prevs.id = "prevs"; prevs.alt = "previous"; prevs.width = "30"; prevs.height = "20"; this.document.getElementById("spot_controls").appendChild(prevs); var oImgPrevs = this.document.getElementById("prevs"); function fnPrevs() { prevImage_s('spot'); clearTimeout(timerIDs); } EventUtil.addEventHandler(oImgPrevs, "click", fnPrevs ); var paws = document.createElement("img"); paws.src = "images/pause.jpg"; paws.id = "paws"; paws.alt = "pause"; paws.width = "30"; paws.height = "20"; this.document.getElementById("spot_controls").appendChild(paws); var oImgPaws = this.document.getElementById("paws"); function fnPaws() { clearTimeout(timerIDs); } EventUtil.addEventHandler(oImgPaws, "click", fnPaws ); var pla = document.createElement("img"); pla.src = "images/play.jpg"; pla.id = "pla"; pla.alt = "play"; pla.width = "30"; pla.height = "20"; this.document.getElementById("spot_controls").appendChild(pla); var oImgPla = this.document.getElementById("pla"); function fnPla() { rotateImage_s('spot'); } EventUtil.addEventHandler(oImgPla, "click", fnPla ); var nex = document.createElement("img"); nex.src = "images/forward.jpg"; nex.id = "nex"; nex.alt = "next"; nex.width = "30"; nex.height = "20"; this.document.getElementById("spot_controls").appendChild(nex); var oImgNex = this.document.getElementById("nex"); function fnNex() { rotateImage_s('spot'); clearTimeout(timerIDs); } EventUtil.addEventHandler(oImgNex, "click", fnNex ); var oImg = this.document.getElementById("spot"); var oDiv = this.document.getElementById("spot_controls"); if (oImg.height > 0 ) { oDiv.style.top = parseInt(oImg.style.top) + oImg.height + 13 + "px"; } else { oDiv.style.top = parseInt(oImg.style.top) + oImg.style.pixelHeight + 13 + "px"; }