var cookieHelper = {
	readCookie : function(strKey)
	{
		// Read the cookie property. This returns all cookies for this document.
		var allcookies = document.cookie;
		// Look for the start of the cookie named "version"
		var pos = allcookies.indexOf(strKey+"=");
		// If we find a cookie by that name, extract and use its value
		if (pos != -1) 
		{
		    var start = pos + strKey.length+1;                       // Start of cookie value
		    var end = allcookies.indexOf(";", start);  // End of cookie value
		    if (end == -1) end = allcookies.length;
		    var value = allcookies.substring(start, end);  // Extract the value
		    return decodeURIComponent(value);             // Decode it
		}
		
		return "";
	}
}

var urlHelper = {
    parseParamFromURL : function(strHref, strParameterName)
    {
	    var intPos = strHref.indexOf("?");
	    var paramString = strHref.substr(intPos+1);
	    var parameters = paramString.split("&");
	    for (var ii=0; ii<parameters.length; ii++)
	    {
		    var parameter = parameters[ii].split("=");
    			
		    if (parameter[0].toUpperCase()==strParameterName.toUpperCase())
		    {
			    return parameter[1];
		    }
	    }
    		
	    return "";
    }
}
