
var popup = null;

function display(mytitle,myimage) {
html = "<html><head><title>Grow Help</title><link rel=\"stylesheet\" href=\"/growhelp/css/ferti.css\" type=\"text/css\"></head><body LEFTMARGIN=0 MARGINWIDTH=10 TOPMARGIN=10 MARGINHEIGHT=10 bgcolor='#FFFFCC'><center><img src='/images/loading.gif' name=neww width=100 height=9 alt=\"\" /><br /><IMG SRC=\"" + myimage + "\" BORDER=0 NAME=image onload='document.neww.src=\"/images/replacement.gif\";window.resizeTo(document.image.width+50,document.image.height+150);' /><br /><br /><div class=text><p><a href=\"javascript:window.close();\">Close Window</a></p></div></center></body></html>";
 popup=window.open('','','width=200,height=200,toolbar=0,left=25,top=25,directories=0,menuBar=0,scrollbars=1,resizable=1');
 popup.document.open();
 popup.document.write(html);
 popup.document.focus();
 popup.document.close();
}

//----validate shipping destination------

function validate()
  { 
    var errors = '';
    
    // do each for element
    errors += check("Shipping",document.options.Shipping)
    
    // do alert message
    if (errors) alert(errors);
  
    // prevent from submitting if errors
    document.rv = (errors == '')
  }


function check(name,ref)
  {
    var errors='', value

    // see description of function
    value = getSelectedValue(ref)

    // do error message
    if (value == "nonjava") {
      errors = "Please choose a Shipping destination."
    }
   
    return errors
  }


function getSelectedValue(selectList)
  {
    // read the currently selected item
    return selectList[selectList.selectedIndex].value
  }

