function ttShow(obj, ev, message, type)
{
	tt = document.getElementById('tooltip_span');
	var myx = ev.x||ev.pageX;
	var myy = ev.y||ev.pageY;
	var scrlx = document.body.scrollLeft; //0
	var scrly = document.body.scrollTop; //0
	tt.style.left = (myx+scrlx)-50+'px';
	tt.style.top = (myy+scrly)+5+'px';
	
	var mex = message+'<strong>'+type+'</strong>';

	tt.innerHTML = mex;
	tt.style.display = "block";
}

function ttHide()
{
	tt = document.getElementById('tooltip_span');
	tt.style.display = "none";
}

function addOne(elemId)
{
	idnode = document.getElementById(elemId);
	myval = parseInt(idnode.value);
	if (isNaN(myval))
		myval = 0;
	//if (myval < max)
		idnode.value = (myval+1)+'';
	return (false);
}
function subOne(elemId)
{
	idnode = document.getElementById(elemId);
	myval = parseInt(idnode.value);
	if (myval-1 >= 0)
		idnode.value = (myval-1)+'';
	return (false);
}

function imageResize(imagePtr)
{
	if (imagePtr.style.width!='100%')
	{
		imagePtr.style.width='100%';
		imagePtr.style.height='100%';
	}
	else 
	{
		imagePtr.style.width='52px'; 
		imagePtr.style.height='75px';
	}
}
	
function charCount(box, otherId, maxLen)
{
	other = document.getElementById(otherId);
	textLen = box.value.length;
	other.value = textLen+'/'+maxLen;
	if (textLen > maxLen)
		box.className='inputErr';
	else
		box.className='inputOk';
}
