NAME
    HTMLUtil

SYNOPSIS
    use HTMLUtil;

    use HTMLUtil qw(:all);

DESCRIPTION
    HTMLUtil module provides the following functions:

    InsertHTMLTags, SetupHTMLAlignmentBegin, SetupHTMLAlignmentEnd,
    SetupHTMLButtonRef, SetupHTMLDivBegin, SetupHTMLDivEnd,
    SetupHTMLEmptyLines, SetupHTMLHRef, SetupHTMLPageEnd,
    SetupHTMLPageHeader, SetupHTMLPageTitle, SetupHTMLStyleSheetTags,
    SetupHTMLTableColumnEnd, SetupHTMLTableColumnHeader, SetupHTMLTableEnd,
    SetupHTMLTableHeader, SetupHTMLTableRowDataValue, SetupHTMLTableRowEnd,
    SetupHTMLTableRowHeader, SetupHTMLTableRowHeaderValue,
    SetupJavaScriptCmds, SetupStrViewerAccelrysActiveX,
    SetupStrViewerChem3DActiveX, SetupStrViewerChemDrawActiveX,
    SetupStrViewerChemDrawPlugIn, SetupStrViewerChimePlugIn,
    SetupStrViewerJMEApplet, SetupStrViewerJSInitCmd,
    SetupStrViewerJmolApplet, SetupStrViewerMarvinViewApplet

  FUNCTIONS
    InsertHTMLTags
            $NewTag = InsertHTMLTags($Tag, @TagsNameValue);

        Inserts tag name and value pair from *TagsNameValue* into a
        exisiting *Tag* as *TagName = "TagValue"* and returns NewTag string.

    SetupHTMLAlignmentBegin
            $AlignmentTag = SetupHTMLAlignmentBegin([$Alignment]);

        Returns an alignment begin tag string. Possible *Alignment* values:
        *left, center, or right*. Default: *left*.

    SetupHTMLAlignmentEnd
            $AlignmentTag = SetupHTMLAlignmentBegin([$Alignment]);

        Returns an alignment end tag string.

    SetupHTMLButtonRef
            $ButtonTag = SetupHTMLButtonRef($ButtonLabel, $FileName);

        Returns a button tag string for associating onClick button event of
        a button with label *ButtonLabel* to open a file *FileName*.

    SetupHTMLDivBegin
            $DivTag = SetupHTMLDivBegin($ID);

        Returns a div begin tag string for div *ID*.

    SetupHTMLDivEnd
            $DivTag = SetupHTMLDivEnd();

        Returns a div end tag string.

    SetupHTMLTableEnd
            $TableEndTag = SetupHTMLTableEnd();

        Returns a table end tag string.

    SetupHTMLEmptyLines
            $EmptyLineTags = SetupHTMLEmptyLines([$LineCount]);

        Returns an empty lines tag string for empty *LineCount*. Default
        line count: *1*.

    SetupHTMLPageHeader
            $PageHeaderTag = SetupHTMLPageHeader($HeaderTitle, [$Stylesheet,
                             $JavaScript]);

        Returns a page header tag string using *HeaderTitle* and using
        optionally specifed values for *Stylesheet* and *JavaScript*.

    SetupHTMLHRef
            $HRef = SetupHTMLHRef($Label, $URL, [$Title]);

        Returns a HRef tag string for setting up a URL with *Label* and
        *URL* with optional *Title*.

    SetupHTMLPageEnd
            $PageEndTag = SetupHTMLPageEnd([$FooterMsg]);

        Returns a page end tag string conating optional *FooterMsg*.

    SetupHTMLPageTitle
            $PageTitleTag = SetupHTMLPageTitle($Title, [$Alignment]);

        Returns a page title tag string with optional alignment. Valid
        alignment value: *left, center, right* Default alignment: *center*.

    SetupHTMLStyleSheetTags
            $StyleSheetTags = SetupHTMLStyleSheetTags();

        Returns a default style sheet tag string to be used for HTML files
        generated by MayaChemTools.

    SetupHTMLTableHeader
            $TableHeaderTags = SetupHTMLTableHeader([$BorderWidth,
                               $CellPadding, $CellSpacing, $Width, $Height]);

        Returns a table header tag string containing specified values for
        *BorderWidth, CellPadding, CellSpacing, Width, and Height*. Default
        values: *BorderWidth = 1; CellPadding = 2; CellSpacing = 0; Width =
        NotUsed; Height = NotUsed*.

    <SetupHTMLTableEnd>
            $TableEndTag = SetupHTMLTableEnd();

        Returns a table end tag string.

    SetupHTMLTableColumnHeader
            $ColumnHeaderTag = SetupHTMLTableColumnHeader([$BgColor, $Width]);

        Returns a table column header tag string containing specified values
        for *BgColor, Width*. Default values: *BgColor = NotUsed; Width =
        NotUsed*.

    SetupHTMLTableColumnEnd
            $ColumnEndTag = SetupHTMLTableColumnEnd();

        Returns a table column end tag string.

    SetupHTMLTableRowHeader
            $RowHeaderTag = SetupHTMLTableRowHeader([$HAlignment, $BgColor,
                            $VAlignment]);

        Returns a table row header tag string containing specified values
        for *HAlignment, BgColor, and VAlignment*. Default values:
        *HAlignment = center; $BgColor = NotUsed; $VAlignment = top*.

    SetupHTMLTableRowEnd
            $RowEndTag = SetupHTMLTableRowEnd();

        Returns a table row end tag string.

    SetupHTMLTableRowHeaderValue
            $HeaderValueTag = SetupHTMLTableRowHeaderValue([$Value]);

        Returns a table header row tag string using specifed *Value*.
        Default value: *EmptySpace*.

    SetupHTMLTableRowDataValue
            $RowValueTag = SetupHTMLTableRowDataValue([$Value, $BgColor,
                           $FontColor, $FontBold]);

        Returns a table row column value tag string using specified values
        for *Value, BgColor, FontColor, and FontBold*. Default values:
        *Value = EmptySpace; BgColor = NotUsed; FontColor = NotUsed;
        $FontBold = NotUsed*.

    SetupJavaScriptCmds
           $JSTag = SetupJavaScriptCmds(@JSCmdList);

        Returns a Java script tag string using java script commands
        specified in *JSCmdList*.

    SetupStrViewerJSInitCmd
           $JSTag = SetupStrViewerJSInitCmd($StrViewerType, $CodeBase);

        Returns a Java script command tag string for intializing structure
        viewers with specified *CodeBase* location for viewers to be invoked
        as Java Applets. Supported values for *StrViewerType*: *Jmol,
        ChemDrawPlugIn, ChemDrawActiveX, Chem3DActiveX*.

    SetupStrViewerJMEApplet
            $JMEAppletTag = SetupStrViewerJMEApplet($MolString, $CodeBase,
                            [{param => "value"}]);

        Returns a JME tag string for displaying molecule using *MolString*
        along with valid optional applet parameters specified as name and
        value pairs. Defaul JME parameter values: *name = JME; id = JME;
        width = 250; height = 170*.

    SetupStrViewerJmolApplet
            $JmolAppletTag = SetupStrViewerJmolApplet($MolString, $CodeBase,
                             [{param => "value"}]);

        Returns a JMol tag string for displaying molecule using *MolString*
        along with valid optional applet parameters specified as name and
        value pairs. Defaul JMol parameter values: *name = Jmol; id = Jmol;
        width = 250; height = 170; progressbar = true; progresscolor =
        0000ff; bgcolor = 000000; JMolScript = select *; set frank off;
        wireframe on; spacefill off*.

    SetupStrViewerMarvinViewApplet
            $MarvinAppletTag = SetupStrViewerMarvinViewApplet($MolString,
                               $CodeBase, [{param => "value"}]);

        Returns a MarvinView tag string for displaying molecule using
        *MolString* along with valid optional applet parameters specified as
        name and value pairs. Defaul MarvinView parameter values: *name =
        MView; id = MView; width = 250; height = 170; navmode = zoom*.

    SetupStrViewerChimePlugIn
            $ChimePlugInTag = SetupStrViewerChimePlugIn($MolFile,
                              [{param => "value"}]);

        Returns a MDL Chime tag string for displaying molecule using
        *MolFile* along with valid optional parameters specified as name and
        value pairs. Defaul Chime parameter values: *width = 250; height =
        170; display2d = true*.

    SetupStrViewerChem3DActiveX
            $ChemDraw3DActiveXTags = SetupStrViewerChemDrawActiveX($MolFile,
                                     [{param => "value"}]);

        Returns a CambridgeSoft Chem3D tag string for displaying molecule
        using *MolFile* along with valid optional parameters specified as
        name and value pairs. Defaul Chime parameter values: *width = 250;
        height = 170; displaytype = BallAndStick; rotationbars = false;
        moviecontroller = false*.

    SetupStrViewerChemDrawActiveX
            $ChemDrawActiveXTags = SetupStrViewerChem3DActiveX($MolFile,
                                   [{param => "value"}]);

        Returns a CambridgeSoft ChemDraw ActiveX tag string for displaying
        molecule using *MolFile* along with valid optional parameters
        specified as name and value pairs. Defaul ChemDraw ActiveX parameter
        values: *width = 250; height = 170; ViewOnly = 1; ShrinkToFit = 1;
        ShowToolsWhenVisible = 1*.

    SetupStrViewerChemDrawPlugIn
            $ChemDrawPlugInTag = SetupStrViewerChemDrawPlugIn($MolFile,
                                 [{param => "value"}]);

        Returns a CambridgeSoft ChemDraw PlugIn tag string for displaying
        molecule using *MolFile* along with valid optional parameters
        specified as name and value pairs. Defaul ChemDraw PlugIn parameter
        values: *width = 250; height = 170; ViewOnly = 1; ShrinkToFit = 1;
        ShowToolsWhenVisible = 1*.

    SetupStrViewerAccelrysActiveX
            $AccelrysActiveXTags = SetupStrViewerAccelrysActiveX($MolFile,
                                   [{param => "value"}]);

        Returns a Accelrys ViewerActiveX tag string for displaying molecule
        using *MolFile* along with valid optional parameters specified as
        name and value pairs. Defaul ViewerActiveX parameter values: *width
        = 250; height = 170; Convert2Dto3D = 0; Mouse = 4*.

AUTHOR
    Manish Sud <msud@san.rr.com>

COPYRIGHT
    Copyright (C) 2015 Manish Sud. All rights reserved.

    This file is part of MayaChemTools.

    MayaChemTools is free software; you can redistribute it and/or modify it
    under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 3 of the License, or (at
    your option) any later version.

