function showIcons(cat)
{
	$('#f_'+cat).click();
}



function showFrame()
{
	$('#portfolioframe').animate({style: 'opacity: 0'},50);
	$('#portfolioframe').css("display","block");
}

function hideFrame()
{
	$('#portfolioframe').css("display","none");
}

function resetMe(){
	$(obj).animate({style: 'width: 0px'},500);
}


function resizeMe(obj){
	var iframeWidth = portfolioframe.document.getElementById("content").offsetWidth;
	var urll = frames['portfolioframe'].location.href;
	if (urll != "http://front.nl/blanco.php" && urll.substring(0,31) != "http://front.nl/?category_name=" ) {
	$(obj).animate({style: 'width: 0px;'},50);
	$(obj).animate({style: 'width: ' + iframeWidth + 'px;opacity: 1;'},500);
    }
	if (urll == "http://front.nl/?cat=0" ) {
	$(obj).animate({style: 'width: 100px;'},50);
	$(obj).animate({style: 'width: ' + iframeWidth + 'px;opacity: 1;'},500);
    }
}

var x;


function resizeTitlebar(){
	document.getElementById('titlebar').style.width = document.getElementById("content").offsetWidth + 12 + 'px'
}

function startmeup() { 
	var imgWidth = getWindowWidth() + 'px';
	var imgHeight = getWindowHeight() + 'px';

	$('#background_image').css("width",imgWidth);
	$('#background_image').css("height",imgHeight);
}

function resizeWindow() { 
	$('#background_image').css("width","50%");
	$('#background_image').css("height","50%");
	//startmeup();
}



function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	}
	else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		}
		else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}
function getWindowWidth() {
	var windowWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		windowWidth = window.innerWidth;
	}
	else {
		if (document.documentElement && document.documentElement.clientWidth) {
			windowWidth = document.documentElement.clientWidth;
		}
		else {
			if (document.body && document.body.clientWidth) {
				windowWidth = document.body.clientWidth;
			}
		}
	}
	return windowWidth;
}
function setContent() {
	if (document.getElementById) {
		var windowHeight = getWindowHeight();
		if (windowHeight > 0) {
			var contentElement = document.getElementById('lightbox');
			var contentHeight = contentElement.offsetHeight;
			if (windowHeight - contentHeight > 0) {
				contentElement.style.position = 'absolute';
				contentElement.style.top = ((windowHeight / 2) - (contentHeight / 2)) + 'px';
			}
			else {
				contentElement.style.position = 'static';
			}
		}
	}
}
function setContentWidth() {
	if (document.getElementById) {
		var windowWidth = getWindowWidth();
		var windowHeight = getWindowHeight();
		if (windowWidth > 0) {
			var contentElement = document.getElementById('lightbox');
			}
		if (windowWidth > 0) {
			var contentElement = document.getElementById('images');
				contentElement.style.position = 'absolute';
				contentElement.style.height = (windowHeight - 90) + 'px';
			}
	}
}		

