//
// This file contains functions for formatting Wizard Step Form Pages 
// and the functions to place the top and bottom anchors.
//

// ----------------------------------------------------------------------------------
// Function StepSectionTitle is used to place a table with section title in the form
// Copyright (c) 1999 - MAYA Heat Transfer Technologies Ltd
// Author: Arnold Free, March 19 1999
// Arguments:  Title{String} -  The Section Title text
// ----------------------------------------------------------------------------------

function CalcTitle(titleText) {
         document.write("<table border='0' width='600' cellpadding='3' cellspacing='0'>");
         document.write("<tr><td width='100%'><p class='Title'>" + titleText + "</p></td></tr>");
         document.write("</table>");
}

// ----------------------------------------------------------------------------------
// Function StepSectionTitle is used to place a table with section title in the form
// Copyright (c) 1999 - MAYA Heat Transfer Technologies Ltd
// Author: Arnold Free, March 19 1999
// Arguments:  Title{String} -  The Section Title text
// ----------------------------------------------------------------------------------

function CalcSection(titleText) {
         document.write("<table border='0' cellpadding='3' width='600' cellspacing='0'>");
         document.write("<tr><td width='100%' bgcolor='#336699'><p class='StepSubTitle'>" + titleText + "</p></td></tr>");
         document.write("<tr><td width='100%' height='10'></td></tr>");
         document.write("</table>");
}

// ----------------------------------------------------------------------------------
// Function StepSectionTitle is used to place a table with section title in the form
// Copyright (c) 1999 - MAYA Heat Transfer Technologies Ltd
// Author: Arnold Free, March 19 1999
// Arguments:  Title{String} -  The Section Title text
// ----------------------------------------------------------------------------------

function CalcHelpSection(titleText) {
         document.write("<table border='0' cellpadding='3' width='100%' cellspacing='0'>");
         document.write("<tr><td width='100%' bgcolor='#336699'><p class='StepSubTitle'>" + titleText + "</p></td></tr>");
         document.write("<tr><td width='100%' height='10'></td></tr>");
         document.write("</table>");
}

// ----------------------------------------------------------------------------------
// Function MsgBox is used to place a text box in the page for calculation messages
// Based on StepSectionTitle Function by Arnold Free
// Copyright (c) 1999 - MAYA Heat Transfer Technologies Ltd
// Author: Jan Radtke, December 28 1999
// Arguments:  None
// ----------------------------------------------------------------------------------

function MsgBox() {
         if (n == 1) {
            document.write("<input type='text' name='msgBox' size='65' value='Define values for calculation.' onBlur='calc()' onFocus='blur()' TABINDEX='-1'>");
         }
         else {
           document.write("<input type='text' name='msgBox' size='90' value='Define values for calculation.' onBlur='calc()' onFocus='blur()' style='font-size: 8pt; color: #000000; background-color: #CCCCCC; border-style: solid; border-color: #CCCCCC' TABINDEX='-1'>");
         }
}

// ----------------------------------------------------------------------------------
// Function ResultBox is used to place a text box in the page for calculation results
// Based on StepSectionTitle Function by Arnold Free
// Copyright (c) 1999 - MAYA Heat Transfer Technologies Ltd
// Author: Jan Radtke, December 28 1999
// Arguments:  boxName{String} -  The Name of the Text Box
// ----------------------------------------------------------------------------------

function ResultBox(boxName) {
         if (n == 1) {
           document.write("<input type='text' size='12' name='" + boxName + "' onFocus='blur()' value='Calculated' TABINDEX='-1'>");
         }
         else {
           document.write("<input type='text' size='12' name='" + boxName + "' onFocus='blur()' value='Calculated' style='background-color: #FFFFCC; border-style: solid; border-color: #FFFFCC' TABINDEX='-1'>");
         }
}

// ----------------------------------------------------------------------------------
// Function ResultBox is used to place a text box in the page for calculation results
// Based on StepSectionTitle Function by Arnold Free
// Copyright (c) 1999 - MAYA Heat Transfer Technologies Ltd
// Author: Jan Radtke, December 28 1999
// Arguments:  boxName{String} -  The Name of the Text Box
// ----------------------------------------------------------------------------------

function FormulaBox(boxName,Length,Value) {
         Length = parseInt(Length);
         if (n == 1) {
           document.write("<input type='text' size='" + Length + "' name='" + boxName + "' onFocus='blur()' value='" + Value + "' TABINDEX='-1'>");
         }
         else {
           document.write("<input type='text' size='" + Length + "' name='" + boxName + "' onFocus='blur()' value='" + Value + "' style='background-color: #FFFFCC; border-style: solid; border-color: #FFFFCC' TABINDEX='-1'>");
         }
}
