/* **************************************************
 * These are variables that need to be edited daily *
 ************************************************** */

var seas = 2; // wave height in feet

var tempF = 59; // temperature in Fahrenheit
var tempC = Math.round((tempF - 32) * (5/9)); // calculated temperature in Celcius

var weather = "Cloudy"; // today's weather
 /* Use the following:  Sunny, Cloudy, Rain, Windy, Snow */

var latDeg = 52; // degree portion of latitude
var latMin = 24;  // minute portion of latitude

var longDeg = 68; // degree portion of longitude
var longMin = 52;  // minute portion of longitude

/* *************************************
 * Ignore everything beyond this point *
 ************************************* */

var baseURL = "http://www.iwu.edu/~iwunews/Antarctica/";

function writeWave() {
 var wHeight = 341; // pixel height of wave img
 var wWidth = 455; // pixel width of wave img
 var sHeight = 341; // pixel height of silhouette img
 var sWidth = 61; // pixel width of silhouette img
 
 var genH = Math.round(((wHeight * 6) / seas) * (5/6)); // generated pixel height of man img
 var genW = Math.round(genH * (61 / wHeight)); // generated pixel width of man img
 
 document.write("<p class=\"dkgrnheader\">Today's Seas</p>\n"+
  "<p class=\"bodybrownbld\">Current Wave Height: "+seas+" feet<br>\n"+
  " Relative to a 6 ft. tall man</p>\n"+
  "<p style=\"text-align: center;\">\n"+
  "<img src=\""+baseURL+"images/wave.jpg\" style=\"width: "+wWidth+
   "px; height: "+wHeight+"px; border: 0px;\">\n"+
  "<img id=\"man\" src=\""+baseURL+"images/silhouette.gif\" style=\"width: "+
   genW+"px; "+"height: "+genH+"px; border: 0px;\">\n</p>\n");
}

function writeDailyMenu() {
 document.write("<p class=\"linkdkgreen\">Today's Temperature:<br>\n &nbsp; "+
  "<span style=\"background: #99FFFF; color: #000099;\">"+tempF+"&deg;F/"+
   tempC+"&deg;C</span><br>\nToday's Weather: "+weather+" <img src=\""+
   baseURL);
 if(weather == "Sunny") document.write("images/sun.gif");
 else if(weather == "Cloudy") document.write("images/cloud.gif");
 else if(weather == "Rain") document.write("images/rain.gif");
 else if(weather == "Windy") document.write("images/wind.gif");
 else if(weather == "Snow") document.write("images/snow.gif");
 else document.write("images/blank.gif");
 document.write("\" border=0><br><br>\nCurrent Location:<br>\n &nbsp; "+
  "Latitude &raquo; "+latDeg+"&deg; "+latMin+"'<br>\n &nbsp; "+
  "Longitude &raquo; "+longDeg+"&deg; "+longMin+"'<br>\n &nbsp; "+"<a href=\""+
   baseURL+"map.html\" class=\"linkdkgrnbld\">Click here</a> for map<br><br>\n"+
  "Today's Seas: "+seas+" foot waves<br>\n &nbsp; "+"<a href=\""+baseURL+
   "wave.html\" class=\"linkdkgreenbld\">Click here</a> for example</b></p>\n");
}
