function validZIP(val){
	re = new RegExp(/^\d{5,5}$/);
	if(val.match(re)){
		return true;
	} else {
		return false;
	}
}


function validateIns(f){
	var params  = '';
	ni_var1 = f.ni_var1.value;
	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;
		}
		params = 'requested_amount=' + srcid + '&ni_var1=' + ni_var1;
	}
	else
		params = 'ni_var1=' + ni_var1;	
		
	var hostPrefix = window.location.host == 'fastloanorg' ? 'http://fastloanorg/' : 'https://' + window.location.host + '/';
	url1 = hostPrefix + 'application/step1of2.php?' + params;
	document.location = url1;
	
	return false;
}
