function wwfEarthHourLightsOff_GetPageHeight(){
	
	var yScroll;
	if (window.innerHeight && window.scrollMaxY) {	
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		yScroll = document.body.offsetHeight;
	}
	
	var windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowHeight = document.body.clientHeight;
	}	
	
	return Math.max(windowHeight, yScroll);
}

function wwfEarthHourLightsOff_DoFSCommand(command, args) {
	var setStyle = function(elem, style) {
		for (prop in style) elem.style[prop] = style[prop];
	}
	if (command == 'lightbox') {
		var overlay = document.createElement("div");
		document.body.appendChild(overlay);
		setStyle(overlay, {
			position: 'absolute', top: 0, left: 0, zIndex: 900, width: '100%',
			height: wwfEarthHourLightsOff_GetPageHeight() + 'px',
			backgroundColor: '#000000',	opacity: '0.8', filter: ' alpha(opacity=80)'
		});
		
		var lightboxPosition = document.createElement("div");
		document.body.appendChild(lightboxPosition);
		setStyle(lightboxPosition, {
			position: 'absolute', top: '88px', zIndex: 910, width: '100%'
		});
		lightboxPosition.align = 'center';
		
		var lightbox = document.createElement("div");
		lightboxPosition.appendChild(lightbox);
		setStyle(lightbox, {
			width: '590px', height: '520px', margin: 'auto',
			backgroundColor: '#000000', position: 'relative'
		})
		lightbox.onclick = function(e) {
			if (!e) var e = window.event;
			e.cancelBubble = true;
			if (e.stopPropagation) e.stopPropagation();
		}
		
		var closeButton = document.createElement('img');
		closeButton.src = 'http://cdn.burakdonertas.com/internetinikarartma/kapat.png';
		closeButton.width = 30;
		closeButton.height = 30;
		setStyle(closeButton, {
			position: 'absolute', top: '-12px', right: '-12px', cursor: 'pointer'
		});
		lightbox.appendChild(closeButton);
		closeButton.onclick = function() {
			document.body.removeChild(overlay);
			document.body.removeChild(lightboxPosition);
		}

		var iframe = document.createElement('iframe');
		iframe.src = 'http://cdn.burakdonertas.com/internetinikarartma/karartma.htm';
		iframe.width = 590;
		iframe.height = 520;
		iframe.style.border = '0px';
		iframe.border = 0;
		iframe.frameBorder = 0;

		lightbox.appendChild(iframe);

		overlay.onclick = function() {
			document.body.removeChild(overlay);
			document.body.removeChild(lightboxPosition);
		}

		lightboxPosition.onclick = function() {
			document.body.removeChild(overlay);
			document.body.removeChild(lightboxPosition);
		}
	}
};
document.write('<div style="position: absolute; top: 0px; right: 0px; z-index:899; padding:0; margin:0; border: none;"><a href="#" onclick="javascript:void(wwfEarthHourLightsOff_DoFSCommand(\'lightbox\'));"><img src="http://cdn.burakdonertas.com/internetinikarartma/karartmabuton.png"></a></div>');

