"
Array.prototype.removeDuplicates = function () { for (var i = 1; i " links next to image number
this.autoResize = true; // controls whether or not images should be resized if larger than the browser window dimensions
this.doAnimations = true; // controls whether or not "animate" Lytebox, i.e. resize transition between images, fade in/out effects, etc.
this.borderSize = 12; // if you adjust the padding in the CSS, you will need to update this variable -- otherwise, leave this alone...
/*** End Global Configuration ***/
/*** Configure Slideshow Options ***/
this.slideInterval = 4000; // Change value (milliseconds) to increase/decrease the time between "slides" (10000 = 10 seconds)
this.showNavigation = true; // true to display Next/Prev buttons/text during slideshow, false to hide
this.showClose = true; // true to display the Close button, false to hide
this.showDetails = true; // true to display image details (caption, count), false to hide
this.showPlayPause = true; // true to display pause/play buttons next to close button, false to hide
this.autoEnd = true; // true to automatically close Lytebox after the last image is reached, false to keep open
this.pauseOnNextClick = false; // true to pause the slideshow when the "Next" button is clicked
this.pauseOnPrevClick = true; // true to pause the slideshow when the "Prev" button is clicked
/*** End Slideshow Configuration ***/
if(this.resizeSpeed > 10) { this.resizeSpeed = 10; }
if(this.resizeSpeed ';
objOuterContainer.appendChild(objIframeContainer1);
var objIframeContainer = this.doc.createElement("div");
objIframeContainer.setAttribute('id','lbIframeContainer');
objIframeContainer.style.display = 'none';
objOuterContainer.appendChild(objIframeContainer);
var objIframe = this.doc.createElement("iframe");
objIframe.setAttribute('id','lbIframe');
objIframe.setAttribute('name','lbIframe');
objIframe.style.display = 'none';
objIframeContainer.appendChild(objIframe);
var objImageContainer = this.doc.createElement("div");
objImageContainer.setAttribute('id','lbImageContainer');
objOuterContainer.appendChild(objImageContainer);
var objLyteboxImage = this.doc.createElement("img");
objLyteboxImage.setAttribute('id','lbImage');
objImageContainer.appendChild(objLyteboxImage);
var objLoading = this.doc.createElement("div");
objLoading.setAttribute('id','lbLoading');
objOuterContainer.appendChild(objLoading);
var objDetailsContainer = this.doc.createElement("div");
objDetailsContainer.setAttribute('id','lbDetailsContainer');
objDetailsContainer.setAttribute((this.ie ? 'className' : 'class'), this.theme);
objLytebox.appendChild(objDetailsContainer);
var objDetailsData =this.doc.createElement("div");
objDetailsData.setAttribute('id','lbDetailsData');
objDetailsData.setAttribute((this.ie ? 'className' : 'class'), this.theme);
objDetailsContainer.appendChild(objDetailsData);
var objDetails = this.doc.createElement("div");
objDetails.setAttribute('id','lbDetails');
objDetailsData.appendChild(objDetails);
var objCaption = this.doc.createElement("span");
objCaption.setAttribute('id','lbCaption');
objDetails.appendChild(objCaption);
var objHoverNav = this.doc.createElement("div");
objHoverNav.setAttribute('id','lbHoverNav');
objImageContainer.appendChild(objHoverNav);
var objBottomNav = this.doc.createElement("div");
objBottomNav.setAttribute('id','lbBottomNav');
objDetailsData.appendChild(objBottomNav);
var objPrev = this.doc.createElement("a");
objPrev.setAttribute('id','lbPrev');
objPrev.setAttribute((this.ie ? 'className' : 'class'), this.theme);
objPrev.setAttribute('href','#');
objHoverNav.appendChild(objPrev);
var objNext = this.doc.createElement("a");
objNext.setAttribute('id','lbNext');
objNext.setAttribute((this.ie ? 'className' : 'class'), this.theme);
objNext.setAttribute('href','#');
objHoverNav.appendChild(objNext);
var objNumberDisplay = this.doc.createElement("span");
objNumberDisplay.setAttribute('id','lbNumberDisplay');
objDetails.appendChild(objNumberDisplay);
var objNavDisplay = this.doc.createElement("span");
objNavDisplay.setAttribute('id','lbNavDisplay');
objNavDisplay.style.display = 'none';
objDetails.appendChild(objNavDisplay);
var objClose = this.doc.createElement("a");
objClose.setAttribute('id','lbClose');
objClose.setAttribute((this.ie ? 'className' : 'class'), this.theme);
objClose.setAttribute('href','#');
objBottomNav.appendChild(objClose);
var objPause = this.doc.createElement("a");
objPause.setAttribute('id','lbPause');
objPause.setAttribute((this.ie ? 'className' : 'class'), this.theme);
objPause.setAttribute('href','#');
objPause.style.display = 'none';
objBottomNav.appendChild(objPause);
var objPlay = this.doc.createElement("a");
objPlay.setAttribute('id','lbPlay');
objPlay.setAttribute((this.ie ? 'className' : 'class'), this.theme);
objPlay.setAttribute('href','#');
objPlay.style.display = 'none';
objBottomNav.appendChild(objPlay);
};
LyteBox.prototype.updateLyteboxItems = function() {
var anchors = (this.isFrame) ? window.parent.frames[window.name].document.getElementsByTagName('a') : document.getElementsByTagName('a');
for (var i = 0; i « prev« prev || next »next »';
object.style.display = 'none';
}
if (this.isLyteframe) {
var iframe = myLytebox.doc.getElementById('lbIframe');
var styles = this.frameArray[this.activeFrame][2];
var aStyles = styles.split(';');
for (var i = 0; i = 0) {
var w = aStyles[i].replace('width:', '');
iframe.width = w.trim();
} else if (aStyles[i].indexOf('height:') >= 0) {
var h = aStyles[i].replace('height:', '');
iframe.height = h.trim();
} else if (aStyles[i].indexOf('scrolling:') >= 0) {
var s = aStyles[i].replace('scrolling:', '');
iframe.scrolling = s.trim();
} else if (aStyles[i].indexOf('border:') >= 0) {
// Not implemented yet, as there are cross-platform issues with setting the border (from a GUI standpoint)
//var b = aStyles[i].replace('border:', '');
//iframe.style.border = b.trim();
}
}
this.resizeContainer(parseInt(iframe.width), parseInt(iframe.height));
} else {
imgPreloader = new Image();
imgPreloader.onload = function() {
var imageWidth = imgPreloader.width;
var imageHeight = imgPreloader.height;
if (myLytebox.autoResize) {
var pagesize = myLytebox.getPageSize();
var x = pagesize[2] - 150;
var y = pagesize[3] - 150;
if (imageWidth > x) {
imageHeight = Math.round(imageHeight * (x / imageWidth));
imageWidth = x;
if (imageHeight > y) {
imageWidth = Math.round(imageWidth * (y / imageHeight));
imageHeight = y;
}
} else if (imageHeight > y) {
imageWidth = Math.round(imageWidth * (y / imageHeight));
imageHeight = y;
if (imageWidth > x) {
imageHeight = Math.round(imageHeight * (x / imageWidth));
imageWidth = x;
}
}
}
var lbImage = myLytebox.doc.getElementById('lbImage')
lbImage.src = (myLytebox.isSlideshow ? myLytebox.slideArray[myLytebox.activeSlide][0] : myLytebox.imageArray[myLytebox.activeImage][0]);
lbImage.width = imageWidth;
lbImage.height = imageHeight;
myLytebox.resizeContainer(imageWidth, imageHeight);
imgPreloader.onload = function() {};
}
imgPreloader.src = (this.isSlideshow ? this.slideArray[this.activeSlide][0] : this.imageArray[this.activeImage][0]);
}
};
LyteBox.prototype.resizeContainer = function(imgWidth, imgHeight) {
this.wCur = this.doc.getElementById('lbOuterContainer').offsetWidth;
this.hCur = this.doc.getElementById('lbOuterContainer').offsetHeight;
this.xScale = ((imgWidth + (this.borderSize * 2)) / this.wCur) * 100;
this.yScale = ((imgHeight + (this.borderSize * 2)) / this.hCur) * 100;
var wDiff = (this.wCur - this.borderSize * 2) - imgWidth;
var hDiff = (this.hCur - this.borderSize * 2) - imgHeight;
if (!(hDiff == 0)) {
this.hDone = false;
this.resizeH('lbOuterContainer', this.hCur, imgHeight + this.borderSize*2, this.getPixelRate(this.hCur, imgHeight));
} else {
this.hDone = true;
}
if (!(wDiff == 0)) {
this.wDone = false;
this.resizeW('lbOuterContainer', this.wCur, imgWidth + this.borderSize*2, this.getPixelRate(this.wCur, imgWidth));
} else {
this.wDone = true;
}
if ((hDiff == 0) && (wDiff == 0)) {
if (this.ie){ this.pause(250); } else { this.pause(100); }
}
this.doc.getElementById('lbPrev').style.height = imgHeight + "px";
this.doc.getElementById('lbNext').style.height = imgHeight + "px";
this.doc.getElementById('lbDetailsContainer').style.width = (imgWidth + (this.borderSize * 2) + (this.ie && this.doc.compatMode == "BackCompat" && this.outerBorder ? 2 : 0)) + "px";
this.showContent();
};
LyteBox.prototype.showContent = function() {
if (this.wDone && this.hDone) {
for (var i = 0; i 1) || (this.frameArray.length > 1 && this.isLyteframe)) {
this.doc.getElementById('lbNavDisplay').style.display = '';
} else {
this.doc.getElementById('lbNavDisplay').style.display = 'none';
}
this.doc.getElementById('lbClose').style.display = '';
this.doc.getElementById('lbDetails').style.display = '';
this.doc.getElementById('lbPause').style.display = 'none';
this.doc.getElementById('lbPlay').style.display = 'none';
}
this.doc.getElementById('lbImageContainer').style.display = (this.isLyteframe ? 'none' : '');
this.doc.getElementById('lbIframeContainer').style.display = (this.isLyteframe ? '' : 'none');
try {
this.doc.getElementById('lbIframe').src = this.frameArray[this.activeFrame][0];
} catch(e) { }
} else {
this.showContentTimerArray[this.showContentTimerCount++] = setTimeout("myLytebox.showContent()", 200);
}
};
LyteBox.prototype.updateDetails = function() {
var object = this.doc.getElementById('lbCaption');
var sTitle = (this.isSlideshow ? this.slideArray[this.activeSlide][1] : (this.isLyteframe ? this.frameArray[this.activeFrame][1] : this.imageArray[this.activeImage][1]));
object.style.display = '';
object.innerHTML = (sTitle == null ? '' : sTitle);
this.updateNav();
this.doc.getElementById('lbDetailsContainer').style.display = '';
object = this.doc.getElementById('lbNumberDisplay');
if (this.isSlideshow && this.slideArray.length > 1) {
object.style.display = '';
object.innerHTML = "Image " + eval(this.activeSlide + 1) + " of " + this.slideArray.length;
this.doc.getElementById('lbNavDisplay').style.display = (this.navType == 2 && this.showNavigation ? '' : 'none');
} else if (this.imageArray.length > 1 && !this.isLyteframe) {
object.style.display = '';
object.innerHTML = "Image " + eval(this.activeImage + 1) + " of " + this.imageArray.length;
this.doc.getElementById('lbNavDisplay').style.display = (this.navType == 2 ? '' : 'none');
} else if (this.frameArray.length > 1 && this.isLyteframe) {
object.style.display = '';
object.innerHTML = "Page " + eval(this.activeFrame + 1) + " of " + this.frameArray.length;
this.doc.getElementById('lbNavDisplay').style.display = '';
} else {
this.doc.getElementById('lbNavDisplay').style.display = 'none';
}
this.appear('lbDetailsContainer', (this.doAnimations ? 0 : 100));
};
LyteBox.prototype.updateNav = function() {
if (this.isSlideshow) {
if (this.activeSlide != 0) {
var object = (this.navType == 2 ? this.doc.getElementById('lbPrev2') : this.doc.getElementById('lbPrev'));
object.style.display = '';
object.onclick = function() {
if (myLytebox.pauseOnPrevClick) { myLytebox.togglePlayPause("lbPause", "lbPlay"); }
myLytebox.changeContent(myLytebox.activeSlide - 1); return false;
}
} else {
if (this.navType == 2) { this.doc.getElementById('lbPrev2_Off').style.display = ''; }
}
if (this.activeSlide != (this.slideArray.length - 1)) {
var object = (this.navType == 2 ? this.doc.getElementById('lbNext2') : this.doc.getElementById('lbNext'));
object.style.display = '';
object.onclick = function() {
if (myLytebox.pauseOnNextClick) { myLytebox.togglePlayPause("lbPause", "lbPlay"); }
myLytebox.changeContent(myLytebox.activeSlide + 1); return false;
}
} else {
if (this.navType == 2) { this.doc.getElementById('lbNext2_Off').style.display = ''; }
}
} else if (this.isLyteframe) {
if(this.activeFrame != 0) {
var object = this.doc.getElementById('lbPrev2');
object.style.display = '';
object.onclick = function() {
myLytebox.changeContent(myLytebox.activeFrame - 1); return false;
}
} else {
this.doc.getElementById('lbPrev2_Off').style.display = '';
}
if(this.activeFrame != (this.frameArray.length - 1)) {
var object = this.doc.getElementById('lbNext2');
object.style.display = '';
object.onclick = function() {
myLytebox.changeContent(myLytebox.activeFrame + 1); return false;
}
} else {
this.doc.getElementById('lbNext2_Off').style.display = '';
}
} else {
if(this.activeImage != 0) {
var object = (this.navType == 2 ? this.doc.getElementById('lbPrev2') : this.doc.getElementById('lbPrev'));
object.style.display = '';
object.onclick = function() {
myLytebox.changeContent(myLytebox.activeImage - 1); return false;
}
} else {
if (this.navType == 2) { this.doc.getElementById('lbPrev2_Off').style.display = ''; }
}
if(this.activeImage != (this.imageArray.length - 1)) {
var object = (this.navType == 2 ? this.doc.getElementById('lbNext2') : this.doc.getElementById('lbNext'));
object.style.display = '';
object.onclick = function() {
myLytebox.changeContent(myLytebox.activeImage + 1); return false;
}
} else {
if (this.navType == 2) { this.doc.getElementById('lbNext2_Off').style.display = ''; }
}
}
this.enableKeyboardNav();
};
LyteBox.prototype.enableKeyboardNav = function() { document.onkeydown = this.keyboardAction; };
LyteBox.prototype.disableKeyboardNav = function() { document.onkeydown = ''; };
LyteBox.prototype.keyboardAction = function(e) {
var keycode = key = escape = null;
keycode = (e == null) ? event.keyCode : e.which;
key = String.fromCharCode(keycode).toLowerCase();
escape = (e == null) ? 27 : e.DOM_VK_ESCAPE;
if ((key == 'x') || (key == 'c') || (keycode == escape)) {
myLytebox.end();
} else if ((key == 'p') || (keycode == 37)) {
if (myLytebox.isSlideshow) {
if(myLytebox.activeSlide != 0) {
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeSlide - 1);
}
} else if (myLytebox.isLyteframe) {
if(myLytebox.activeFrame != 0) {
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeFrame - 1);
}
} else {
if(myLytebox.activeImage != 0) {
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeImage - 1);
}
}
} else if ((key == 'n') || (keycode == 39)) {
if (myLytebox.isSlideshow) {
if(myLytebox.activeSlide != (myLytebox.slideArray.length - 1)) {
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeSlide + 1);
}
} else if (myLytebox.isLyteframe) {
if(myLytebox.activeFrame != (myLytebox.frameArray.length - 1)) {
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeFrame + 1);
}
} else {
if(myLytebox.activeImage != (myLytebox.imageArray.length - 1)) {
myLytebox.disableKeyboardNav();
myLytebox.changeContent(myLytebox.activeImage + 1);
}
}
}
};
LyteBox.prototype.preloadNeighborImages = function() {
if (this.isSlideshow) {
if ((this.slideArray.length - 1) > this.activeSlide) {
preloadNextImage = new Image();
preloadNextImage.src = this.slideArray[this.activeSlide + 1][0];
}
if(this.activeSlide > 0) {
preloadPrevImage = new Image();
preloadPrevImage.src = this.slideArray[this.activeSlide - 1][0];
}
} else {
if ((this.imageArray.length - 1) > this.activeImage) {
preloadNextImage = new Image();
preloadNextImage.src = this.imageArray[this.activeImage + 1][0];
}
if(this.activeImage > 0) {
preloadPrevImage = new Image();
preloadPrevImage.src = this.imageArray[this.activeImage - 1][0];
}
}
};
LyteBox.prototype.togglePlayPause = function(hideID, showID) {
if (this.isSlideshow && hideID == "lbPause") {
for (var i = 0; i cur) ? img - cur : cur - img;
if (diff >= 0 && diff 100 && diff 200 && diff 300 && diff 400 && diff 500 && diff 600 && diff 700) { return 45; }
};
LyteBox.prototype.appear = function(id, opacity) {
var object = this.doc.getElementById(id).style;
object.opacity = (opacity / 100);
object.MozOpacity = (opacity / 100);
object.KhtmlOpacity = (opacity / 100);
object.filter = "alpha(opacity=" + (opacity + 10) + ")";
if (opacity == 100 && (id == 'lbImage' || id == 'lbIframe')) {
try { object.removeAttribute("filter"); } catch(e) {} /* Fix added for IE Alpha Opacity Filter bug. */
this.updateDetails();
} else if (opacity >= this.maxOpacity && id == 'lbOverlay') {
for (var i = 0; i = 100 && id == 'lbDetailsContainer') {
try { object.removeAttribute("filter"); } catch(e) {} /* Fix added for IE Alpha Opacity Filter bug. */
for (var i = 0; i = maxW) ? (maxW - newW) : pixelrate;
} else if (newW > maxW) {
newW -= (newW - pixelrate = maxH) ? (maxH - newH) : pixelrate;
} else if (newH > maxH) {
newH -= (newH - pixelrate this.doc.body.offsetHeight){
xScroll = this.doc.body.scrollWidth;
yScroll = this.doc.body.scrollHeight;
} else {
xScroll = this.doc.getElementsByTagName("html").item(0).offsetWidth;
yScroll = this.doc.getElementsByTagName("html").item(0).offsetHeight;
xScroll = (xScroll exitTime) { return; }
}
};
if (window.addEventListener) {
window.addEventListener("load",initLytebox,false);
} else if (window.attachEvent) {
window.attachEvent("onload",initLytebox);
} else {
window.onload = function() {initLytebox();}
}
function initLytebox() { myLytebox = new LyteBox(); }
.aboutText, .aboutText p{background:none;margin:0;padding:0;display:block;clear:both;float:none}
.spacer10 clearAll {background:transparent url(../images/bg-spacer-connect.gif) no-repeat 30px 0px; margin:-3px 0;height:10px; overflow:hidden}
#lbOuterContainer {padding-bottom:45px;}
Just tell us “What’s your love story: What made you fall in love with your girlfriend or boyfriend?”
Also upload your “love story” photos and answer the
maximum number of questions which appear here till
29th February ’08.
The cutest entries will win
2 HP laptops &
4 Nokia Mobiles.
Answer more questions
Upload your photos here
*Terms and Conditions "