
  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;
			if (String(placeId).substring(0, 4) == '1001' || String(placeId).substring(0, 4) == '1002' || String(placeId).substring(0, 4) == '1003') {
        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("<tr><td>");
	document.write("<table bgcolor=white cellspacing=0 cellpadding=0 width=100% border=0>");
        document.write("<tr>");
        document.write("  <td width='2%' rowspan='2'><img src='img/trans.gif' height='38' width='1'></td>");
        document.write("  <td width='49%' align='middle'><img src='symb/solupp.gif'></td>");
        document.write("  <td width='49%' align='middle'><img src='symb/solned.gif'></td>");
        document.write('  <td class="ntv_legend_padding2_question" rowspan="2"><a href="javascript:void(0);" onclick="window.open(\'beskrivning_stat.html\', \'Nederbörd\', \'location=no, menubar=no, Height=280, width=200, status=no, resizable=no, scrollbar=no \')"><img src="img/question.gif" border=0></a></td>');
        document.write("</tr>");
        document.write("<tr>");
        if (soltidArray[0][2]=='none')
        {
        		document.write("  <td align='middle'>--:--</td>");
        		document.write("  <td align='middle'>--:--</td>");
        }
      	else
      	{
        		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></tr>');
  } 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></tr>');
    }
  }

