
  var soltidArray = new Array();

  /*
   * Write an script tag into the document that will make the sun time table for the current place available.
   */
   
  function writeSunTimeTableImporter() {
    if (isLeafNode(selectedNodeNum)) {
      var placeId = nodeArray[selectedNodeNum].placeId;
      /* check for sweden */
      if (String(placeId).substring(0, 4) == "1001") {
        document.write("<script language=javascript src='http://natvader.smhi.se/natvader/gateway/getmodule.php?user_id="+ mainUserId +"&module_request=soltid_sverige&komId=" + placeId + "'><\/script>");
      }
    }
  }

  /*
   * Write the imported sun time table into the document.
   */
// id=nameTag2
  function printSunTimesTable() {
    if (soltidArray.length > 0) {
	document.write("<td width=\"150\" align=center>");
	document.write("<table bgcolor=white cellspacing=0 cellpadding=0 width=100%>");
        document.write("<tr>");
        document.write("  <td width='49%' align='middle' valign='top'><img src='symb/solupp.gif'><br>Sol upp</td>");
        document.write("  <td width='49%' align='middle' valign='top'><img src='symb/solned.gif'><br>Sol ned</td>");
        document.write("</tr>");
        document.write("<tr>");
        document.write("  <td align='middle'>" + soltidArray[0][2] + "</td>");
        document.write("  <td align='middle'>" + soltidArray[0][3] + "</td>");
        document.write("</tr>");
	document.write("</table>");
	document.write('</td>');
  } else {
	document.write("<tr height=\"100%\"><td valign=\"top\" bgcolor=\"#FFFFFF\">");
	document.write("<table bgcolor=white cellspacing=0 cellpadding=0 width=100%>");
	document.write("<tr><td><img src='img/trans.gif' width='100' height='36'></td></tr>");
	document.write("</table>");
	document.write('</td>');
    }
  }

