var site = "http://localhost/website_web/";
var ImgScale = "large";
var expandSwitch = 'off';

if(window.innerHeight <= 600) {
	ImgScale = "medium";
}
if(document.documentElement.clientHeight <= 600) {
	ImgScale = "medium";
}

y = 0;
function setVisible(obj, destination) {
	if(expandSwitch == 'on') {
		if(BrowserDetect.browser != "Explorer") {
			if(window.innerHeight) {
				document.getElementById('expand').style.height = window.innerHeight + 'px';
			}else{
				document.getElementById('expand').style.height = document.documentElement.clientHeight + 'px';
			}
			destination = site + 'Images/gallery/' + ImgScale + '/' + destination;
			document.getElementById('expand_img').src = destination;
			obj = document.getElementById(obj);
			obj.style.display = (obj.style.display == 'inline') ? 'none' : 'inline';
		}else{
			window.location = site + "Images/gallery/" + ImgScale + "/" + destination;
		}
	}else{
		window.location = site + "Images/gallery/" + ImgScale + "/" + destination;
	}
}
function placeIt() {
	if (document.documentElement) {
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body) {
		theTop = document.body.scrollTop;
	}
	theTop += y;
	document.getElementById('expand').style.top = theTop + 'px' ;
	setTimeout("placeIt()",10);
}

if(BrowserDetect.browser != "Explorer" || BrowserDetect.version != "6") {
	window.onscroll = setTimeout("placeIt()",10);
}

function AdjustSize() {
	if(window.innerHeight) {
		document.getElementById('expand').style.height = window.innerHeight + 'px';
	}else{
		document.getElementById('expand').style.height = document.documentElement.clientHeight + 'px';
	}
}