
function detectWebstart(anchorTag)
{
	var webstartConfirmed = false;

	if( navigator.mimeTypes && navigator.mimeTypes.length )
	{
		if( navigator.mimeTypes['application/x-java-jnlp-file'] )
		{
			webstartConfirmed = true;
		}
	}

	if( !webstartConfirmed )
	{
		try
		{
			webstartConfirmed = detectWebstartVB();
		}
		catch( error )
		{
			// Ignore this for now
		}
	}

	if( !webstartConfirmed )
	{
		webstartConfirmed = confirm("You do not appear to have Java WebStart installed on your browser.\nDo you wish to try continuing anyway?");
	}

	if( webstartConfirmed && anchorTag)
	{
		var newHref = anchorTag.href;
		newHref += (newHref.indexOf('?') >= 0 ? '&' : '?');
		newHref += 'rand=' + parseInt(Math.random() * 999);
		anchorTag.href = newHref;
	}

	return webstartConfirmed;
}