// JavaScript Document

function generateSpotlightTags(container, url)
{
	//is url valid
	if (url != "" && url != null)
	{
		//does browser support DOM scripting?
		if (document.getElementById)
		{
			//find the container
			var _con = document.getElementById(container);
			if (_con != null)
			{
				//create a new <image> element
				var _img = document.createElement('img');
				
				_img.setAttribute('alt', 'DoubleClick Spotlight tracking image');
				_img.setAttribute('src', url);
				_img.setAttribute('width', "1");
				_img.setAttribute('height', "1");
				
				//attach <img> to container
				_con.appendChild(_img);
			}			
		}
		//does browser support document.images?
		else if (document.images)
		{
			var _img = new Image();
			_img.src = url;
		}
		//does browser support document.write?
		else if (document.write)
		{
			document.write("<img src=\"" + url + "\" alt=\"\" width=\"1\" height=\"1\" />");
		}
	}
}