function isEmpty( str ){
    strRE = new RegExp( );
    strRE.compile( '^[\s ]*$', 'gi' );
    return strRE.test( str.value );
} 
function notValidEmail( str ){
    mailRE = new RegExp( );
    mailRE.compile( '^[\._a-z0-9-]+@[\.a-z0-9-]+[\.]{1}[a-z]{2,4}$', 'gi' );
    return !(mailRE.test( str.value ));
} 
function checkForm( form ){
    if( isEmpty( form.a ) ){
        alert( 'Please enter your name.' );
        return false;
    }
    if( isEmpty( form.b ) ){
        alert( 'Please enter your company.' );
        return false;
    }
    if( notValidEmail( form.c ) ){
        alert( 'Please enter your email address.' );
        return false;
    }
	if( isEmpty( form.e ) ){
        alert( 'Please enter your location.' );
        return false;
    }
    return true;
}
function prod(a) {
     if (a == 'jh') {
     var listservextra = "<select name=ha><option value=>Select operating system<option value=LSV-Windows>Windows 7/2008/Vista/2003/XP<option value=LSV-AIX_(Power_PC)>AIX (Power PC)<option value=LSV-FreeBSD>FreeBSD<option value=LSV-Linux_(32-bit_or_S/390)>Linux (32-bit or S/390)<option value=LSV-Linux_(64-bit)>Linux (64-bit)<option value=LSV-Solaris_(SPARC)>Solaris (SPARC)<option value=LSV-Solaris_(x64)>Solaris (x64)<option value=LSV-MacOSX>Mac OS X<option value=LSV-OpenVMS_(Alpha)>OpenVMS (Alpha)<option value=LSV-VM>VM</select><br><select name=hb><option value=>Number of lists<option value=1-5_Lists>1 - 5 Lists<option value=5-20_Lists>5 - 20 Lists<option value=20+_Lists>20 + Lists<option value=Unsure>Unsure</select><br><select name=hc><option value=>Subscribers per list<option value=0-150_Subscribers>0 - 150 Subscribers<option value=150-300_Subscribers>150 - 300 Subscribers<option value=300-500_Subscribers>300 - 500 Subscribers<option value=500-1000_Subscribers>500 - 1000 Subscribers<option value=1000+_Subscribers>1000 + Subscribers<option value=Unsure>Unsure</select>";
     if (document.getElementById('jh').checked) {
     document.getElementById('jha').style.visibility = 'visible';
     document.getElementById('jha').innerHTML=listservextra;
	 } else {
     document.getElementById('jha').style.visibility = 'hidden';
     document.getElementById('jha').innerHTML="";
	 }
	 } else if (a == 'ji') {
     var maestroextra = "<select name=ia><option value=>Select operating system<option value=Maestro-Windows_2003/2000/XP>Windows 2003/2000/XP<option value=Maestro-Linux_(Intel)>Linux (Intel)<option value=Maestro-Solaris_(SPARC)>Solaris (SPARC)<option value=Maestro-MacOSX>Mac OS X</select><br><select name=ib><option value=>Deliveries per month<option value=0-90k>0 - 90k<option value=100k-350k>100k - 350k<option value=400k-1.4M>400k - 1.4M<option value=1.5M-4.0M>1.5M - 4.0M<option value=4.5M-6.75M>4.5M - 6.75M<option value=6.75M+>6.75M +<option value=Unsure>Unsure</select>"
     if (document.getElementById('ji').checked) {
     document.getElementById('jia').style.visibility = 'visible';
     document.getElementById('jia').innerHTML=maestroextra;
	 } else {
     document.getElementById('jia').style.visibility = 'hidden';
     document.getElementById('jia').innerHTML="";
	 }
	 } else if (a == 'jj') {
     var hdmailextra = "<select name=ja><option value=>Select operating system<option value=HDMail-Linux_Software>Software: Linux<option value=HDMail-Server_Appliance>Server Appliance</select><br><select name=jb><option value=>Deliveries per hour<option value=25k>25k Deliveries<option value=75k>75k Deliveries<option value=100k>100k Deliveries<option value=150k>150k Deliveries<option value=500k>500k Deliveries<option value=Unlimited>Unlimited<option value=Unsure>Unsure</select>"
     if (document.getElementById('jj').checked) {
	 document.getElementById('jja').style.visibility = 'visible';
     document.getElementById('jja').innerHTML=hdmailextra;
	 } else {
     document.getElementById('jja').style.visibility = 'hidden';
     document.getElementById('jja').innerHTML="";
	 }
	 } else if (a == 'jk') {
     var listplexextra = "<select name=ka><option value=>Select type of lists<option value=Announcement_Lists>Announcement Lists<option value=Discussion_Lists>Discussion Lists<option value=Both_Types>Both Types<option value=Unsure>Unsure</select>"
     if (document.getElementById('jk').checked) {
     document.getElementById('jka').style.visibility = 'visible';
     document.getElementById('jka').innerHTML=listplexextra;
	 } else {
     document.getElementById('jka').style.visibility = 'hidden';
     document.getElementById('jka').innerHTML="";
	 }
	 } else if (a == 'jl') {
     var listplexextra = "<select name=kb><option value=>Max daily volume<option value=0-10k>0 - 10k<option value=10k-100k>10k - 100k<option value=Unlimited>Unlimited<option value=Unsure>Unsure</select>"
     if (document.getElementById('jl').checked) {
     document.getElementById('jla').style.visibility = 'visible';
     document.getElementById('jla').innerHTML=listplexextra;
	 } else {
     document.getElementById('jla').style.visibility = 'hidden';
     document.getElementById('jla').innerHTML="";
	 }
	 } else if (a == 'jm') {
     var easeextra = "<select name=ma><option value=>Select type of lists<option value=Announcement_Lists>Announcement Lists<option value=Discussion_Lists>Discussion Lists<option value=Both_Types>Both Types<option value=Unsure>Unsure</select>"
     if (document.getElementById('jm').checked) {
     document.getElementById('jma').style.visibility = 'visible';
     document.getElementById('jma').innerHTML=easeextra;
	 } else {
     document.getElementById('jma').style.visibility = 'hidden';
     document.getElementById('jma').innerHTML="";
	 }
	 } else if (a == 'jn') {
     var easeextra = "<select name=mb><option value=>Max monthly volume<option value=0-30k>0 - 30k<option value=30k-100k>30k - 100k<option value=100k-400k>100k - 400k<option value=400k-1.5M>400k - 1.5M<option value=1.5M-4.5M>1.5M - 4.5M<option value=4.5M-7.5M>4.5M - 7.5M<option value=7.5M+>7.5M +<option value=Unsure>Unsure</select>"
     if (document.getElementById('jn').checked) {
     document.getElementById('jna').style.visibility = 'visible';
     document.getElementById('jna').innerHTML=easeextra;
	 } else {
     document.getElementById('jna').style.visibility = 'hidden';
     document.getElementById('jna').innerHTML="";
	 }
	 }
}
function loc(v) {
     if (v == 'United States') {
	 var locationlabel = "<b>State:</b>";
	 var locationfield = "<select name=eb><option value=>Select State</option><option value=AL>Alabama<option value=AK>Alaska<option value=AS>American Samoa<option value=AZ>Arizona<option value=AR>Arkansas<option value=CA>California<option value=CO>Colorado<option value=CT>Connecticut<option value=DE>Delaware<option value=DC>District of Columbia<option value=FL>Florida<option value=GA>Georgia<option value=GU>Guam<option value=HI>Hawaii<option value=ID>Idaho<option value=IL>Illinois<option value=IN>Indiana<option value=IA>Iowa<option value=KS>Kansas<option value=KY>Kentucky<option value=LA>Louisiana<option value=ME>Maine<option value=MD>Maryland<option value=MA>Massachusetts<option value=MI>Michigan<option value=MN>Minnesota<option value=MS>Mississippi<option value=MO>Missouri<option value=MT>Montana<option value=NE>Nebraska<option value=NV>Nevada<option value=NH>New Hampshire<option value=NJ>New Jersey<option value=NM>New Mexico<option value=NY>New York<option value=NC>North Carolina<option value=ND>North Dakota<option value=MP>Northern Mariana Islands<option value=OH>Ohio<option value=OK>Oklahoma<option value=OR>Oregon<option value=PA>Pennsylvania<option value=PR>Puerto Rico<option value=RI>Rhode Island<option value=SC>South Carolina<option value=SD>South Dakota<option value=TN>Tennessee<option value=TX>Texas<option value=UT>Utah<option value=VT>Vermont<option value=VI>Virgin Islands<option value=VA>Virginia<option value=WA>Washington<option value=WV>West Virginia<option value=WI>Wisconsin<option value=WY>Wyoming</select> <i>(required)</i>";
     document.getElementById('locationlabel').style.visibility = 'visible';
     } else if (v == 'Canada') {
	 var locationlabel = "<b>Province:</b>";
 	 var locationfield = "<select name=eb><option value=>Select Province<option value=Alberta>Alberta<option value=British_Columbia>British Columbia<option value=Manitoba>Manitoba<option value=New_Brunswick>New Brunswick<option value=Newfoundland_and_Labrador>Newfoundland and Labrador<option value=Northwest_Territories>Northwest Territories<option value=Nova_Scotia>Nova Scotia<option value=Nunavut>Nunavut<option value=Ontario>Ontario<option value=Prince_Edward_Island>Prince Edward Island<option value=Quebec>Quebec<option value=Saskatchewan>Saskatchewan<option value=Yukon_Territory>Yukon Territory</select> <i>(required)</i>";
	 document.getElementById('locationlabel').style.visibility = 'visible';
     } else if (v == 'Central or South America') {
	 var locationlabel = "<b>Country:</b>";
     var locationfield = "<input type=text name=eb size=30> <i>(required)</i>";
	 document.getElementById('locationlabel').style.visibility = 'visible';
     } else if (v == 'Africa') {
	 var locationlabel = "<b>Country:</b>";
     var locationfield = "<input type=text name=eb size=30> <i>(required)</i>";
	 document.getElementById('locationlabel').style.visibility = 'visible';
     } else if (v == 'Asia') {
	 var locationlabel = "<b>Country:</b>";
     var locationfield = "<input type=text name=eb size=30> <i>(required)</i>";
	 document.getElementById('locationlabel').style.visibility = 'visible';
     } else if (v == 'Australia/Oceania') {
	 var locationlabel = "<b>Country:</b>";
     var locationfield = "<input type=text name=eb size=30> <i>(required)</i>";
	 document.getElementById('locationlabel').style.visibility = 'visible';
     } else if (v == 'Europe') {
	 var locationlabel = "<b>Country:</b>";
     var locationfield = "<select name=eb><option value=>Select Country<option value=Albania>Albania<option value=Andorra>Andorra<option value=Austria>Austria<option value=Belarus>Belarus<option value=Belgium>Belgium<option value=Bosnia-Herzegovina>Bosnia-Herzegovina<option value=Bulgaria>Bulgaria<option value=Croatia>Croatia<option value=Cyprus>Cyprus<option value=Czech_Republic>Czech Republic<option value=Denmark>Denmark<option value=Estonia>Estonia<option value=Finland>Finland<option value=France>France<option value=Germany>Germany<option value=Greece>Greece<option value=Hungary>Hungary<option value=Iceland>Iceland<option value=Ireland>Ireland<option value=Israel>Israel<option value=Italy>Italy<option value=Latvia>Latvia<option value=Liechtenstein>Liechtenstein<option value=Lithuania>Lithuania<option value=Luxembourg>Luxembourg<option value=Macedonia>Macedonia<option value=Malta>Malta<option value=Moldova>Moldova<option value=Monaco>Monaco<option value=Montenegro>Montenegro<option value=Netherlands>Netherlands<option value=Norway>Norway<option value=Poland>Poland<option value=Portugal>Portugal<option value=Romania>Romania<option value=Russia>Russia<option value=San_Marino>San Marino<option value=Serbia>Serbia<option value=Slovakia>Slovakia<option value=Slovenia>Slovenia<option value=Spain>Spain<option value=Sweden>Sweden<option value=Switzerland>Switzerland<option value=Turkey>Turkey<option value=Ukraine>Ukraine<option value=United_Kingdom>United Kingdom<option value=Vatican_City>Vatican City</select> <i>(required)</i>";
	 document.getElementById('locationlabel').style.visibility = 'visible';
     } else {
 	 var locationlabel = "";
     var locationfield = "";
     document.getElementById('locationlabel').style.visibility = 'hidden';
     }
     document.getElementById('locationlabel').innerHTML=locationlabel;
     document.getElementById('locationfield').innerHTML=locationfield;
}
function hear(a) {
     if (a == 'Other') {
	 var hearlabel = "<b>Other:</b>";
	 var hearfield = "<input type=text name=fb size=30 maxlength=60>";
     document.getElementById('hearlabel').style.visibility = 'visible';
     document.getElementById('hearlabel').innerHTML=hearlabel;
     document.getElementById('hearfield').innerHTML=hearfield;
	 } else if (a == 'Search Engine: Other') {
	 var hearlabel = "<b>Other:</b>";
	 var hearfield = "<input type=text name=fb size=30 maxlength=60>";
     document.getElementById('hearlabel').style.visibility = 'visible';
     document.getElementById('hearlabel').innerHTML=hearlabel;
     document.getElementById('hearfield').innerHTML=hearfield;
	 } else if (a == 'Existing Customer') {
	 var hearlabel = "<b>Customer ID (if known):</b>";
	 var hearfield = "<input type=text name=fb size=30 maxlength=60>";
     document.getElementById('hearlabel').style.visibility = 'visible';
     document.getElementById('hearlabel').innerHTML=hearlabel;
     document.getElementById('hearfield').innerHTML=hearfield;
	 } else {
	 var hearlabel = "";
	 var hearfield = "";
     document.getElementById('hearlabel').style.visibility = 'hidden';
     document.getElementById('hearlabel').innerHTML=hearlabel;
     document.getElementById('hearfield').innerHTML=hearfield;
     }
}
