function showToolTip(e, vTip){
	if(document.all)e = event;
	
	var obj = document.getElementById(vTip + "tip");
	obj.style.display = 'block';
	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
	if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0; 
	var leftPos = e.clientX - 240;
	if(leftPos<0)leftPos = 0;
	obj.style.left = leftPos + 'px';
	obj.style.top = e.clientY - 200 - obj.offsetHeight -1 + st + 'px';
}	

function hideToolTip(vTip)
{
	document.getElementById(vTip).style.display = 'none';
}

function showFlash(){
	var fl = document.getElementById('newItem');
	if(fl)
	{
		 var myWidth = 0, myHeight = 0;
		if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  	var added_product_id = location.hash.substr(1,location.hash.length);
 	//alert(added_product_id);
	var the_offset = $(added_product_id).cumulativeOffset();
	//alert(the_offset[1]);

  /*fl.style.left = (myWidth-400) + 'px';
  fl.style.top = (myHeight-130) + 'px';*/
 fl.style.left = (myWidth/2)-280 + 'px';
 //fl.style.top = (myHeight/2)-80 + 'px';
 fl.style.top = the_offset[1] + 20 + 'px';
 
 //alert(fl.style.top);
 setTimeout("hideFlash()",5000);
  }
}
function hideFlash(){
	var fl = document.getElementById('newItem');
	fl.parentNode.removeChild(fl);
}