Dhtml Floating Menu by Vista-Buttons.com v5.7
|
(24 hours)
Administrative Office:
M-F 8 a.m.-4 p.m.
P: (205) 489-8765
F: (205) 489-3090
P. O. Box 10
11 Blake Drive, Room 1
Double Springs, AL 35553
|
|
|
|
Judicial Complex Open House
Open house held at The Bobby R. Aderholt Judicial Complex in Double Springs, Alabama.
";
}
else {
document.getElementById("CaptionContainer").innerHTML = ""+PhotoDescriptions[PhotoNumber-1]+"";
}
}
else {
document.getElementById("CaptionContainer").style.display = "none";
document.getElementById("CaptionContainer").style.padding = "0px";
document.getElementById("CaptionContainer").innerHTML = "";
}
document.getElementById("NavContainer").style.left = 0;
document.getElementById("NavContainer").style.top = 0;
document.getElementById("NavContainer").style.background = "#dcdcdc";
document.getElementById("NavContainer").style.padding = "5px 5px 5px 5px";
if (PhotoURLs.length > 1) {
document.getElementById("NavContainer").innerHTML = "
Previous Image |
Next Image |
|
Start/Stop Slideshow |
|
Close |
";
}
else {
document.getElementById("NavContainer").innerHTML = "Close ";
}
document.getElementById("PhotoLayerContainer").style.background = "white";
document.getElementById("PhotoLayerContainer").style.border = "1px black solid";
document.getElementById("PhotoLayerContainer").style.padding = "0px";
if (document.body.scrollTop > 0) {
ScrollTop = document.body.scrollTop;
}
else {
if (window.pageYOffset) {
ScrollTop = window.pageYOffset;
}
else {
ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
}
}
var Height = document.getElementById("PhotoLayerContainer").offsetHeight;
var Width = PhotoWidths[PhotoNumber-1];
if (Width < 600) {
Width = 600;
}
if (window.innerWidth > 0) {
Left = parseInt((window.innerWidth-Width)/2);
}
else if (document.documentElement.clientWidth > 0) {
Left = parseInt((document.documentElement.clientWidth-Width)/2);
}
else if (document.body.clientWidth > 0) {
Left = parseInt((document.body.clientWidth-Width)/2);
}
else if (screen.width > 0) {
Left = parseInt((screen.width-Width)/2);
}
if (window.innerHeight > 0) {
Top = parseInt((window.innerHeight-Height)/2);
//alert("1:"+window.innerHeight);
}
else if (document.documentElement.clientHeight > 0) {
Top = parseInt((document.documentElement.clientHeight-Height)/2);
//alert("2:"+document.documentElement.clientHeight);
}
else if (document.body.clientHeight > 0) {
Top = parseInt((document.body.clientHeight-Height)/2);
//alert("4:"+document.body.clientHeight);
}
else if (screen.height > 0) {
Top = parseInt((screen.height-Height)/2);
//alert("3:"+screen.height);
}
document.getElementById("PhotoLayerContainer").style.left = Left;
document.getElementById("PhotoLayerContainer").style.top = Top+ScrollTop;
document.getElementById("PhotoLayerContainer").style.width = Width;
//document.getElementById("PhotoLayerContainer").style.height = Height;
ImageBeingDisplayed = true;
ShowLockScreen();
}
if (CurrentImage < PhotoURLs.length) {
ImagePreload.src = PhotoURLs[CurrentImage];
}
else {
ImagePreload.src = PhotoURLs[0];
}
if (CurrentImage > 1) {
ImagePreload2.src = PhotoURLs[CurrentImage-2];
}
else {
ImagePreload2.src = PhotoURLs[PhotoURLs.length-1];
}
}
function NextImage() {
if (CurrentImage < PhotoURLs.length) {
CurrentImage++;
}
else {
CurrentImage = 1;
}
if (SlideShowRunning == true) {
SlideShowRunning = false;
window.clearInterval(TimerCode);
}
ViewImage(CurrentImage);
}
function PreviousImage() {
if (CurrentImage > 1) {
CurrentImage--;
}
else {
CurrentImage = PhotoURLs.length;
}
if (SlideShowRunning == true) {
SlideShowRunning = false;
window.clearInterval(TimerCode);
}
ViewImage(CurrentImage);
}
function StartStopSlideshow() {
if (SlideShowRunning == false) {
SlideShowRunning = true;
TimerCode = window.setInterval(AdvanceSlideshow,5000);
if (CurrentImage < PhotoURLs.length) {
CurrentImage++;
}
else {
CurrentImage = 1;
}
ViewImage(CurrentImage);
}
else {
SlideShowRunning = false;
window.clearInterval(TimerCode);
}
}
function AdvanceSlideshow() {
if (CurrentImage < PhotoURLs.length) {
CurrentImage++;
}
else {
CurrentImage = 1;
}
ViewImage(CurrentImage);
}
function CloseImage() {
document.getElementById("PhotoLayerContainer").style.display = "none";
HideLockScreen();
CurrentImage = 0;
ImageBeingDisplayed = false;
if (SlideShowRunning == true) {
window.clearInterval(TimerCode);
SlideShowRunning = false;
}
}
var ScreenLocked = false;
function ShowLockScreen() {
document.getElementById("LockScreen").style.width = document.body.scrollWidth;
document.getElementById("LockScreen").style.height = document.body.scrollHeight;
document.getElementById("LockScreen").style.position = "absolute";
document.getElementById("LockScreen").style.visibility = "visible";
ScreenLocked = true;
}
function HideLockScreen() {
document.getElementById("LockScreen").style.visibility = "hidden";
ScreenLocked = false;
}
function CatchKeystroke(EventID) {
if (ImageBeingDisplayed == true) {
// only process key events when image being displayed
var KeystrokeCode;
if ("which" in EventID) {
KeystrokeCode = EventID.which;
}
else if ("keyCode" in EventID) {
KeystrokeCode = EventID.keyCode;
}
else if ("keyCode" in window.event) {
KeystrokeCode = window.event.keyCode;
}
else if ("which" in window.event) {
KeystrokeCode = EventID.which;
}
if (KeystrokeCode == 37) {
PreviousImage();
}
else if (KeystrokeCode == 39) {
NextImage();
}
else if (KeystrokeCode == 27) {
CloseImage();
}
}
}
if (document.addEventListener) {
// Firefox, Safari, Opera
document.addEventListener("keydown", CatchKeystroke, false);
}
else if (document.attachEvent) {
//Internet Explorer, Opera
document.attachEvent("onkeydown", CatchKeystroke);
}
|
|