﻿$(document).ready(function() {
    $(".gr3FormGenerator img[FeType$=HelpFormElement]").each(function() {
        var feid = $(this).attr("FeId");
        var h = $(this).attr("FeHeight");
        var w = $(this).attr("FeWidth");
        $(this).click(function() {
            $("#" + feid).dialog('open');
        });
        $("#" + feid).dialog({
            bgiframe: true,
            autoOpen: false,
            resizable: false,
            draggable: false,
            height: Number(h),
            width: Number(w),
            modal: true,
            open: function(type, data) {
                $(this).parent().appendTo($("form:first"));
            },
            close: function(type, data) {
            },
            buttons: {
                'Ok': function() { $(this).dialog('close'); }
            }
        });

    });
});
