function nyi(){
	alert('Not yet implemented!');
}

function addCheck(){
	var m = document.createElement('input'); 
	m.setAttribute('type', 'hidden'); 
	m.setAttribute('name', 'contact_message[check]'); 
	m.setAttribute('value', '1'); 
	$('#contact_form').appendChild(m);
} 

function selectDeselect(el, other_fields){     
	if ($(el).is(':checked')){    
		$.each(other_fields, function (n,el){ $('#'+el).attr('checked', true); });
	} else {            
		$.each(other_fields, function (n,el){ $('#'+el).attr('checked', false); });
	}
}

function debug(str){
	$('#debug_area').update($('#debug_area').innerHTML+"<br/>"+str);
} 

function checkPriceAbbrFormat(field){
	if (!(/^\d+$/.test(field.value))){
		alert('Please enter a valid integer (1-3 digits)');
    	field.clear();
		field.focus();
	}
}

function toggleInvolvedInFields(){
	if ($('#investor_principal_true').is(':checked'))
		$('#involved_in_fields').show();
	else
		$('#involved_in_fields').hide();
}


function showMapAddress(target, address, name) { 
	geocoder.getLatLng(address, function(point) {
		if (!point) {
			alert(address + " not found");
		} else {
			target.setCenter(point, 10);
			mark = new GMarker(point);
			target.addOverlay(mark);
			//marker.openInfoWindowHtml(name);
		}          
	});          
}                                             
  


function showMapPOV(target, address){
	geocoder.getLatLng(address, function(point){
		if (!point){
			alert(address + " not found");
		}else{                                  
			target.setLocationAndPOV(point);
		}
	});
}         