// common.js

function LeaveComment(objLink,PostID)
{
	var PageURL = window.location.href.replace(window.location.hash, '');
	if( PageURL.indexOf('?') > -1 )
		PageURL = PageURL.substring(0, PageURL.indexOf('?'));

	var HTML = '<h3>Leave Comment</h3>';
	
	HTML += '<form name="comment_form" action="'+ PageURL +'#comments" method="post"><div class="row">';
		HTML += '<label>Name</label><input type="text" name="Comment[author_name]" id="author_name" value="" />';
	HTML += '</div>';
	HTML += '<div class="row">';
		HTML += '<label>Email</label><input type="text" name="Comment[author_email]" id="author_email"  value="" />';
	HTML += '</div>';
	HTML += '<div class="row">';
		HTML += '<label>Website (optional)</label><input type="text" name="Comment[author_url]" id="author_url" value="" />';
	HTML += '</div>';
	HTML += '<div class="row">';
		HTML += '<label>Validation Code</label><img src="'+ PageURL +'?CommentVI=.png" title="Validation Code" />';
	HTML += '</div>';
	HTML += '<div class="row">';
		HTML += '<label>Enter Code</label><input type="text" name="Comment[validation_code]" id="validation_code" value="" />';
		HTML += '<label>&nbsp;</label><p>Vision impaired <a href="'+ PageURL +'?CommentVIT=1" target="_blank">click here</a></p>';
	HTML += '</div>';
	HTML += '<div class="row">';
		HTML += '<textarea name="Comment[comment_message]" id="comment_message"></textarea>';
	HTML += '</div>';
	HTML += '<div class="row">';
		HTML += '<label>&nbsp;</label><input type="submit" style="font-weight: bold;" name="Submit" value="Submit Comment" />';
	HTML += '</div></form>';
	
	if( objLink.parentNode )
		objLink.parentNode.innerHTML = HTML;
}