<%
	if((typeof icon === "undefined")      || !icon)      var icon = "icon-cloud-download";
	
	if((typeof className === "undefined") || !className) var className = "btn download ";	
	else className += " btn download";
	
	if((typeof text === "undefined")      || !text)      var text = "Download";	
	if((typeof fileName === "undefined")  || !fileName)  var fileName = "download";
	if((typeof attributes === "undefined")) var attributes = "download";
	if((typeof id === "undefined")  || !id)  var id = "";	
	
	if(typeof href == "string")  href = 'href="' + href + '"';	
	else if(typeof href === "undefined") var href = "";
	
	if((typeof tooLarge !== "undefined") && tooLarge){
		className += " tooltip-this disabled";
		attributes += ' disabled data-title="This dataset is too large to download as a package. Please download the files individually or contact us for alternate data access." data-position="top" data-trigger="hover"';
	}
%>

<a class="<%=className%>" <%=href%> <%=attributes%> target="_blank" data-id="<%=id%>"><%=text%><i class="<%=icon%>"></i></a>
