function showSinsLink() {
	var locn = getUserLocation();
	if ( locn != null )	{
		var dlocn = locn
		if ( locn.length > 75 )
			dlocn = locn.substring(0,74) + "..";
			if ( document.getElementById("sins_link_data") ) {
				var img = "url(img/linkpanel/link_sins.gif)";
				document.getElementById("sins_link_cell").style.backgroundImage = img;
				document.getElementById("sins_link_cell").style.height = "60px";
				var sinsLink = document.createElement('a'); 
				sinsLink.setAttribute('href', "resources/solar_insolation_tool.asp?loc=" + escape(locn));
				sinsLink.setAttribute('className', "a_serv_link");
				sinsLink.setAttribute('class', "a_serv_link");
				var sinsText = document.createTextNode('Solar Insolation in ' + dlocn);
				sinsLink.appendChild(sinsText);
				document.getElementById("sins_link_data").appendChild(sinsLink);
			}
	}
}

function getUserLocation() {
	var locn = "";
	if ( geoip_city() != null && geoip_city().length > 0 && geoip_region_name() != null && geoip_region_name().length > 0 && geoip_country_name() != null && geoip_country_name().length > 0 )
		locn = locn + geoip_city() + ", " + geoip_region_name() + ", " + geoip_country_name();
	if ( locn != null && locn.length > 0 )
		return locn;
	else 
		return null;
}