/*
$Id: 
Copyright(C) 1996-2005 INCREMENT P CORP.
*/

function CPinGroup( oMap, oInner )
{
	var oOwner		= this;

	var oDrawCache = new Object();
	oDrawCache.Longitude	= oInner.lng;
	oDrawCache.Latitude	= oInner.lat;
	oDrawCache.nDist	= 0;
	oDrawCache.oObj	= CreatePin( oInner.uid );

	function CreatePin( uid )
	{
		var oLayer = oMap.document.getElementById( "Layer" );
		var oImgPin = oMap.document.createElement( "img" );
		oImgPin.uid		= uid;
		oImgPin.style.zIndex	= 20;
		oImgPin.style.position	= "absolute";
		oImgPin.style.width	= 45;
		oImgPin.style.height = 61;
//		oImgPin.style.left	= -1000;
//		oImgPin.style.top	= -1000;
		oImgPin.src		= "flag.gif";
		oLayer.appendChild( oImgPin );	
		return	oImgPin;
	}

	this.Draw = function( oMap )
	{
		var oRet = oMap.GetViewPoint( oDrawCache.Longitude, oDrawCache.Latitude );
		var nHotSpotX = 0; 
		var nHotSpotY = 60;
//		var nHotSpotX = 11; 
//		var nHotSpotY = 27;
		oDrawCache.oObj.style.left	= oRet.PixelX - nHotSpotX;
		oDrawCache.oObj.style.top	= oRet.PixelY - nHotSpotY;
		oDrawCache.oObj.style.visibility = "visible";
	}

	return this;
}

