// JavaScript Document

function getObj(objectId)
{
// cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
	// W3C DOM
	this.obj = document.getElementById(objectId);
	this.style = document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
	// MSIE 4 DOM
	this.obj = document.all(objectId);
	this.style = document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
	// NN 4 DOM.. note: this won't find nested layers
	this.obj = document.layers[objectId];
	this.style = document.layers[objectId];
    } else {
	return false;
    }
}

function writit(text,id) {
	if (document.getElementById)
	{
		x = document.getElementById(id);
		x.innerHTML = '';
		x.innerHTML = text;
	}
	else if (document.all)
	{
		x = document.all[id];
		x.innerHTML = text;
	}
}

function zoomImg(wID){
	myWindow=window.open('/popup_img.php?id='+wID+'','','status=yes,width=80,height=80,scrollbars=1');
	myWindow.focus();
}

function zoomItmImg(wID, wItemId){
	myWindow=window.open('/popup_itm_img.php?id='+wID+'&iid='+wItemId,'','status=yes,width=80,height=80,scrollbars=1');
	myWindow.focus();
}

function zoomCatImg(wID, wCatId){
	myWindow=window.open('/popup_cat_img.php?id='+wID+'&cid='+wCatId,'','status=yes,width=80,height=80,scrollbars=1');
	myWindow.focus();
}

function showCatImg(wId, wCaption, wWidth, wHeight){
	theText = '<img src="/upl_files/cat_img_'+wId+'_lg.jpg" width="'+wWidth+'" height="'+wHeight+'" />';
	theText += '<div class="cap">'+wCaption+'</div>';
	writit(theText, 'catImgHold');
}