function ask_question() {
	    var url = 'http://www.ichomes.com/contact/ask_question.php';
	    var message       = $('#Question').val();
	    var customer_name = $('#Name').val();
	    var email_address = $('#Email').val();
	    var phone         = $('#Phone').val();
	    $.post(url, {message2:message, customer_name2:customer_name , email_address2:email_address, phone2:phone} , function(data) {
            var object = $.parseJSON(data); 
            if(object.res != 1) {   
               $('#error_msg_div_question').css("display", "yes");
               $('#error_msg_div_question').html("");             
               $('#error_msg_div_question').html(object.res);
            }
            else {
		        $('#error_msg_div_question').html("");
		        $('#ask_id').html(object.success);
		        $('#ask_id').append('<a href="#" id="refresh_form" onclick="javascript:refresh_ask_question(); return false;">Ask another question</a>');
            }
      });
      return false;
    }
    
    function refresh_ask_question()
    {
		$('#ask_id').html('');
		$('#ask_id').append('<h3 class="widgettitle">Ask a Question</h3>');
		$('#ask_id').append('<div style="padding:0"><div><form action="" method="post" id="ask_question">');
		$('#ask_id').append('<div style="margin-top:4px;margin-bottom:20px;color:#777;">');
		$('#ask_id').append('<label class="form_font">Question</label><input class="form_font" id="Question" name="message2" type="text" size="31" maxlength="255" value="" style="margin-bottom:6px;width:225px" />');
		$('#ask_id').append('<label class="form_font">Name</label><input class="form_font" id="Name" name="customer_name2" type="text" size="31" maxlength="40" value="" style="margin-bottom:6px;width:225px" />');
		$('#ask_id').append('<label class="form_font">Email</label><input class="form_font" id="Email" name="email_address2" type="text" size="31" maxlength="40" value="" style="margin-bottom:6px;width:225px" />');
		$('#ask_id').append('<label class="form_font">Phone</label><input class="form_font" id="Phone" name="phone2" type="text" size="31" maxlength="40" value="" style="margin-bottom:6px;width:225px" />');
		$('#ask_id').append('<input type="hidden" name="advanced" />');
		$('#ask_id').append('<input type="submit" name="SUBMIT" value="SUBMIT" onclick="javascript:ask_question(); return false;" style="width:225px" />');
		$('#ask_id').append('</div></form></div></div>');
		return false;
	}

