

		//   lixlpixel tooltips     © 2005 http://lixlpixel.com/  //
		////////////////////////////////////////////////////////////
		// position of the tooltip relative to the mouse in pixel //
		var offsetx = -205;										  //
		var offsety =  -200;										  //
		////////////////////////////////////////////////////////////
		function newelement(newid)
		{ 
			if(document.createElement)
			{ 
				var el = document.createElement('div'); 
				el.id = newid;     
				with(el.style)
				{ 
					display = 'none';
					position = 'absolute';
				} 
				el.innerHTML = '&nbsp;'; 
				document.body.appendChild(el); 
			} 
		} 
		var ie5 = (document.getElementById && document.all); 
		var ns6 = (document.getElementById && !document.all); 
		var ua = navigator.userAgent.toLowerCase();
		var isapple = (ua.indexOf('applewebkit') != -1 ? 1 : 0);
		function getmouseposition(e) // thanks to Grant O. Anderson from Arizona State University
		{
			if(document.getElementById)
			{
				var iebody=(document.compatMode && 
					document.compatMode != 'BackCompat') ? 
						document.documentElement : document.body;
				pagex = (isapple == 1 ? 0 : (ie5)?iebody.scrollLeft:window.pageXOffset);
				pagey = (isapple == 1 ? 0 : (ie5)?iebody.scrollTop:window.pageYOffset);
				mousex = (ie5)?event.x:(ns6)?clientX = e.clientX:false;
				mousey = (ie5)?event.y:(ns6)?clientY = e.clientY:false;

				var lixlpixel_tooltip = document.getElementById('tooltip');
				lixlpixel_tooltip.style.left = (mousex+pagex+offsetx) + 'px';
				lixlpixel_tooltip.style.top = (mousey+pagey+offsety) + 'px';
			}
		}
		function tooltip(tipdiv)
		{
			var tip = document.getElementById(tipdiv).innerHTML;
			if(!document.getElementById('tooltip')) newelement('tooltip',offsetx,offsety);
			var lixlpixel_tooltip = document.getElementById('tooltip');
			lixlpixel_tooltip.innerHTML = tip;
			lixlpixel_tooltip.style.display = 'block';
			document.onmousemove = getmouseposition;
		}
		function exit()
		{
			document.getElementById('tooltip').style.display = 'none';
		}
		/////////////////////// end tooltips ///////////////////////
	



/* OPEN NEW WINDOW*/		
function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }


function confirmGoToLocation(id, ask, url) //confirm order delete
{
 temp = window.confirm(ask);
   if (temp) //delete
   {
      window.location=url+id;
   }
}



function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else 
countfield.value = maxlimit - field.value.length;
}



/* CONFIRM GOTO URL*/
function confirmGotoUrl(id, ask, url) //confirm order delete
        {
                temp = window.confirm(ask);
                if (temp) //delete
                {
                        window.location=url+id;
                }
        }

		
		
/* ONLY DIGITS*/	
function onlyDigits(fldCurr) {
// only numbers allowed  
  var regNumber = /[^\d]/g
  var intPos = fldCurr.value.search(regNumber)
  if (!(intPos == -1)) {
    fldCurr.value = fldCurr.value.replace(regNumber, '');  
    return false
  }
  else {
    return true
  }
}
	
