﻿    function reportAbuse(commentId){
       $("#abuseForm").html('<iframe id="abuseFormIframeId" width="100%" height="610" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="no" />').dialog("open");
       var uri = "http://www.kentonline.co.uk/comments/abuseForm.aspx?commentId="+commentId;
       $("#abuseFormIframeId").attr("src",uri);
       return false;
    }
    function leaveComment(pageId){
       $("#commentForm").html('<iframe id="commentFormIframeId" width="100%" height="610" marginWidth="0" marginHeight="0" frameBorder="0" scrolling="no" />').dialog("open");
       var uri = "http://www.kentonline.co.uk/comments/CommentForm.aspx?pageId="+pageId;
       $("#commentFormIframeId").attr("src",uri);
       return false;
    }
    function closeAbuseDialog(){
        $("#abuseForm").dialog('close');
    }
    function closeCommentDialog(){
        $("#commentForm").dialog('close');
    }
    $(document).ready(function() {
       $("#abuseForm").dialog({
               autoOpen: false,
               modal: true,
               height: 660,
               width: 480,
               closeOnEscape: true,
		       resizable: false,
		       bgiframe: true
           });
       $("#commentForm").dialog({
               autoOpen: false,
               modal: true,
               height: 660,
               width: 480,
               closeOnEscape: true,
		       resizable: false,
		       bgiframe: true
           });
       $(".nobullets a[href!='']").attr('href','#');
       $(".leaveComment").attr('href', '#');
       $(".leaveComment").removeAttr('target');
       $(".blog a").removeAttr('target');
    });
