function popUp(content, x, y, width, height) {
	if (document.getElementById('inner_photo'))
		popDown();
	frameDiv = document.createElement('div');
	frameDiv.setAttribute('id', 'show_photo');
	frameDiv.style.left = (x-5) + 'px';
	frameDiv.style.top = (y-5) + 'px';
	frameDiv.style.offsetWidth = (w+10) + 'px';
	frameDiv.style.offsetHeight = (h+10) + 'px';
	document.body.appendChild(frameDiv);

	thisDiv = createPopup('inner_photo', x, y, w, h);


// Save this until we have a nice frame

//	thisDiv.appendChild(content);

//	document.body.appendChild(thisDiv);
}

function createPopup(id, x, y, w, h) {
	thisDiv = document.createElement('div');
	thisDiv.setAttribute('id', id);
	thisDiv.style.left = x + 'px';
	thisDiv.style.top = y + 'px';
	thisDiv.style.offsetWidth = w + 'px';
	thisDiv.style.offsetHeight = h + 'px';
	return thisDiv;
}

function popDown() {
	if (div = document.getElementById('inner_photo'))
		document.body.removeChild(document.getElementById('inner_photo'));
//	if (div = document.getElementById('show_photo'))
		document.body.removeChild(document.getElementById('show_photo'));
}


function imageClick(cat, index) {
    /*
	item=categories[cat][index];
	w=item.lwidth;
	h=item.lheight;
	sw=document.body.clientWidth-10;
	sh=document.body.clientHeight-10;
	if (w > sw) {
		h = h*(sw/w);
		w=sw;
	}
	if (h > sh) {
		w=w*(sh/h);
		h=sh;
	}
	imx=(document.body.clientWidth-w)/2;
	imy=(document.body.clientHeight-h)/3;	
	image = document.createElement('img');
	image.setAttribute('src', item.link);
	image.setAttribute('width', w+'px');
	image.setAttribute('height', h+'px');
	image.setAttribute('onclick', 'popDown()');
	popUp(image,imx,imy,w,h);
        */
       return;
}



