function ValidateClick() {

  var zip = document.getElementById('zip').value;
  var formAction = document.getElementById("qgForm").action;
  var siteURL = "http://www.healthyindianaplan.org/app/";
  
  siteURL += "leadworks-regular-two-cols.php?zip="+ zip;
  
  document.getElementById("qgForm").action = formAction;
  
  openWindowWithPost (siteURL,null);
  setTimeout ("setdocument.getElementById('qgForm').submit();",3000);
  this.focus();
  return true;
}

function openWindowWithPost(url,name) {
  var params="";if (navigator.appName!="Netscape"){params="newwindow=yes,toolbars=1,menubar=1,resizable=1,fullscreen=yes,scrollbars=1";}
  var newWindow = window.open(url, name,params);
  
  //if (!newWindow) return false;
  var html = "";
  html += "<html><head></head><body><form id='formid' name='formenv' method='post' action='" + url + "'>";
  if (keys && values && (keys.length == values.length))
  for (var i=0; i < keys.length; i++){
  html += "<input type='hidden' name='" + keys[i] + "' value='" + values[i] + "'/>";}
  html += "</form><scr";
  html += "ipt type=\'text/javascript\'>document.getElementById(\"formid\").submit()</scr";
  html += "ipt></body></html>";
  newWindow.document.write(html);
  
  return newWindow;
  if (!newWindow) return false;
}

