isamap = new Object();

isamap[0] = "_0";
isamap[1] = "_1";

function pictact(id, act)

{
        if(document.images) document.images[id].src = eval( "pict." + id + isamap[act] + ".src");
}

if (document.images) { // ensure browser can do JavaScript rollovers.

pict = new Object();

pict.index0_0 = new Image();
pict.index0_0.src = "http://www.adult-collections.com/menu/m1.gif";
pict.index0_1 = new Image();
pict.index0_1.src = "http://www.adult-collections.com/menu/m1_1.gif";

pict.index1_0 = new Image();
pict.index1_0.src = "http://www.adult-collections.com/menu/m2.gif";
pict.index1_1 = new Image();
pict.index1_1.src = "http://www.adult-collections.com/menu/m2_1.gif";

pict.index2_0 = new Image();
pict.index2_0.src = "http://www.adult-collections.com/menu/m3.gif";
pict.index2_1 = new Image();
pict.index2_1.src = "http://www.adult-collections.com/menu/m3_1.gif";

pict.index3_0 = new Image();
pict.index3_0.src = "http://www.adult-collections.com/menu/m4.gif";
pict.index3_1 = new Image();
pict.index3_1.src = "http://www.adult-collections.com/menu/m4_1.gif";
}

var TgtItem=0;
var correction_top = 15;
var correction_left = 0;

function getX(obj)
{
  return( obj.offsetParent==null ? obj.offsetLeft : obj.offsetLeft+getX(obj.offsetParent) );
}

function getY(obj)
{
  return( obj.offsetParent==null ? obj.offsetTop : obj.offsetTop+getY(obj.offsetParent) );
}

function addComment(id) {
	TgtItem=id;
	ospan=document.getElementById('com_'+id);
  odiv_menu=document.getElementById('com_menu');
	if (typeof ospan == 'object' && typeof odiv_menu == 'object')
	{
		odiv_menu.style.top=getY(ospan)+correction_top;
		odiv_menu.style.left=getX(ospan)+correction_left;
		odiv_menu.style.display='block';
    document.getElementById('item_id').value=id;
	}
}

function HideDiv() {
  if (typeof odiv_menu == 'object') {
    odiv_menu=document.getElementById('com_menu');
    odiv_menu.style.display='none';
	  odiv_menu.style.top=0;
	  odiv_menu.style.left=0;
  }
}

document.onclick = HideDiv;
