<!--
/**************************************************************************
	Function Name: getQueryParameter
	Description: This function retrieves the querystring parameters.
	Input Parameters: 	1) paramName - name of the query parameter
	Return Values: none
	Author: Kiran Raut
	Date: 16-Mar-2004
	Modification Log:
	_______________________________________________________
		Date		Author		Modification
	ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
				Kiran Raut	First Version
***************************************************************************/
function getQueryParameter( paramName )
{	paramName = paramName.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
	var regexS = "[\\?&]"+paramName+"=([^&#]*)";
	var regex = new RegExp( regexS );
	var results = regex.exec( window.location.href );
	if( results == null )
		return null;
	else
		return results[1];
}

/**************************************************************************
	Function Name: getCookie
	Description: This function retrieves the cookie from browser cache.
	Input Parameters: 	1) cookieName - name of the cookie
	Return Values: none
	Author: Kiran Raut
	Date: 6-Jun-2010
	Modification Log:
	_______________________________________________________
		Date		Author		Modification
	ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
				Kiran Raut	First Version
***************************************************************************/
function getCookie(cookieName)
{	if (document.cookie.length>0)
	{	cookieStart = document.cookie.indexOf(cookieName + "=");
		if (cookieStart != -1)
		{	cookieStart = cookieStart + cookieName.length+1;
			cookieEnd = document.cookie.indexOf(";",cookieStart);
			if (cookieEnd==-1)
				cookieEnd=document.cookie.length;
			return unescape(document.cookie.substring(cookieStart,cookieEnd));
		}
	}
	return "";
}

/**************************************************************************
	Function Name: setCookie
	Description: This function sets the cookie from browser cache.
	Input Parameters: 	1) cookieName - name of the cookie
					2) value - value of the cookie
					3)expireDays - number of days before the cookie
								expires.
	Return Values: none
	Author: Kiran Raut
	Date: 6-Jun-2010
	Modification Log:
	_______________________________________________________
		Date		Author		Modification
	ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ
				Kiran Raut	First Version
***************************************************************************/
function setCookie(cookieName,value,expireDays)
{	var exdate = new Date();
	exdate.setDate(exdate.getDate()+expireDays);
	document.cookie = cookieName+ "=" +escape(value) +
		((expireDays == null) ? "" : ";expires=" + exdate.toUTCString());
}

var enableAnalytics = true;
var strAnalytics1 = '<script type="text/javascript">\
				var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");\
				document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));\
				</script>';
var strAnalytics2 = '<script type="text/javascript">\
				try {\
				var pageTracker = _gat._getTracker("UA-16205765-1");\
				pageTracker._trackPageview();\
				} catch(err) {}</script>';

var strTopRow = "";

if (getQueryParameter("notrack") == null)
	enableAnalytics = true;
else
{	enableAnalytics = false;
	setCookie("notrack","true",null);
}

if (getCookie("notrack") == "true")
	enableAnalytics = false;
else
	enableAnalytics = true;

if (enableAnalytics)
	strTopRow = strAnalytics1;

strTopRow = strTopRow+ '<table cellpadding="0" cellspacing="0" style="width: 301px;" border="0">\
				<tr>\
					<td><img src="images/inner_01.jpg" alt="" width="200" height="16" border="0" /></td>\
					<td><img src="images/inner_02.jpg" alt="" width="101" height="16" border="0" /></td>\
				</tr>\
				<tr>\
					<td colspan="2"><a href="http://www.KiranRaut.com" title="KiranRaut.com, Refreshingly yours!"><img src="images/logo.jpg" alt="KiranRaut.com, Refreshingly yours!" width="301" height="44" border="0" /></a></td>\
				</tr>\
				<tr>\
					<td><img src="images/inner_05.jpg" alt="" width="200" height="21" border="0" /></td>\
					<td><img src="images/inner_06.jpg" alt="" width="101" height="21" border="0" /></td>\
				</tr>\
				</table>';
document.write(strTopRow);
//-->
