// -----------------------------------------------------------------------------------
//
//	Lightbox v2.03.3
//	by Lokesh Dhakar - http://www.huddletogether.com
//	5/21/06
//
//	For more information on this script, visit:
//	http://huddletogether.com/projects/lightbox2/
//
//	Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/
//	
//	Credit also due to those who have helped, inspired, and made their code available to the public.
//	Including: Scott Upton(uptonic.com), Peter-Paul Koch(quirksmode.com), Thomas Fuchs(mir.aculo.us), and others.
//
//
// -----------------------------------------------------------------------------------
/*

	Table of Contents
	-----------------
	Configuration
	Global Variables

	Extending Built-in Objects	
	- Object.extend(Element)
	- Array.prototype.removeDuplicates()
	- Array.prototype.empty()

	Lightbox Class Declaration
	- initialize()
	- updateImageList()
	- start()
	- changeImage()
	- resizeImageContainer()
	- showImage()
	- updateDetails()
	- updateNav()
	- enableKeyboardNav()
	- disableKeyboardNav()
	- keyboardAction()
	- preloadNeighborImages()
	- end()
	
	Miscellaneous Functions
	- getPageScroll()
	- getPageSize()
	- getKey()
	- listenKey()
	- showSelectBoxes()
	- hideSelectBoxes()
	- showFlash()
	- hideFlash()
	- pause()
	- initLightbox()
	
	Function Calls
	- addLoadEvent(initLightbox)
	
*/
// -----------------------------------------------------------------------------------

//
//	Configuration
//
var fileLoadingImage = "images/loading.gif";		
var fileBottomNavCloseImage = "images/closelabel.gif";

var overlayOpacity = 0.8;	// controls transparency of shadow overlay

var animate = true;			// toggles resizing animations
var resizeSpeed = 7;		// controls the speed of the image resizing animations (1=slowest and 10=fastest)

var borderSize = 10;		//if you adjust the padding in the CSS, you will need to update this variable

// -----------------------------------------------------------------------------------

//
//	Global Variables
//
var imageArray = new Array;
var activeImage;

if(animate == true){
	overlayDuration = 0.2;	// shadow fade in/out duration
	if(resizeSpeed > 10){ resizeSpeed = 10;}
	if(resizeSpeed < 1){ resizeSpeed = 1;}
	resizeDuration = (11 - resizeSpeed) * 0.15;
} else { 
	overlayDuration = 0;
	resizeDuration = 0;
}

// -----------------------------------------------------------------------------------

//
//	Additional methods for Element added by SU, Couloir
//	- further additions by Lokesh Dhakar (huddletogether.com)
//
Object.extend(Element, {
	getWidth: function(element) {
	   	element = $(element);
	   	return element.offsetWidth; 
	},
	setWidth: function(element,w) {
	   	element = $(element);
    	element.style.width = w +"px";
	},
	setHeight: function(element,h) {
   		element = $(element);
    	element.style.height = h +"px";
	},
	setTop: function(element,t) {
	   	element = $(element);
    	element.style.top = t +"px";
	},
	setLeft: function(element,l) {
	   	element = $(element);
    	element.style.left = l +"px";
	},
	setSrc: function(element,src) {
    	element = $(element);
    	element.src = src; 
	},
	setHref: function(element,href) {
    	element = $(element);
    	element.href = href; 
	},
	setInnerHTML: function(element,content) {
		element = $(element);
		element.innerHTML = content;
	}
});

// -----------------------------------------------------------------------------------

//
//	Extending built-in Array object
//	- array.removeDuplicates()
//	- array.empty()
//
Array.prototype.removeDuplicates = function () {
    for(i = 0; i < this.length; i++){
        for(j = this.length-1; j>i; j--){        
            if(this[i][0] == this[j][0]){
                this.splice(j,1);
            }
        }
    }
}

// -----------------------------------------------------------------------------------

Array.prototype.empty = function () {
	for(i = 0; i <= this.length; i++){
		this.shift();
	}
}

// -----------------------------------------------------------------------------------

