function thumbnailError(theImage) 
{
	theImage.src = '/static/opsearch/not_available.png';
}

function popupObjectInfo(id, e)
{
	// lookup object id
	var a = new Array();
	a['object_id']	= id;
	
	ajaxLoad('popupObjectSearchInfo', 'show_objectinfo', a, false);
	
	// object lookup
	var e = getElement('popupObjectSearchInfo');
	var t = getElement('img' + id);
		
	// edit style for showing
	if (e.style.display == 'none')
	{
		e.innerHTML = PageVars.loading;
		e.style.display = '';
		e.style.position = 'fixed';
		
		// assign position
		if (PageVars.ie_ver == 6)
		{
			e.actual_top  = (PageVars.mouseY - 10) + 'px';
			e.actual_left = (PageVars.mouseX - 10) + 'px';
			e.drag_top    = (PageVars.mouseY - document.documentElement.scrollTop);
		}
		else
		{
			e.actual_top  = (PageVars.mouseY - document.documentElement.scrollTop) + 'px';
			e.actual_left = (PageVars.mouseX - 10) + 'px';
		}
		
		// copy style
		e.style.top  = e.actual_top + "px";
		e.style.left = e.actual_left + "px";
		
		
		// begin fixed scrolling
		addFixedDiv('popupObjectSearchInfo');
	}
	else
	{
		// loading pointer
		var b = getElement('popupObjectSearchInfo_B');
		var t = getElement('popupObjectSearchInfo_T');
		
		// assign
		if (b) b.innerHTML = PageVars.loading;
		if (t) t.innerHTML = 'Loading object info...&nbsp;&nbsp;';
	}
}

function highlightImage(img, over)
{
	if (over)
	{
		img.style.border = '1px solid #007700';
	}
	else
	{
		img.style.border = '1px solid #dddddd';
	}
}

function addToCategory(id)
{
	// object information
	var a = new Array();
	a['id'] = id;
	
	// load the new object into the div
	ajaxLoad('cell' + id, 'addobjectcategory', a);
	getElement('img' + id).style.border = '1px solid #770077';
}

function deleteFromCategory(id)
{
	// object information
	var a = new Array();
	a['id'] = id;
	
	// load the new object into the div
	ajaxLoad('cell' + id, 'deleteobjectcategory', a);
	getElement('img' + id).style.border = '1px solid #770077';
}
