function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function verify()
{
    var fields = "name,email,telephone";
    var field_a = fields.split(',');
    var ok = true;
    for(var i=0; i<field_a.length; i++) 
        ok = ok && (document.forms[0][field_a[i]].value!=''); 
    if(ok){ return true; }
    else{ alert("Please complete the required fields before submitting your enquiry to us."); return false; }
}

function validate_form ( )
{
    valid = true;
	
	if ( document.contact_form.recommend.checked == false )
    {
        alert ( "Please tick the confirmation box." );
        valid = false;
    }

    return valid;
}

function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
	}
	
	
function getCity(strURL) {		
		
		var req = getXMLHTTP();
		
		if (req) {
			
			req.onreadystatechange = function() {
				if (req.readyState == 4) {
					// only if "OK"
					if (req.status == 200) {						
						document.getElementById('loandiv').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}				
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
				
	}