//
//	Lightbox Class Declaration
//	- initialize()
//	- start()
//	- changeImage()
//	- resizeImageContainer()
//	- showImage()
//	- updateDetails()
//	- updateNav()
//	- enableKeyboardNav()
//	- disableKeyboardNav()
//	- keyboardNavAction()
//	- preloadNeighborImages()
//	- end()
//
//	Structuring of code inspired by Scott Upton (http://www.uptonic.com/)
//
var Lightbox = Class.create();

Lightbox.prototype = {
	
	// initialize()
	// Constructor runs on completion of the DOM loading. Calls updateImageList and then
	// the function inserts html at the bottom of the page which is used to display the shadow 
	// overlay and the image container.
	//
	initialize: function() {	
		
		this.updateImageList();

		// Code inserts html at the bottom of the page that looks similar to this:
		//
		//	<div id="overlay"></div>
		//	<div id="lightbox">
		//		<div id="outerImageContainer">
		//			<div id="imageContainer">
		//				<img id="lightboxImage">
		//				<div style="" id="hoverNav">
		//					<a href="#" id="prevLink"></a>
		//					<a href="#" id="nextLink"></a>
		//				</div>
		//				<div id="loading">
		//					<a href="#" id="loadingLink">
		//						<img src="images/loading.gif">
		//					</a>
		//				</div>
		//			</div>
		//		</div>
		//		<div id="imageDataContainer">
		//			<div id="imageData">
		//				<div id="imageDetails">
		//					<span id="caption"></span>
		//					<span id="numberDisplay"></span>
		//				</div>
		//				<div id="bottomNav">
		//					<a href="#" id="bottomNavClose">
		//						<img src="images/close.gif">
		//					</a>
		//				</div>
		//			</div>
		//		</div>
		//	</div>


		var objBody = document.getElementsByTagName("body").item(0);
		
		var objOverlay = document.createElement("div");
		objOverlay.setAttribute('id','overlay');
		objOverlay.style.display = 'none';
		objOverlay.onclick = function() { myLightbox.end(); }
		objBody.appendChild(objOverlay);
		
		var objLightbox = document.createElement("div");
		objLightbox.setAttribute('id','lightbox');
		objLightbox.style.display = 'none';
		objLightbox.onclick = function(e) {	// close Lightbox is user clicks shadow overlay
			if (!e) var e = window.event;
			var clickObj = Event.element(e).id;
			if ( clickObj == 'lightbox') {
				myLightbox.end();
			}
		};
		objBody.appendChild(objLightbox);
			
		var objOuterImageContainer = document.createElement("div");
		objOuterImageContainer.setAttribute('id','outerImageContainer');
		objLightbox.appendChild(objOuterImageContainer);

		// When Lightbox starts it will resize itself from 250 by 250 to the current image dimension.
		// If animations are turned off, it will be hidden as to prevent a flicker of a
		// white 250 by 250 box.
		if(animate){
			Element.setWidth('outerImageContainer', 250);
			Element.setHeight('outerImageContainer', 250);			
		} else {
			Element.setWidth('outerImageContainer', 1);
			Element.setHeight('outerImageContainer', 1);			
		}

		var objImageContainer = document.createElement("div");
		objImageContainer.setAttribute('id','imageContainer');
		objOuterImageContainer.appendChild(objImageContainer);
	
		var objLightboxImage = document.createElement("img");
		objLightboxImage.setAttribute('id','lightboxImage');
		objImageContainer.appendChild(objLightboxImage);
	
		var objHoverNav = document.createElement("div");
		objHoverNav.setAttribute('id','hoverNav');
		objImageContainer.appendChild(objHoverNav);
	
		var objPrevLink = document.createElement("a");
		objPrevLink.setAttribute('id','prevLink');
		objPrevLink.setAttribute('href','#');
		objHoverNav.appendChild(objPrevLink);
		
		var objNextLink = document.createElement("a");
		objNextLink.setAttribute('id','nextLink');
		objNextLink.setAttribute('href','#');
		objHoverNav.appendChild(objNextLink);
	
		var objLoading = document.createElement("div");
		objLoading.setAttribute('id','loading');
		objImageContainer.appendChild(objLoading);
	
		var objLoadingLink = document.createElement("a");
		objLoadingLink.setAttribute('id','loadingLink');
		objLoadingLink.setAttribute('href','#');
		objLoadingLink.onclick = function() { myLightbox.end();  ~dulla^@204~ ~dulla^@204~ g.appendChild(objLoadingLink);
	
		va~dulla^@204~ mage = document.createElement("img");~dulla^@204~ Image.setAttribute('src', fileLoading~dulla^@204~ LoadingLink.appendChild(objLoadingIma~dulla^@204~ bjImageDataContainer = document.creat~dulla^@204~ ");
		objImageDataContainer.setAttrib~dulla^@204~ geDataContainer');
		objLightbox.appe~dulla^@204~ ageDataContainer);

		var objImageDat~dulla^@204~ createElement("div");
		objImageData.~dulla^@204~ 'id','imageData');
		objImageDataCont~dulla^@204~ hild(objImageData);
	
		var objImageD~dulla^@204~ ment.createElement("div");
		objImage~dulla^@204~ tribute('id','imageDetails');
		objIm~dulla^@204~ dChild(objImageDetails);
	
		var objC~dulla^@204~ ment.createElement("span");
		objCapt~dulla^@204~ ute('id','caption');
		objImageDetail~dulla^@204~ (objCaption);
	
		var objNumberDispla~dulla^@204~ createElement("span");
		objNumberDis~dulla^@204~ bute('id','numberDisplay');
		objImag~dulla^@204~ ndChild(objNumberDisplay);
		
		var o~dulla^@204~  document.createElement("div");
		obj~dulla^@204~ Attribute('id','bottomNav');
		objIma~dulla^@204~ Child(objBottomNav);
	
		var objBotto~dulla^@204~  = document.createElement("a");
		obj~dulla^@204~ eLink.setAttribute('id','bottomNavClo~dulla^@204~ ttomNavCloseLink.setAttribute('href',~dulla^@204~ ttomNavCloseLink.onclick = function()~dulla^@204~ .end(); return false; }
		objBottomNa~dulla^@204~ (objBottomNavCloseLink);
	
		var objB~dulla^@204~ Image = document.createElement("img")~dulla^@204~ NavCloseImage.setAttribute('src', fil~dulla^@204~ seImage);
		objBottomNavCloseLink.app~dulla^@204~ ottomNavCloseImage);
	},


	//
	// up~dulla^@204~ ()
	// Loops through anchor tags look~dulla^@204~ tbox' references and applies onclick
~dulla^@204~  appropriate links. You can rerun aft~dulla^@204~ y adding images w/ajax.
	//
	updateIm~dulla^@204~ tion() {	
		if (!document.getElements~dulla^@204~ eturn; }
		var anchors = document.get~dulla^@204~ Name('a');
		var areas = document.get~dulla^@204~ Name('area');

		// loop through all ~dulla^@204~ 	for (var i=0; i<anchors.length; i++)~dulla^@204~ or = anchors[i];
			
			var relAttrib~dulla^@204~ anchor.getAttribute('rel'));
			
			/~dulla^@204~ ing.match() method to catch 'lightbox~dulla^@204~ in the rel attribute
			if (anchor.ge~dulla^@204~ ref') && (relAttribute.toLowerCase().~dulla^@204~ ox'))){
				anchor.onclick = function~dulla^@204~ ox.start(this); return false;}
			}
	~dulla^@204~  through all area tags
		// todo: com~dulla^@204~  area tag loops
		for (var i=0; i< ar~dulla^@204~ ++){
			var area = areas[i];
			
			v~dulla^@204~ te = String(area.getAttribute('rel'))~dulla^@204~ se the string.match() method to catch~dulla^@204~ eferences in the rel attribute
			if ~dulla^@204~ ibute('href') && (relAttribute.toLowe~dulla^@204~ ('lightbox'))){
				area.onclick = fu~dulla^@204~ Lightbox.start(this); return false;}
