function validateIns(f){
	ni_var1 = f.ni_var1.value;

	if(f.zipcode.value == ''){
		alert('Please enter your zipcode.');
		f.zipcode.focus();
		return false;
	} else if(!validZIP(f.zipcode.value)){
		alert('Please enter valid 5-digits zipcode.');
		f.zipcode.focus();
		return false;
	} else if(!existingZIP(f.zipcode.value)){
		alert('This zipcode does not exist.');
		f.zipcode.focus();
		return false;
	} else {

		len = parseInt(f.srcid.length);

		if(!isNaN(len)){
			for(i = 0; i < len; i++){
				if(f.srcid[i].checked){
					srcid = f.srcid[i].value;
				} else if(f.srcid[i].selected){
					srcid = f.srcid[i].value;
				}
			}
		} else {
			srcid = f.srcid.value;
		}

		if(
			(srcid == 'auto') || (srcid == 'life') || (srcid == 'home') || (srcid == 'homeowners') || (srcid == 'health') || (srcid == 'renters') ||
			(srcid == 'IFP') || (srcid == 'SG') || (srcid == 'DT') || (srcid == 'ST')
		){
			if(srcid == 'auto')
			{
				http = httpGetObject();
				http.onreadystatechange = function(){
					if(http.readyState == 4){
						if(http.status == 200){
							if(http.responseText == 'InsuranceLeadzAuto'){
								InsuranceLeadzAuto(f.zipcode.value, ni_var1);
							} else if(http.responseText == 'AutoFrame'){
								AutoFrame(f.zipcode.value, ni_var1 + '_x');
							} else if(http.responseText == 'AutoFrame1'){
								AutoFrame1(f.zipcode.value, ni_var1 + '_x');
							}
							return false;
						}
					}
				}
				xmlUrl = '/toggle.php?toggle=auto';
				http.open('GET', xmlUrl, true);
				http.send(null);
			}
			else if(srcid == 'life')
			{
				http = httpGetObject();
				http.onreadystatechange = function(){
					if(http.readyState == 4){
						if(http.status == 200){
							if(http.responseText == 'InsuranceLeadzLife'){
								InsuranceLeadzLife(f.zipcode.value, ni_var1);
							} else if(http.responseText == 'LifeFrame'){
								LifeFrame(f.zipcode.value, ni_var1 + '_x');
							} else if(http.responseText == 'LifeFrame1'){
								LifeFrame1(f.zipcode.value, ni_var1 + '_x');
							}
							return false;
						}
					}
				}
				xmlUrl = '/toggle.php?toggle=life';
				http.open('GET', xmlUrl, true);
				http.send(null);
			}
			else if((srcid == 'home') || (srcid == 'homeowners'))
			{
				http = httpGetObject();
				http.onreadystatechange = function(){
					if(http.readyState == 4){
						if(http.status == 200){
							if(http.responseText == 'InsuranceLeadzHome'){
								InsuranceLeadzHome(f.zipcode.value, ni_var1);
							} else if(http.responseText == 'HomeFrame'){
								HomeFrame(f.zipcode.value, ni_var1 + '_x');
							} else if(http.responseText == 'HomeFrame1'){
								HomeFrame1(f.zipcode.value, ni_var1 + '_x');
							}
							return false;
						}
					}
				}
				xmlUrl = '/toggle.php?toggle=home';
				http.open('GET', xmlUrl, true);
				http.send(null);
			}
			else if(srcid == 'health')
			{
				http = httpGetObject();
				http.onreadystatechange = function(){
					if(http.readyState == 4){
						if(http.status == 200){
							if(http.responseText == 'InsuranceLeadzHealth'){
								InsuranceLeadzHealth(f.zipcode.value, 'IFP', ni_var1);
							} else if(http.responseText == 'HealthFrame'){
								HealthFrame(f.zipcode.value, 'IFP', ni_var1);
							} else if(http.responseText == 'HealthFrame1'){
								HealthFrame(f.zipcode.value, 'IFP', ni_var1);
							}
							return false;
						}
					}
				}
				xmlUrl = '/toggle.php?toggle=health';
				http.open('GET', xmlUrl, true);
				http.send(null);

				return false;
			}
			else if(srcid == 'renters')
			{
				/*http = httpGetObject();
				http.onreadystatechange = function(){
					if(http.readyState == 4){
						if(http.status == 200){
							if(http.responseText == 'InsuranceLeadzHome'){
								InsuranceLeadzRenters(f.zipcode.value, ni_var1);
							} else if(http.responseText == 'RentersFrame'){
								RentersFrame(f.zipcode.value, ni_var1 + '_x');
							}
							return false;
						}
					}
				}
				xmlUrl = '/toggle.php?toggle=home';
				http.open('GET', xmlUrl, true);
				http.send(null);*/

				RentersFrame(f.zipcode.value, ni_var1 + '_x');
			}
			else if(srcid == 'IFP')
			{
				http = httpGetObject();
				http.onreadystatechange = function(){
					if(http.readyState == 4){
						if(http.status == 200){
							if(http.responseText == 'InsuranceLeadzHealth'){
								InsuranceLeadzHealth(f.zipcode.value, 'IFP', ni_var1);
							} else if(http.responseText == 'HealthFrame'){
								HealthFrame(f.zipcode.value, 'IFP', ni_var1);
							}
							return false;
						}
					}
				}
				xmlUrl = '/toggle.php?toggle=health';
				http.open('GET', xmlUrl, true);
				http.send(null);

				return false;
			}
			else if(srcid == 'SG')
			{
				http = httpGetObject();
				http.onreadystatechange = function(){
					if(http.readyState == 4){
						if(http.status == 200){
							//if(http.responseText == 'InsuranceLeadzHealth'){
								InsuranceLeadzHealth(f.zipcode.value, 'SG', ni_var1);
							/*} else if(http.responseText == 'HealthFrame'){
								HealthFrame(f.zipcode.value, 'SG', ni_var1);
							}*/
							return false;
						}
					}
				}
				xmlUrl = '/toggle.php?toggle=health';
				http.open('GET', xmlUrl, true);
				http.send(null);

				return false;
			}
			else if(srcid == 'DT')
			{
				http = httpGetObject();
				http.onreadystatechange = function(){
					if(http.readyState == 4){
						if(http.status == 200){
							//if(http.responseText == 'InsuranceLeadzHealth'){
								InsuranceLeadzHealth(f.zipcode.value, 'DT', ni_var1);
							/*} else if(http.responseText == 'HealthFrame'){
								HealthFrame(f.zipcode.value, 'DT', ni_var1);
							}*/
							return false;
						}
					}
				}
				xmlUrl = '/toggle.php?toggle=health';
				http.open('GET', xmlUrl, true);
				http.send(null);

				return false;
			}
			else if(srcid == 'ST')
			{
				http = httpGetObject();
				http.onreadystatechange = function(){
					if(http.readyState == 4){
						if(http.status == 200){
							//if(http.responseText == 'InsuranceLeadzHealth'){
								InsuranceLeadzHealth(f.zipcode.value, 'ST', ni_var1);
							/*} else if(http.responseText == 'HealthFrame'){
								HealthFrame(f.zipcode.value, 'ST', ni_var1);
							}*/
							return false;
						}
					}
				}
				xmlUrl = '/toggle.php?toggle=health';
				http.open('GET', xmlUrl, true);
				http.send(null);

				return false;
			}
			else
			{
				return false;
			}
		}
	}

	return false;
}
