var _wsHowTxt_ = "position: relative; width: 345px; height: 230px;" var _wsTitleTxt_ = "position: absolute; left: 14px; width:30px; text-align: center; color: #ff0000; font: 10px Arial;"; var _wsDateBlkTxt_ = "position: absolute; top: 4px; text-align: left; color: #ff0000; font: 10px Arial;"; var _wsDayBlkTxt_ = "position: absolute; top: 18px; color: #ff0000; font: 10px Arial;"; var _wsLogoBlkTxt_ = "position: absolute; bottom: 2px; color: #ff0000; font: 10px Arial;"; var _wsSwBlk2_ = "position: absolute; width: 9px; background: #e2e2e2 url(http://www.howsthesurf.com/images/chart/bar2.gif); bottom: 75px; color: #333;z-index: 1"; var _wsSwBlk3_ = "position: absolute; width: 9px; background: #d2d2d2 url(http://www.howsthesurf.com/images/chart/bar3.gif); bottom: 75px; color: #333;z-index: 1"; var _wsHtsgwBlk_ = "position: absolute; bottom: 60px; color: #ffffff; font: 9px Arial;"; var _wsWvArrBlk_ = "position: absolute; bottom: 55px;"; var _wsWvTxtBlk_ = "position: absolute; bottom: 62px; color: #ffffff; font: 8px Arial;"; var _wsWindBlk_ = "position: absolute; bottom: 39px; color: #ffffff; font: 9px Arial;"; var _wsWdirBlk_ = "position: absolute; bottom: 29px; color: #ffffff; font: 8px Arial;"; var _wsLineBlk_ = "position: absolute; left: 10px; height: 0px; width: 308px; border-bottom: 1px solid #dddddd;"; var _wsDashBlk_ = "position: absolute; left: 38px; height: 0px; width: 275px; border-bottom: 1px dashed #dddddd;"; var _wsHowLink_ = "color: #ffffff; text-decoration: none;"; var posX = 60; var hour = 22 var imageGif = 2; function getDayTxt(day) { switch(day) { case 1: return "Sun"; case 2: return "Mon"; case 3: return "Tues"; case 4: return "Wed"; case 5: return "Thurs"; case 6: return "Fri"; case 7: return "Sat"; default: return ""; } } var howDiv = document.getElementById("howsthesurfWidget"); if (howDiv != null) { while(howDiv.hasChildNodes()) { howDiv.removeChild(howDiv.lastChild); } //var howDiv = document.createElement("div"); howDiv.style.cssText = _wsHowTxt_; //encDiv.appendChild(howDiv); var rDiv = document.createElement("div"); rDiv.innerHTML = "Sydney"; rDiv.style.cssText = _wsDateBlkTxt_+ "left: 250px"; howDiv.appendChild(rDiv); var tDiv = document.createElement("div"); tDiv.innerHTML = "Day"; tDiv.style.cssText = _wsTitleTxt_ + "top: 18px"; howDiv.appendChild(tDiv); tDiv = document.createElement("div"); tDiv.innerHTML = "Swell"; tDiv.style.cssText = _wsTitleTxt_ + "bottom: 62px"; howDiv.appendChild(tDiv); tDiv = document.createElement("div"); tDiv.innerHTML = "Wind
(Km/Hr)"; tDiv.style.cssText = _wsTitleTxt_ + "top: 180px"; howDiv.appendChild(tDiv); var maxH = 0; var maxHtsgw = 0; var minHtsgw = 0; var maxPos = 0; var minH = 999; var minPos = 0; var needDate = false; var dayInt = 6; var dayTxt = getDayTxt(dayInt); if (hour < 12) { var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); var dDiv = document.createElement("div"); dDiv.innerHTML = "03/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); } else { needDate = true; } var cnt = 1-1; var htsgw = 0.3; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "03/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'SE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell6small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 2.5; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "SE"; howDiv.appendChild(wdDiv); } if (maxH <= 0.3) { maxH = 0.3; maxHtsgw = waveH; } if (minH >= 0.3) { minH = 0.3; minHtsgw = waveH; } hour = 1; var cnt = 2-1; var htsgw = 0.3; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "04/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'SE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell6small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 2.5; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "SE"; howDiv.appendChild(wdDiv); } if (maxH <= 0.3) { maxH = 0.3; maxHtsgw = waveH; } if (minH >= 0.3) { minH = 0.3; minHtsgw = waveH; } hour = 4; var cnt = 3-1; var htsgw = 0.3; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "04/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'SSE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell7small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 2.9; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "ESE"; howDiv.appendChild(wdDiv); } if (maxH <= 0.3) { maxH = 0.3; maxHtsgw = waveH; } if (minH >= 0.3) { minH = 0.3; minHtsgw = waveH; } hour = 7; var cnt = 4-1; var htsgw = 0.3; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "04/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'SSE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell7small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 3.4; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "SE"; howDiv.appendChild(wdDiv); } if (maxH <= 0.3) { maxH = 0.3; maxHtsgw = waveH; } if (minH >= 0.3) { minH = 0.3; minHtsgw = waveH; } hour = 10; var cnt = 5-1; var htsgw = 0.3; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "04/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'SSE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell7small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 1.9; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "SE"; howDiv.appendChild(wdDiv); } if (maxH <= 0.3) { maxH = 0.3; maxHtsgw = waveH; } if (minH >= 0.3) { minH = 0.3; minHtsgw = waveH; } hour = 13; var cnt = 6-1; var htsgw = 0.4; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "04/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'SSE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell7small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 5.6; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "SSW"; howDiv.appendChild(wdDiv); } if (maxH <= 0.4) { maxH = 0.4; maxHtsgw = waveH; } if (minH >= 0.4) { minH = 0.4; minHtsgw = waveH; } hour = 16; var cnt = 7-1; var htsgw = 0.9; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "04/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'S'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell8small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 8.2; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "S"; howDiv.appendChild(wdDiv); } if (maxH <= 0.9) { maxH = 0.9; maxHtsgw = waveH; } if (minH >= 0.9) { minH = 0.9; minHtsgw = waveH; } hour = 19; var cnt = 8-1; var htsgw = 1.0; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "04/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'S'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell8small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 5.9; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "SSE"; howDiv.appendChild(wdDiv); } if (maxH <= 1.0) { maxH = 1.0; maxHtsgw = waveH; } if (minH >= 1.0) { minH = 1.0; minHtsgw = waveH; } hour = 22; var cnt = 9-1; var htsgw = 1.1; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "04/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'S'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell8small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 5.2; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "SSE"; howDiv.appendChild(wdDiv); } if (maxH <= 1.1) { maxH = 1.1; maxHtsgw = waveH; } if (minH >= 1.1) { minH = 1.1; minHtsgw = waveH; } hour = 1; var cnt = 10-1; var htsgw = 1.2; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "05/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'S'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell8small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 3.4; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "SSE"; howDiv.appendChild(wdDiv); } if (maxH <= 1.2) { maxH = 1.2; maxHtsgw = waveH; } if (minH >= 1.2) { minH = 1.2; minHtsgw = waveH; } hour = 4; var cnt = 11-1; var htsgw = 1.1; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "05/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'S'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell8small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 3.1; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "SE"; howDiv.appendChild(wdDiv); } if (maxH <= 1.1) { maxH = 1.1; maxHtsgw = waveH; } if (minH >= 1.1) { minH = 1.1; minHtsgw = waveH; } hour = 7; var cnt = 12-1; var htsgw = 1.1; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "05/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'S'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell8small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 3.7; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "E"; howDiv.appendChild(wdDiv); } if (maxH <= 1.1) { maxH = 1.1; maxHtsgw = waveH; } if (minH >= 1.1) { minH = 1.1; minHtsgw = waveH; } hour = 10; var cnt = 13-1; var htsgw = 1.0; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "05/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'S'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell8small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 4.7; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "ENE"; howDiv.appendChild(wdDiv); } if (maxH <= 1.0) { maxH = 1.0; maxHtsgw = waveH; } if (minH >= 1.0) { minH = 1.0; minHtsgw = waveH; } hour = 13; var cnt = 14-1; var htsgw = 0.9; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "05/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'SSE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell7small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 4.8; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NE"; howDiv.appendChild(wdDiv); } if (maxH <= 0.9) { maxH = 0.9; maxHtsgw = waveH; } if (minH >= 0.9) { minH = 0.9; minHtsgw = waveH; } hour = 16; var cnt = 15-1; var htsgw = 0.9; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "05/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'SSE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell7small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 5.7; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NE"; howDiv.appendChild(wdDiv); } if (maxH <= 0.9) { maxH = 0.9; maxHtsgw = waveH; } if (minH >= 0.9) { minH = 0.9; minHtsgw = waveH; } hour = 19; var cnt = 16-1; var htsgw = 0.9; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "05/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'ESE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell5small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 6.2; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NNE"; howDiv.appendChild(wdDiv); } if (maxH <= 0.9) { maxH = 0.9; maxHtsgw = waveH; } if (minH >= 0.9) { minH = 0.9; minHtsgw = waveH; } hour = 22; var cnt = 17-1; var htsgw = 1.0; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "05/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'E'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell4small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 7.9; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NNE"; howDiv.appendChild(wdDiv); } if (maxH <= 1.0) { maxH = 1.0; maxHtsgw = waveH; } if (minH >= 1.0) { minH = 1.0; minHtsgw = waveH; } hour = 1; var cnt = 18-1; var htsgw = 1.1; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "06/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'ENE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell3small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 8.3; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NNE"; howDiv.appendChild(wdDiv); } if (maxH <= 1.1) { maxH = 1.1; maxHtsgw = waveH; } if (minH >= 1.1) { minH = 1.1; minHtsgw = waveH; } hour = 4; var cnt = 19-1; var htsgw = 1.2; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "06/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'ENE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell3small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 8.7; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NNE"; howDiv.appendChild(wdDiv); } if (maxH <= 1.2) { maxH = 1.2; maxHtsgw = waveH; } if (minH >= 1.2) { minH = 1.2; minHtsgw = waveH; } hour = 7; var cnt = 20-1; var htsgw = 1.3; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "06/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'NE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell2small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 8.3; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "N"; howDiv.appendChild(wdDiv); } if (maxH <= 1.3) { maxH = 1.3; maxHtsgw = waveH; } if (minH >= 1.3) { minH = 1.3; minHtsgw = waveH; } hour = 10; var cnt = 21-1; var htsgw = 1.3; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "06/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'NE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell2small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 8.4; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NNE"; howDiv.appendChild(wdDiv); } if (maxH <= 1.3) { maxH = 1.3; maxHtsgw = waveH; } if (minH >= 1.3) { minH = 1.3; minHtsgw = waveH; } hour = 13; var cnt = 22-1; var htsgw = 1.3; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "06/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'NE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell2small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 7.7; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "N"; howDiv.appendChild(wdDiv); } if (maxH <= 1.3) { maxH = 1.3; maxHtsgw = waveH; } if (minH >= 1.3) { minH = 1.3; minHtsgw = waveH; } hour = 16; var cnt = 23-1; var htsgw = 1.2; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "06/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'NE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell2small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 7.4; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NNW"; howDiv.appendChild(wdDiv); } if (maxH <= 1.2) { maxH = 1.2; maxHtsgw = waveH; } if (minH >= 1.2) { minH = 1.2; minHtsgw = waveH; } hour = 19; var cnt = 24-1; var htsgw = 1.1; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "06/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'NE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell2small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 7.5; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NW"; howDiv.appendChild(wdDiv); } if (maxH <= 1.1) { maxH = 1.1; maxHtsgw = waveH; } if (minH >= 1.1) { minH = 1.1; minHtsgw = waveH; } hour = 22; var cnt = 25-1; var htsgw = 1.1; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "06/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'NW'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell14small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 7.8; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NW"; howDiv.appendChild(wdDiv); } if (maxH <= 1.1) { maxH = 1.1; maxHtsgw = waveH; } if (minH >= 1.1) { minH = 1.1; minHtsgw = waveH; } hour = 1; var cnt = 26-1; var htsgw = 0.9; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "07/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'NNW'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell15small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 4.2; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NW"; howDiv.appendChild(wdDiv); } if (maxH <= 0.9) { maxH = 0.9; maxHtsgw = waveH; } if (minH >= 0.9) { minH = 0.9; minHtsgw = waveH; } hour = 4; var cnt = 27-1; var htsgw = 0.7; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "07/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'ENE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell3small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 2.5; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NW"; howDiv.appendChild(wdDiv); } if (maxH <= 0.7) { maxH = 0.7; maxHtsgw = waveH; } if (minH >= 0.7) { minH = 0.7; minHtsgw = waveH; } hour = 7; var cnt = 28-1; var htsgw = 0.6; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "07/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'ENE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell3small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 1.7; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "NW"; howDiv.appendChild(wdDiv); } if (maxH <= 0.6) { maxH = 0.6; maxHtsgw = waveH; } if (minH >= 0.6) { minH = 0.6; minHtsgw = waveH; } hour = 10; var cnt = 29-1; var htsgw = 0.5; var waveH = 65*htsgw; posX = posX+8; if (hour < 3) { dayInt++; if (dayInt > 7) dayInt = 1; dayTxt = getDayTxt(dayInt); if (imageGif == 2) imageGif = 3; else imageGif = 2; posX += 3; /// day block var hDiv = document.createElement("div"); hDiv.style.cssText = _wsDayBlkTxt_+"left: "+ posX+"px"; hDiv.innerHTML = dayTxt; howDiv.appendChild(hDiv); if (needDate) { var dDiv = document.createElement("div"); dDiv.innerHTML = "07/09/2010"; dDiv.style.cssText = _wsDateBlkTxt_+ "left: "+ posX+"px"; howDiv.appendChild(dDiv); needDate = false; } } /// swell block var sDiv = document.createElement("div"); if (imageGif == 2) sDiv.style.cssText = _wsSwBlk2_; else sDiv.style.cssText = _wsSwBlk3_; sDiv.style.height = waveH+"px"; sDiv.style.left = posX+"px"; howDiv.appendChild(sDiv); if (cnt%3==0) { /// wave img block /// var wvDiv = document.createElement("div"); // wvDiv.style.cssText = _wsWvArrBlk_; wvDiv.style.cssText = _wsWvTxtBlk_; wvDiv.style.left = posX+"px"; wvDiv.innerHTML = 'ENE'; /** var wvImg = document.createElement("img"); wvImg.src = "http://www.howsthesurf.com/images/chart/swell3small.gif"; wvDiv.appendChild(wvImg); **/ howDiv.appendChild(wvDiv); /// wind speed Text block /// var pDiv = document.createElement("div"); pDiv.style.cssText = _wsWindBlk_; pDiv.style.left = posX+"px"; pDiv.innerHTML = 0.6; howDiv.appendChild(pDiv); /// wind dir Text block /// var wdDiv = document.createElement("div"); wdDiv.style.cssText = _wsWdirBlk_; wdDiv.style.left = posX+"px"; wdDiv.innerHTML = "WSW"; howDiv.appendChild(wdDiv); } if (maxH <= 0.5) { maxH = 0.5; maxHtsgw = waveH; } if (minH >= 0.5) { minH = 0.5; minHtsgw = waveH; } hour = 13; var hDiv = document.createElement("div"); hDiv.style.cssText = _wsHtsgwBlk_; hDiv.style.left = "38px"; hDiv.style.bottom = (75+maxHtsgw)+"px"; hDiv.innerHTML = maxH+"m"; howDiv.appendChild(hDiv); hDiv = document.createElement("div"); hDiv.style.cssText = _wsHtsgwBlk_; hDiv.style.left = "38px"; hDiv.style.bottom = (75+minHtsgw)+"px"; hDiv.innerHTML = minH+"m"; howDiv.appendChild(hDiv); var maxLDiv = document.createElement("div"); maxLDiv.style.cssText = _wsDashBlk_ + "bottom: "+(75+maxHtsgw)+"px"; howDiv.appendChild(maxLDiv); var minLDiv = document.createElement("div"); minLDiv.style.cssText = _wsDashBlk_ + "bottom: "+(75+minHtsgw)+"px"; howDiv.appendChild(minLDiv); var lDiv = document.createElement("div"); lDiv.style.cssText = _wsLogoBlkTxt_+"left:10px"; lDiv.innerHTML = "Courtesy Of:"; howDiv.appendChild(lDiv); var lnDiv = document.createElement("div"); lnDiv.style.cssText = _wsLineBlk_ + "bottom: 55px"; howDiv.appendChild(lnDiv); lnDiv = document.createElement("div"); lnDiv.style.cssText = _wsLineBlk_ + "bottom: 19px"; howDiv.appendChild(lnDiv); //var lDiv = document.createElement("img"); lDiv = document.createElement("div"); lDiv.style.cssText = _wsLogoBlkTxt_+"left:140px"; //lDiv.src = "http://localhost:8084/spring_howsthesurf/images/system/howsthesurfMini.gif"; var a = document.createElement("a"); a.style.cssText = _wsHowLink_; a.href = "http://www.howsthesurf.com"; a.target = "_blank"; a.innerHTML = "www.howsthesurf.com"; lDiv.appendChild(a); howDiv.appendChild(lDiv); } else { alert("Error - Howsthesurf.com Widget did not find div id - 'howsthesurfWidget'"); }