﻿// for on click Atlas tagging. v-marklo 2009.9.29
	
function LinkAndTag(RedirectUri, AtlasUri, newWin)
{
	atlas(AtlasUri);
	if(newWin)
	{
		window.open(RedirectUri,null,'');
	}
	else
	{
		window.location.href = RedirectUri;
	}
}
function atlas(uri)
{
    		var timestamp = new Date();

    		var qs = "?qstr=random=" + Math.ceil(Math.random() * 99999999) + timestamp.getUTCFullYear() + timestamp.getUTCMonth() 
    			+  timestamp.getUTCDate() + timestamp.getUTCHours() + timestamp.getUTCMinutes() + timestamp.getUTCSeconds() + timestamp.getUTCMilliseconds();

    		var uriPlus = uri + qs;
    
    		var script = document.createElement('script');
    		script.type = 'text/javascript';
    		script.src = uriPlus;
    		document.getElementsByTagName('head')[0].appendChild(script);
}