
// MPS Technologies SideBar - iFrame setter
// © 2006 MPS Technologies.  All rights reserved. 
// $DateTime: 2006/04/21 21:00:00 $
function MPS_SetFrameSize(width, height) 
{	
	//alert(width + ' x ' + height);	
	var i = document.getElementById("sidebar");
	i.style.width = width + "px";
	i.style.height = height + "px";
	i.style.visibility = "visible";
}

// MPS Technologies SideBar - callsback to the parent to set the frame size
// © 2006 MPS Technologies.  All rights reserved. 
// $DateTime: 2006/04/21 21:00:00 $
function MPS_CallbackFrameSize() 
{			    		
	// check to make sure that the parent has the javascript function defined									
	if(parent!= self && typeof(parent.MPS_SetFrameSize) == 'function')
	{				    		    
	    var width = document.body.scrollWidth;
	    var height = document.body.scrollHeight;			    
	    
		parent.MPS_SetFrameSize(width, height);
	}
}

// MPS Technologies - Root Domain Parser
// © 2006 MPS Technologies.  All rights reserved. 
// $DateTime: 2006/04/21 21:00:00 $
function MPS_SetRootDomain()
{
	var domain_array = new Array();
	domain_array = document.domain.split('.');

	document.domain = domain_array[domain_array.length - 2] + '.' + domain_array[domain_array.length - 1];
}

function ShowProductToolTip(e, imageUrl)
{	
	//position the tooltip
	x = e.clientX + document.body.scrollLeft + 10;
	y = e.clientY + document.body.scrollTop;
	
	var div = document.getElementById('Popup');
	div.style.display = "block";
	div.style.left = x;
	div.style.top = y;
		
	var img = document.getElementById('imgProduct');
	img.src = imageUrl;
}

function HideProductToolTip()
{
	Popup.style.display="none";			
}