~dulla^@204~ 	
	
	//
	//	start()
	//	Display overl~dulla^@204~ ox. If image is part of a set, add si~dulla^@204~ geArray.
	//
	start: function(imageLi~dulla^@204~ eSelectBoxes();
		hideFlash();

		// ~dulla^@204~ ay to fill page and fade in
		var arr~dulla^@204~ getPageSize();
		Element.setWidth('ov~dulla^@204~ PageSize[0]);
		Element.setHeight('ov~dulla^@204~ PageSize[1]);

		new Effect.Appear('o~dulla^@204~ ration: overlayDuration, from: 0.0, t~dulla^@204~ city });

		imageArray = [];
		imageN~dulla^@204~ if (!document.getElementsByTagName){ ~dulla^@204~ ar anchors = document.getElementsByTa~dulla^@204~ ink.tagName);

		// if image is NOT p~dulla^@204~ .
		if((imageLink.getAttribute('rel')~dulla^@204~ ')){
			// add single image to imageA~dulla^@204~ Array.push(new Array(imageLink.getAtt~dulla^@204~ ), imageLink.getAttribute('title')));~dulla^@204~ {
		// if image is part of a set..

	~dulla^@204~ ough anchors, find other images in se~dulla^@204~ em to imageArray
			for (var i=0; i<a~dulla^@204~ ; i++){
				var anchor = anchors[i];
~dulla^@204~ r.getAttribute('href') && (anchor.get~dulla^@204~ l') == imageLink.getAttribute('rel'))~dulla^@204~ Array.push(new Array(anchor.getAttrib~dulla^@204~ anchor.getAttribute('title')));
				}~dulla^@204~ eArray.removeDuplicates();
			while(i~dulla^@204~ geNum][0] != imageLink.getAttribute('~dulla^@204~ geNum++;}
		}

		// calculate top and~dulla^@204~ for the lightbox 
		var arrayPageScro~dulla^@204~ croll();
		var lightboxTop = arrayPag~dulla^@204~ (arrayPageSize[3] / 10);
		var lightb~dulla^@204~ yPageScroll[0];
		Element.setTop('lig~dulla^@204~ boxTop);
		Element.setLeft('lightbox'~dulla^@204~ t);
		
		Element.show('lightbox');
		~dulla^@204~ eImage(imageNum);
	},

	//
	//	change~dulla^@204~ ide most elements and preload image i~dulla^@204~  for resizing image container.
	//
	c~dulla^@204~ unction(imageNum) {	
		
		activeImage~dulla^@204~ // update global var

		// hide eleme~dulla^@204~ ansition
		if(animate){ Element.show(~dulla^@204~ 		Element.hide('lightboxImage');
		El~dulla^@204~ overNav');
		Element.hide('prevLink')~dulla^@204~ ide('nextLink');
		Element.hide('imag~dulla^@204~ r');
		Element.hide('numberDisplay');~dulla^@204~ eloader = new Image();
		
		// once i~dulla^@204~ aded, resize image container
		imgPre~dulla^@204~ =function(){
			Element.setSrc('light~dulla^@204~ ageArray[activeImage][0]);
			myLight~dulla^@204~ geContainer(imgPreloader.width, imgPr~dulla^@204~ t);
			
			imgPreloader.onload=functi~dulla^@204~ ear onLoad, IE behaves irratically wi~dulla^@204~ ifs otherwise 
		}
		imgPreloader.src~dulla^@204~ [activeImage][0];
	},

	//
	//	resize~dulla^@204~ r()
	//
	resizeImageContainer: functi~dulla^@204~  imgHeight) {

		// get curren width ~dulla^@204~ this.widthCurrent = Element.getWidth(~dulla^@204~ ntainer');
		this.heightCurrent = Ele~dulla^@204~ t('outerImageContainer');

		// get n~dulla^@204~ height
		var widthNew = (imgWidth  + ~dulla^@204~  2));
		var heightNew = (imgHeight  +~dulla^@204~ * 2));

		// scalars based on change ~dulla^@204~ ew
		this.xScale = ( widthNew / this.~dulla^@204~  * 100;
		this.yScale = ( heightNew /~dulla^@204~ urrent) * 100;

		// calculate size d~dulla^@204~ ween new and old image, and resize if~dulla^@204~ wDiff = this.widthCurrent - widthNew;~dulla^@204~ is.heightCurrent - heightNew;

		if(!~dulla^@204~ ){ new Effect.Scale('outerImageContai~dulla^@204~ cale, {scaleX: false, duration: resiz~dulla^@204~ eue: 'front'}); }
		if(!( wDiff == 0)~dulla^@204~ .Scale('outerImageContainer', this.xS~dulla^@204~ : false, delay: resizeDuration, durat~dulla^@204~ ration}); }

		// if new and old imag~dulla^@204~ ze and no scaling transition is neces~dulla^@204~ o a quick pause to prevent image flic~dulla^@204~ iff == 0) && (wDiff == 0)){
			if (na~dulla^@204~ rsion.indexOf("MSIE")!=-1){ pause(250~dulla^@204~ ause(100);} 
		}

		Element.setHeight~dulla^@204~ imgHeight);
		Element.setHeight('next~dulla^@204~ ght);
		Element.setWidth( 'imageDataC~dulla^@204~ dthNew);

		this.showImage();
	},
	
	~dulla^@204~ age()
	//	Display image and begin pre~dulla^@204~ bors.
	//
	showImage: function(){
		E~dulla^@204~ loading');
		new Effect.Appear('light~dulla^@204~ duration: resizeDuration, queue: 'end~dulla^@204~ h: function(){	myLightbox.updateDetai~dulla^@204~ 	this.preloadNeighborImages();
	},

	~dulla^@204~ Details()
	//	Display caption, image ~dulla^@204~ ottom nav.
	//
	updateDetails: functi~dulla^@204~  if caption is not null
		if(imageArr~dulla^@204~ e][1]){
			Element.show('caption');
	~dulla^@204~ InnerHTML( 'caption', imageArray[acti~dulla^@204~ 
		}
		
		// if image is part of set ~dulla^@204~ e x of x' 
		if(imageArray.length > 1~dulla^@204~ .show('numberDisplay');
			Element.se~dulla^@204~ numberDisplay', "Image " + eval(activ~dulla^@204~  " of " + imageArray.length);
		}

		~dulla^@204~ rallel(
			[ new Effect.SlideDown( 'i~dulla^@204~ iner', { sync: true, duration: resize~dulla^@204~ m: 0.0, to: 1.0 }), 
			  new Effect.~dulla^@204~ DataContainer', { sync: true, duratio~dulla^@204~ tion }) ], 
			{ duration: resizeDura~dulla^@204~ nish: function() {
				// update over~dulla^@204~ update nav
				var arrayPageSize = ge~dulla^@204~ 				Element.setHeight('overlay', arrayPageSize[1]);
				myLightbox.updateNav();~dulla^@204~ 		);
	},

	//
	//	updateNav()
	//	Dis~dulla^@204~ ate previous and next hover navigatio~dulla^@204~ eNav: function() {

		Element.show('h~dulla^@204~ 	

		// if not first image in set, di~dulla^@204~ age button
		if(activeImage != 0){
		~dulla^@204~ ('prevLink');
			document.getElementB~dulla^@204~ ').onclick = function() {
				myLight~dulla^@204~ ge(activeImage - 1); return false;
		~dulla^@204~ if not last image in set, display nex~dulla^@204~ n
		if(activeImage != (imageArray.len~dulla^@204~ 	Element.show('nextLink');
			documen~dulla^@204~ yId('nextLink').onclick = function() ~dulla^@204~ box.changeImage(activeImage + 1); ret~dulla^@204~ 	}
		}
		
		this.enableKeyboardNav();~dulla^@204~ 	enableKeyboardNav()
	//
	enableKeybo~dulla^@204~ ion() {
		document.onkeydown = this.k~dulla^@204~ ; 
	},

	//
	//	disableKeyboardNav()
~dulla^@204~ eyboardNav: function() {
		document.o~dulla^@204~ ;
	},

	//
	//	keyboardAction()
	//
	~dulla^@204~ n: function(e) {
		if (e == null) { /~dulla^@204~ de = event.keyCode;
			escapeKey = 27~dulla^@204~ // mozilla
			keycode = e.keyCode;
		~dulla^@204~ e.DOM_VK_ESCAPE;
		}

		key = String.~dulla^@204~ keycode).toLowerCase();
		
		if((key ~dulla^@204~ ey == 'o') || (key == 'c') || (keycod~dulla^@204~ y)){	// close lightbox
			myLightbox.~dulla^@204~ se if((key == 'p') || (keycode == 37)~dulla^@204~  previous image
			if(activeImage != ~dulla^@204~ htbox.disableKeyboardNav();
				myLig~dulla^@204~ mage(activeImage - 1);
			}
		} else ~dulla^@204~ ') || (keycode == 39)){	// display ne~dulla^@204~ f(activeImage != (imageArray.length -~dulla^@204~ ightbox.disableKeyboardNav();
				myL~dulla^@204~ eImage(activeImage + 1);
			}
		}

	}~dulla^@204~ eloadNeighborImages()
	//	Preload pre~dulla^@204~ t images.
	//
	preloadNeighborImages:~dulla^@204~ 
		if((imageArray.length - 1) > activ~dulla^@204~ reloadNextImage = new Image();
			pre~dulla^@204~ .src = imageArray[activeImage + 1][0]~dulla^@204~ tiveImage > 0){
			preloadPrevImage =~dulla^@204~ 
			preloadPrevImage.src = imageArray~dulla^@204~ - 1][0];
		}
	
	},

	//
	//	end()
	//~dulla^@204~ on() {
		this.disableKeyboardNav();
	~dulla^@204~ ('lightbox');
		new Effect.Fade('over~dulla^@204~ ion: overlayDuration});
		showSelectB~dulla^@204~ wFlash();
	}
}

// ------------------~dulla^@204~ -------------------------------------~dulla^@204~ --

//
// getPageScroll()
// Returns ~dulla^@204~ y page scroll values.
// Core code fr~dulla^@204~ de.com
//
function getPageScroll(){

~dulla^@204~  yScroll;

	if (self.pageYOffset) {
	~dulla^@204~ lf.pageYOffset;
		xScroll = self.page~dulla^@204~ lse if (document.documentElement && d~dulla^@204~ entElement.scrollTop){	 // Explorer 6~dulla^@204~ roll = document.documentElement.scrol~dulla^@204~ ll = document.documentElement.scrollL~dulla^@204~ if (document.body) {// all other Expl~dulla^@204~ ll = document.body.scrollTop;
		xScro~dulla^@204~ .body.scrollLeft;	
	}

	arrayPageScro~dulla^@204~ y(xScroll,yScroll) 
	return arrayPage~dulla^@204~  ------------------------------------~dulla^@204~ ----------------------------------

/~dulla^@204~ ize()
// Returns array with page widt~dulla^@204~  window width, height
// Core code fr~dulla^@204~ de.com
// Edit for Firefox by pHaez
/~dulla^@204~ tPageSize(){
	
	var xScroll, yScroll;~dulla^@204~ w.innerHeight && window.scrollMaxY) {~dulla^@204~  window.innerWidth + window.scrollMax~dulla^@204~ = window.innerHeight + window.scrollM~dulla^@204~ if (document.body.scrollHeight > docu~dulla^@204~ setHeight){ // all but Explorer Mac
	~dulla^@204~ cument.body.scrollWidth;
		yScroll = ~dulla^@204~ .scrollHeight;
	} else { // Explorer ~dulla^@204~ lso work in Explorer 6 Strict, Mozill~dulla^@204~ 		xScroll = document.body.offsetWidth~dulla^@204~  document.body.offsetHeight;
	}
	
	va~dulla^@204~ , windowHeight;
	
//	console.log(self~dulla^@204~ 
//	console.log(document.documentElem~dulla^@204~ th);

	if (self.innerHeight) {	// all~dulla^@204~ rer
		if(document.documentElement.cli~dulla^@204~ 	windowWidth = document.documentEleme~dulla^@204~ h; 
		} else {
			windowWidth = self.~dulla^@204~ 	}
		windowHeight = self.innerHeight;~dulla^@204~ document.documentElement && document.~dulla^@204~ nt.clientHeight) { // Explorer 6 Stri~dulla^@204~ dowWidth = document.documentElement.c~dulla^@204~ 	windowHeight = document.documentElem~dulla^@204~ ght;
	} else if (document.body) { // ~dulla^@204~ rs
		windowWidth = document.body.clie~dulla^@204~ ndowHeight = document.body.clientHeig~dulla^@204~  for small pages with total height le~dulla^@204~ t of the viewport
	if(yScroll < windo~dulla^@204~ ageHeight = windowHeight;
	} else { 
~dulla^@204~ = yScroll;
	}

//	console.log("xScrol~dulla^@204~ )
//	console.log("windowWidth " + win~dulla^@204~ / for small pages with total width le~dulla^@204~  of the viewport
	if(xScroll < window~dulla^@204~ geWidth = xScroll;		
	} else {
		page~dulla^@204~ wWidth;
	}
//	console.log("pageWidth ~dulla^@204~ )

	arrayPageSize = new Array(pageWid~dulla^@204~ ,windowWidth,windowHeight) 
	return a~dulla^@204~ 
}

// ------------------------------~dulla^@204~ -------------------------------------~dulla^@204~ tKey(key)
// Gets keycode. If 'x' is ~dulla^@204~ it hides the lightbox.
//
function ge~dulla^@204~ (e == null) { // ie
		keycode = event~dulla^@204~ else { // mozilla
		keycode = e.which~dulla^@204~ tring.fromCharCode(keycode).toLowerCa~dulla^@204~ ey == 'x'){
	}
}

// ----------------~dulla^@204~ -------------------------------------~dulla^@204~ ----

//
// listenKey()
//
function l~dulla^@204~ 	document.onkeypress = getKey; }
	
//~dulla^@204~ -------------------------------------~dulla^@204~ showSelectBoxes(){
	var selects = doc~dulla^@204~ entsByTagName("select");
	for (i = 0;~dulla^@204~ .length; i++) {
		selects[i].style.vi~dulla^@204~ isible";
	}
}

// -------------------~dulla^@204~ -------------------

function hideSel~dulla^@204~ var selects = document.getElementsByT~dulla^@204~ t");
	for (i = 0; i != selects.length~dulla^@204~ lects[i].style.visibility = "hidden";~dulla^@204~ -------------------------------------~dulla^@204~ function showFlash(){
	var flashObjec~dulla^@204~ .getElementsByTagName("object");
	for~dulla^@204~ flashObjects.length; i++) {
		flashOb~dulla^@204~ e.visibility = "visible";
	}

	var fl~dulla^@204~ ocument.getElementsByTagName("embed")~dulla^@204~ ; i < flashEmbeds.length; i++) {
		fl~dulla^@204~ style.visibility = "visible";
	}
}

/~dulla^@204~ -------------------------------------~dulla^@204~  hideFlash(){
	var flashObjects = doc~dulla^@204~ entsByTagName("object");
	for (i = 0;~dulla^@204~ ects.length; i++) {
		flashObjects[i]~dulla^@204~ lity = "hidden";
	}

	var flashEmbeds~dulla^@204~ etElementsByTagName("embed");
	for (i~dulla^@204~ shEmbeds.length; i++) {
		flashEmbeds~dulla^@204~ ibility = "hidden";
	}

}


// ------~dulla^@204~ --------------------------------

//
~dulla^@204~ erMillis)
// Pauses code execution fo~dulla^@204~ ime. Uses busy code, not good.
// Hel~dulla^@204~ r-On [ran2103@gmail.com]
//

function~dulla^@204~ var date = new Date();
	curDate = nul~dulla^@204~ rDate = new Date();}
	while( curDate ~dulla^@204~ 
}
/*
function pause(numberMillis) {
~dulla^@204~  = new Date().getTime() + sender;
	wh~dulla^@204~ ().getTime();	
}
*/
// --------------~dulla^@204~ ------------------------



function ~dulla^@204~ ) { myLightbox = new Lightbox(); }
Event.observe(window, 'load', initLightbox, false);
