var rotate_delay = 5000;
current = 0;

function wnext() {
 if (document.weatherform.weather[current+1]) {
document.images.weathershow.src = document.weatherform.weather[current+1].value;
 document.weatherform.weather.selectedIndex = ++current;
 }
  else wfirst();
}
/* JP@weknowsnow.com for snowboard-mag.com. dont steal our code. at least give us credit. dont be a jong. WEKNOWSNOW.COM*/

function wprevious() {
if (current-1 >= 0) {
 document.images.weathershow.src = document.weatherform.weather[current-1].value;
 document.weatherform.weather.selectedIndex = --current;
 }
 else wlast();
}

function wfirst() {
  current = 0;
  document.images.weathershow.src = document.weatherform.weather[0].value;
  document.weatherform.weather.selectedIndex = 0;
}

function wlast() {
  current = document.weatherform.weather.length-1;
  document.images.weathershow.src = document.weatherform.weather[current].value;
  document.weatherform.weather.selectedIndex = current;
}

function wap(text) {

window.open (document.images.weathershow.src, "newwindow","location=1,status=1,scrollbars=1,width=650,height=600,left=10,top=100");

}

function wchange() {
  current = document.weatherform.weather.selectedIndex;
  document.images.weathershow.src = document.weatherform.weather[current].value;
}

function wrotate() {
  if (document.weatherform.weatherbutton.value == "Stop") {
  current = (current == document.weatherform.weather.length-1) ? 0 : current+1;
  document.images.weathershow.src = document.weatherform.weather[current].value;
  document.weatherform.weather.selectedIndex = current;
  window.setTimeout("wrotate()", rotate_delay);
  }
}




