
function feedbackH(evt) {

    var url = window.location.href;
	

	var buf = [];
	
	
	buf.push ('<form  id="feedbackForm" action="http://support.esri.com/en/feedback/submit" method="post">');
	buf.push ('<div class="fdbk_head">' + txtFeedbackTitle + '</div>');
	buf.push ('<p>'+ txtFeedbackPara + '</p>');
	buf.push ('<table>');
	
	buf.push ('<tr>');
	buf.push ('<td><label class="txtlbl">'+ txtFeedbackLbl0 + '</label></td>');
	buf.push ('<td><input type="text" name="url" id="url" class="txtbox" size="71" value="' + url + '" /></td>');
	buf.push ('</tr>');

	buf.push ('<tr>');
	buf.push ('<td><label class="txtlbl">'+ txtFeedbackLbl1 + '</label></td>');
	buf.push ('<td><textarea name="comment" id="comment" class="txtbox" rows="4" cols="55"></textarea></td>');
	buf.push ('</tr>');

	buf.push ('<tr>');	
	buf.push ('<td><label class="txtlbl">'+ txtFeedbackLbl2 + '</label></td>');
	buf.push ('<td><input type="text" name="email" id="email" class="txtbox" size="50" value="" /></td>');
	buf.push ('</tr>');

	
	buf.push ('<tr>');	
	buf.push ('<td>&nbsp;</td>');
	buf.push ('<td><input disabled id="submitButton" class="submit" type="submit" value="' + txtFeedbackSubmit + '"/></td>');
	buf.push ('</tr>');

	buf.push ('</table>');
	
	buf.push ('</form>');
	
	$.fn.colorbox({
		transition:"none", 
		width:"680px", 
		height:"360px",
		opacity: 0.65,
		html : buf.join ("")
	});

	return false;

}

function formValidation (evt) {
	if (document.getElementById("comment").value.length > 0){
		document.getElementById("submitButton").disabled = false;
	} else {
		document.getElementById("submitButton").disabled = true;
	}
}

$(document).ready(function () {
	
	$("#feedback").live("click", feedbackH);
	$("#comment").live("keyup", formValidation);

});
