function ValidateClick() {
var siteURL ="https://www.healthinsurancesort.com/app/onepager.php?refby="+document.getElementById('refby').value+"&zip="+ document.getElementById('zip').value;
//if (!opened.focus()) opened.focus();

getfield = [];
getfield[0] = "Health"; //Type
getfield[1] = document.getElementById('refby').value; //refby
getfield[2] = document.getElementById('zip').value; //zip code


openWindowWithPost (siteURL,null,getfield);
setTimeout ("setdocument.getElementById('form_IHP').submit();",3000);
this.focus();
return true;
}

function openWindowWithPost(url,name, getfield) {

var params="";if (navigator.appName!="Netscape"){params="newwindow=yes,toolbars=1,menubar=1,resizable=1,fullscreen=yes";}
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;
}



