///////////////////////////////////////////////////////////////////////////////
//   IE-Scripts.js
//      Main library file for xWeb.NET
//
//   Version Information:
//      [2003-10-08] v1.0 Sven Batalla - Initial Version
//      [2004-06-18] v2.0 Sven Batalla - Added Dynamic Help link
//      [2004-06-24] v2.1 Sven Batalla - Added BuzzMe launcher
//      [2004-07-26] v3.0 Sven Batalla - Added User Feedback launcher
//                                     - Added User Registration launcher
//                                     - Added Contact Us launcher
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
//--- GLOBAL VARIABLES ------------------------------------------------------//
///////////////////////////////////////////////////////////////////////////////
var _IE_WSCallID = null;

//URLs
var _URL_BuzzMe3            = "/User/BuzzMe/BuzzMe-Main.aspx";
var _URL_BuzzMe             = "/User/IE-BuzzMe/IE-BuzzMe.aspx";
var _URL_ContactUs          = "/User/GuestUser/Guest-ContactUs.htm";
var _URL_DynamicHelp        = "/User/DynamicHelp/DynamicHelp.aspx";
var _URL_Feedback           = "/User/GuestUser/Guest-Feedback-Email.html";
var _URL_ForgotPassword     = "/Wizards/User/IE-ForgotPassword.html";
var _URL_Registration       = "/User/GuestUser/Guest-Register.htm";
var _URL_SingleCalendar     = "/User/IE-Calendar-Single.aspx";
var _URL_SystemRequirements = "/Login/IE-Wizard-Requirements.aspx";
var _URL_TagSearch          = "/user/IE-TagSearch/IE-TagSearch.aspx";

///////////////////////////////////////////////////////////////////////////////
//--- EVENT FUNCTIONS -------------------------------------------------------//
///////////////////////////////////////////////////////////////////////////////

   ////////////////////////////////////////////////////////////////////////////
   //   IE_SelectItem()
   //      Selects the item in the given <SELECT> object that matches the given
   //      value
   //
   //   Requires:
   //      oSelect - The <SELECT> object
   //      sValue  - The value to select
   //
   //   Returns: Nothing.
   //   Created:
   //      [2003-12-05] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_SelectItem(oSelect, sValue)
   {
      try
      {
         //Iterate through all the items in the given list and find the one
         // that matches the given value...
         for(var nLoop = 0; nLoop < oSelect.length; nLoop++)
         {
            if(oSelect.options(nLoop).value == sValue)
            {
               oSelect.options(nLoop).selected = true;
               return;
            }//if
         }//for
      }//try
      catch(Err)
      {}//catch
   }//IE_SelectItem()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_SelectObject()
   //      Manages object selection on a page. If the object is of a valid
   //      type, then it can be selected.
   //
   //   Requires: Nothing.
   //   Returns: [true] if the object can be selected
   //   Created:
   //      [2003-10-08] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_SelectObject()
   {
      try
      {
         //Get the item being selected
         var oObject = event.srcElement;
         
         //If the item is a not textbox, disallow the selection...
         if(oObject.tagName.toLowerCase() != "input")
            return false;
      }//try
      catch(Err)
      {}//catch
      
      //If you got this far, an error happened, or the object can be selected, so
      // return a positive value
      return true;
   }//IE_SelectObject()
   
   ////////////////////////////////////////////////////////////////////////////
   //   IE_Warn()
   //      Displays a warning message to the user, then focuses an object
   //
   //   Requires:
   //      obj - The object to focus
   //      msg - The message to display
   //
   //   Returns: Nothing.
   //   Created:
   //      [2003-10-08] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Warn(obj, msg)
   {
      try
      {
         //Display the warning message
         alert(msg);
         
         //Now focus and select the given object
         obj.focus();
         obj.select();
      }//try
      catch(Err)
      {}//catch
   }//IE_Warn()
   
///////////////////////////////////////////////////////////////////////////////
//--- DATE FUNCTIONS --------------------------------------------------------//
///////////////////////////////////////////////////////////////////////////////

   ////////////////////////////////////////////////////////////////////////////
   //   IE_AddDays()
   //      Adds the given number of days to a given DATE object
   //
   //   Requires:
   //      oDate - The JavaScript DATE object
   //      nDays - The number of days to add
   //
   //   Returns: new JavaScript DATE object
   //   Created:
   //      [2003-12-02] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_AddDays(oDate, nDays)
   { return IE_AddHours(oDate, (24 * nDays)); }

   ////////////////////////////////////////////////////////////////////////////
   //   IE_AddHours()
   //      Adds the given number of hours to a given DATE object
   //
   //   Requires:
   //      oDate  - The JavaScript DATE object
   //      nHours - The number of hours to add
   //
   //   Returns: new JavaScript DATE object
   //   Created:
   //      [2003-12-01] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_AddHours(oDate, nHours)
   { return new Date(oDate.getTime() + (3600000 * nHours)); }
   
   ////////////////////////////////////////////////////////////////////////////
   //   IE_AdjustTimeZone()
   //      Adjusts the given date object FROM a given time zone TO a given time
   //      zone
   //
   //   Requires:
   //      oDate   - The JavaScript DATE object
   //      nTZFrom - The time zone to convert FROM
   //      nTZTo   - The time zone to convert TO
   //
   //   Returns: new JavaScript DATE object
   //   Created:
   //      [2003-12-01] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_AdjustTimeZone(oDate, nTZFrom, nTZTo)
   {
      try
      {
         //Get the difference in hours beteen the two given time zone offsets,
         // then call the [IE_AddHours] function to adjust the given date
         // object. Finally, return the new date object
         return IE_AddHours(oDate, (nTZTo - nTZFrom));
      }//try
      catch(Err)
      { return oDate; }
   }//IE_AdjustTimeZone()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_FormatDate()
   //      Formats the given date object based on the given format string
   //
   //   Requires:
   //      oDate       - The date to format
   //      sDateFormat - The format string (e.g. DD-MMM-YY HH:NN:SS)
   //
   //   Returns: A formatted date string
   //   Created:
   //      [2003-11-14] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_FormatDate(oDate, sDateFormat)
   {
      try
      {
         //REQUIRED VARIABLES
         sDateFormat = sDateFormat.toUpperCase();
         var aMonths = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
         var aDays   = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
      
         //First replace the days
         sDateFormat = IE_StringReplace(sDateFormat, "DDD", aDays[oDate.getDay()], true);
         sDateFormat = IE_StringReplace(sDateFormat, "DD",  IE_FormatDigit(oDate.getDate(), 2), true);
      
         //Now replace the months
         sDateFormat = IE_StringReplace(sDateFormat, "MMM", aMonths[oDate.getMonth()], true);
         sDateFormat = IE_StringReplace(sDateFormat, "MM",  IE_FormatDigit((oDate.getMonth() + 1), 2), true);

         //Now replace the years
         var sYear = String(oDate.getFullYear());
         sDateFormat = IE_StringReplace(sDateFormat, "YYYY", sYear, true);
         sDateFormat = IE_StringReplace(sDateFormat, "YYY",  sYear.substring(1,4), true);
         sDateFormat = IE_StringReplace(sDateFormat, "YY",   sYear.substring(2,4), true);

         //Now replace the times
         sDateFormat = IE_StringReplace(sDateFormat, "HH", IE_FormatDigit(oDate.getHours(), 2), true);
         sDateFormat = IE_StringReplace(sDateFormat, "NN", IE_FormatDigit(oDate.getMinutes(), 2), true);
         sDateFormat = IE_StringReplace(sDateFormat, "SS", IE_FormatDigit(oDate.getSeconds(), 2), true);

         //Finally, replace the time zone
         sDateFormat = IE_StringReplace(sDateFormat, "Z", IE_GetUserTimeZoneStr(), true);
      }//try
      catch(Err)
      { sDateFormat = "N/A"; }
      
      //If a failure occured somewhere along the line, "NaN" may show up in the
      // newly created date-time string... If that is the case, show the given
      // date as "N/A"...
      if(sDateFormat.toLowerCase().indexOf("nan") != -1)
         sDateFormat = "N/A";

      //Return the formatted date
      return sDateFormat;
   }//IE_FormatDate()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_GetUserTimeZone()
   //      Retrieves the user's time zone in a format that .NET can understand
   //
   //   Requires: Nothing.
   //   Returns: The .NET time zone
   //   Created:
   //      [2003-11-06] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_GetUserTimeZone()
   { return (new Date()).getTimezoneOffset() / 60 * -1; }

   ////////////////////////////////////////////////////////////////////////////
   //   IE_GetUserTimeZoneStr()
   //      Retrieves the user's time zone in a string format
   //
   //   Requires: Nothing.
   //   Returns: The time zone string
   //   Created:
   //      [2003-11-14] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_GetUserTimeZoneStr()
   {
      var oDate = new Date();
      var sDate = oDate.toString().split(" ");
      return sDate[sDate.length - 2].toUpperCase();
   }//IE_GetUserTimeZoneStr()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_PIDateToDate()
   //      Converts a given PIDate string to a JavaScript DATE object
   //
   //   Requires: [sPIDate] the PIDate string
   //   Returns: [oDate] the JavaScript DATE object
   //   Created:
   //      [2004-06-02] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_PIDateToDate(sPIDate)
   {
      //REQUIRED VARIABLES
      var aMonths = new Array("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");
      var nMonth = 1;
      var sYear;
      
      //Ensure the given PIDate is all lower case
      sPIDate = sPIDate.toLowerCase();
      
      //Split the PI Date into two parts: DATE and TIME... (Also, make sure that
      // the DATE portion is further split into its elements: DAY, MONTH, and
      // YEAR)
      var aDate = sPIDate.split(" ")[0].split("-");
      var sTime = sPIDate.split(" ")[1];
      
      //Iterate through all of the items in the "Months" array to find the month
      // that matches the one in the "PIDate" string...
      for(var nLoop = 0; nLoop < aMonths.length; nLoop++)
      {
         //If the "month" portion of the "PIDate" string matches the month in
         // our array at this index, remember this index as it is the month
         // number... In other words, if the PIDate says it is "AUG", then the
         // matching entry in the month array is "7" (0-based)...
         if(aMonths[nLoop] == aDate[1])
         {
            nMonth = (nLoop + 1); //Convert to a 1-based entry (7 -> 8)
            break;
         }//if
      }//for
      
      //Ensure that the year is 4 digets... We'll assume that 60 and above means
      // "1960" and up, while all other numbers are in the 21st century...
      if(Number(aDate[2]) > 60) sYear = "19" + aDate[2];
      else sYear = "20" + aDate[2];

      //Create the new date object and return it...
      return new Date(nMonth + "/" + aDate[0] + "/" + sYear + " " + sTime);
   }//IE_PIDateToDate()

///////////////////////////////////////////////////////////////////////////////
//--- FORMATTING FUNCTIONS --------------------------------------------------//
///////////////////////////////////////////////////////////////////////////////

   ////////////////////////////////////////////////////////////////////////////
   //   IE_FormatDigit()
   //      Ensures that the given number has a certain number of numbers... :)
   //      So if you pass the number "3", and you want 4 digits, this function
   //      will return "0003".
   //
   //   Requires:
   //      nNumber - Number to format
   //      nSize   - The number of digits it should have
   //
   //   Returns: The formatted number
   //   Created:
   //      [2003-11-14] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_FormatDigit(nNumber, nSize)
   {
      //Get the number of digits this number alreay has...
      var nCurrentSize = String(nNumber).length;
      
      //Add the number of required digits...
      for(var nLoop = 0; nLoop < (nSize - nCurrentSize); nLoop++)
         nNumber = "0" + nNumber;
      
      //Return the created number
      return nNumber;
   }//IE_FormatDigit()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_FormatNumber()
   //      Formats a given value to the given decimal points
   //
   //   Requires:
   //      sValue    - The value to format
   //      nDecimals - The number of decimals the value will have
   //      bCommas   - [true] show commas
   //
   //   Returns: The formatted value
   //   Created:
   //      [2003-11-06] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_FormatNumber(sValue, nDecimals, bCommas)
   {
      //First, make sure the value is a number...
      if(isNaN(sValue) == true)
         return sValue;
         
      //Round the number before giving decimals...
      sValue = IE_ToNumber(sValue) * Math.pow(10, nDecimals);
      sValue = Math.round(sValue);
      sValue = sValue / Math.pow(10, nDecimals);
      
      //Split the given value at the decimal point (imagine the number is
      // "3.245"... So there is now an array with TWO entries. The first is "3"
      // and the second is "245"...
      var aValue = String(sValue).split(".");
      
      //Make sure there is a decimal place in this number even if the value has
      // no decimal at all... So if the given number is simply "5", make sure
      // that this function sees it as "5.0"...
      if(aValue.length < 2)
         aValue[1] = "0";
      
      //Now begin the creation of the new value. This line ensure that the
      // WHOLE NUMBER portion of the given number is placed into the new value.
      // (So our number currently looks like this: "3")
      sValue = aValue[0];
      
      //If the user wants to show commas in the number, do so now...
      if(bCommas == true)
      {
         //In order to enter the commas properly, the number has to be
         // traversed backwards... This produces a side-effect of the number
         // coming out backwards... So if we inverse the value now, it will be
         // re-inversed and come out looking normal... Kinda like a photo...
         var sTemp = "";
         for(var nLoop = (sValue.length - 1); nLoop >= 0; nLoop--)
            sTemp += sValue.charAt(nLoop);
         sValue = sTemp;
         
         //Now add the commas
         sTemp = "";
         for(var nLoop = (sValue.length - 1); nLoop >= 0; nLoop--)
         {
            sTemp += sValue.charAt(nLoop);
            if(((nLoop % 3) == 0) && (nLoop != 0))sTemp += ",";
         }//for
         sValue = sTemp;
      }//if
      
      //Now make a loop that runs as many times as the number of decimals
      // requested. So if the user wants 1 decimal, this loop will run just
      // one time...
      for(var nLoop = 0; nLoop < nDecimals; nLoop++)
      {
         //If this is the first iteration through the loop, make sure you add
         // the decimal point to the value... (so our number now looks like
         // this: "3.")...
         if(nLoop == 0) sValue += ".";
         
         //Now get the next diget out of the decimal section of the created
         // array... If there is no number at this index, a zero will be put in
         // its place...
         if(aValue[1].length > nLoop)
            sValue += aValue[1].charAt(nLoop);
         else
            sValue += "0";
      }//for

      if(String(sValue).charAt(0) == ".")
         sValue = "0" + sValue;

      //Return the formatted number
      return sValue;
   }//IE_FormatNumber()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_StringReplace()
   //      Replaces a given string with a given string in a given string! :)
   //
   //   Requires:
   //      sString        - The actual string
   //      sOld           - The string to search for and replace
   //      sNew           - The new string to put in place of the old
   //      bCaseSensitive - [true] case sensitive
   //
   //   Side Effects:
   //      Setting the [bCaseSensitive] variable to [false] will convert the
   //      entire string to lowercase
   //
   //   Returns: A new string
   //   Created:
   //      [2003-11-14] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_StringReplace(sString, sOld, sNew, bCaseSensitive)
   {
      //Make everything lowercase if case sensitivity is off
      if(bCaseSensitive == false)
      {
         sOld = sOld.toLowerCase();
         sNew = sNew.toLowerCase();
         sString = sString.toLowerCase();
      }//if
      
      //Do the replacement
      var reOld = new RegExp(sOld, "g");
      return sString.replace(reOld, sNew);
   }//IE_StringReplace()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_ToNumber()
   //      Converts a given variable to a number
   //
   //   Requires: [sValue] the variable to convert
   //   Returns: The converted variable
   //   Created:
   //      [2003-11-06] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_ToNumber(sValue)
   {
      try
      {
         //Make sure the given variable can be converted to a number...
         if((!IE_ValidateNumber(sValue, false)) || (sValue == "0"))
            return 0;
         return Number(sValue);
      }//try
      catch(Err)
      { return 0; }
   }//IE_ToNumber()
   
   ////////////////////////////////////////////////////////////////////////////
   //   IE_Trim()
   //      Trims the spaces off the start of the given text
   //
   //   Requires: [sText] the variable to trim
   //   Returns: The converted variable
   //   Created:
   //      [2004-01-20] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Trim(sText)
   {
      try
      {
         //Trim the spaces off the start of the string...
         do
         {
            if(sText.charAt(0) == " ")
               sText = sText.substring(1, sText.length);
         }while(sText.charAt(0) == " ");
         
         //Trim the spaces off the end of the string...
         do
         {
            if(sText.charAt(sText.length - 1) == " ")
               sText = sText.substring(0, (sText.length - 1));
         }while(sText.charAt(sText.length - 1) == " ");

         //Return the edited string
         return sText;
      }//try
      catch(Err)
      { return sText; }
   }//IE_Trim()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_ValidateNumber()
   //      Validates a given variable as a number
   //
   //   Requires:
   //      sValue            - The variable to validate
   //      bCheckForNegative - If [true] the value is checked to ensure a
   //                          positive value
   //
   //   Returns: [true] the the variable is a valid number
   //   Created:
   //      [2003-11-17] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_ValidateNumber(sValue, bCheckForNegative)
   {
      try
      {
         //Make sure the given variable can be converted to a number...
         if(isNaN(sValue) == true)
            return false;
         
         //If requested, ensure the value is positive...
         if((bCheckForNegative == true) && (sValue != "0") && (Number(sValue) < 0))
            return false;
         
         //If you got this far, the value is good, so return a positive value
         return true;
      }//try
      catch(Err)
      { return 0; }
   }//IE_ValidateNumber()

///////////////////////////////////////////////////////////////////////////////
//--- WEB SERVICE FUNCTIONS -------------------------------------------------//
///////////////////////////////////////////////////////////////////////////////

   function IE_WService_Init(obj, url)
   {
      try
      { obj.useService(document.location.protocol + "//" + document.location.host + url + "?WSDL", "wsSend"); }
      catch(Err)
      {}//catch
   }//IE_WService_Init()
   
   function IE_WService_VoidFn(result)
   {
      //If there was an error, display it...
      if(result.error)
      {
         var sAlert = "There was an error submitting your request.";
         sAlert    += "\r\n   Code:   " + result.errorDetail.code;
         sAlert    += "\r\n   String: " + result.errorDetail.string;
         sAlert    += "\r\n   Raw:    " + result.errorDetail.raw;
         sAlert    += "\r\n   Time:   " + (new Date());
         alert(sAlert);
      }//if
   }//IE_WService_VoidFn()

///////////////////////////////////////////////////////////////////////////////
//--- WINDOW LAUNCHING FUNCTIONS --------------------------------------------//
///////////////////////////////////////////////////////////////////////////////
	
	////////////////////////////////////////////////////////////////////////////
   //   IE_Show_BuzzMe3()
   //      Launches the BuzzMe dialog
   //
   //   Requires: [sPITag] The PI tag for which to launch BuzzMe (optional)
   //   Returns: Nothing.
   //   Created:
   //      [2003-12-22] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_BuzzMe3(sPITag, sDensity)
   {
      try
      { window.showModalDialog(_URL_BuzzMe3 + "?tag=" + sPITag + "&density=" + sDensity, window, "dialogWidth:460pt; dialogHeight:500px; center:yes; resizable:no; scroll:no; status:no; help:no;"); }
      catch(Err)
      {}//catch
   }//IE_Show_BuzzMe()
   
   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_BuzzMe()
   //      Launches the BuzzMe dialog
   //
   //   Requires: [sPITag] The PI tag for which to launch BuzzMe (optional)
   //   Returns: Nothing.
   //   Created:
   //      [2004-06-24] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_BuzzMe(sPITag)
   {
      try
      { window.showModalDialog(_URL_BuzzMe + "?tag=" + sPITag, new Array(String(window.location)), "scroll:0; center:1; dialogHeight:420px; dialogWidth:525px; status:0; help:0;"); }
      catch(Err)
      {}//catch
   }//IE_Show_BuzzMe()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_TagSearch()
   //      Displays the tag search popup dialog
   //
   //   Requires: [bMultiTags] [true] indicates multiple tags can be returned
   //   Returns: Nothing.
   //   Created:
   //      [2003-12-18] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_TagSearch(bMultiTags)
   {
      try
      { return window.showModalDialog(_URL_TagSearch, new Array(bMultiTags), "scroll:0; center:1; dialogWidth:550px; dialogHeight:465px; status:0; help:0;"); }
      catch(Err)
      {}//catch
   }//IE_Show_TagSearch()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_ColorDialog()
   //      Launches the windows color dialog to obtain a user-defined color
   //
   //   Requires:
   //      oColorDlg - The color dialog object
   //      sOrgColor - The currently selected color
   //
   //   Returns: Nothing.
   //   Created:
   //      [2003-12-11] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_ColorDialog(oColorDlg, sOrgColor)
   {
      try
      {
         //Launch the color dialog... The dialog object must already exist on the
         // page for this to work...
         var sColor = oColorDlg.ChooseColorDlg(sOrgColor);
      
         //Change the return value from a decimal value to a hex value and make
         // sure the value has 6 digits to represent the RRGGBB schema required by
         // the color table
	      sColor = sColor.toString(16);
	      if(sColor.length < 6)
	      {
	         var sTempString = "000000".substring(0, (6 - sColor.length));
	         sColor = sTempString.concat(sColor);
	      }//if
   	
	      //Return the HEXIDECIMAL COLOR...
	      return sColor;
	   }//try
	   catch(Err)
	   { return sOrgColor; }
   }//IE_Show_ColorDialog()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_Feedback()
   //      Displays the User Feedback window
   //
   //   Requires: Nothing.
   //   Returns: Nothing.
   //   Created:
   //      [2004-07-26] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_Feedback()
   {
      try
      { window.showModalDialog(_URL_Feedback, null, "scroll:0; center:1; dialogHeight:383px; dialogWidth:497px; status:0; help:0; resizable:0;"); }
      catch(Err)
      {}//catch
   }//IE_Show_Feedback()

   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_Help()
   //      Displays the dynamic help dialog with the given information
   //
   //   Requires: [sType] the type of help to display
   //   Returns: Nothing.
   //   Created:
   //      [2003-10-08] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_Help(sHelpItem)
   {
      try
      { 
      window.open(_URL_DynamicHelp + "?helpitem=" + sHelpItem, null, "scrollbars=no,Height=459px,Width=635px,status=0,resizable=0"); 
      }
      catch(Err){ }//catch
   }//IE_Show_Help()
   
   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_Registration()
   //      Displays the online User Registration window
   //
   //   Requires: Nothing.
   //   Returns: Nothing.
   //   Created:
   //      [2004-07-26] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_Registration()
   {
      try
      { window.showModalDialog(_URL_Registration, null, "scroll:0; center:1; dialogHeight:383px; dialogWidth:497px; status:0; help:0; resizable:0;"); }
      catch(Err)
      {}//catch
   }//IE_Show_Registration()
   
   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_ContactUs()
   //      Displays the Contact Us window
   //
   //   Requires: Nothing.
   //   Returns: Nothing.
   //   Created:
   //      [2004-07-26] Christine Henry - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_ContactUs()
   {
      try
      { window.showModalDialog(_URL_ContactUs, null, "scroll:0; center:1; dialogHeight:383px; dialogWidth:497px; status:0; help:0; resizable:0;"); }
      catch(Err)
      {}//catch
   }//IE_Show_Feedback()
   
   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_SystemRequirements()
   //      Displays the System Requirements window
   //
   //   Requires: Nothing.
   //   Returns: Nothing.
   //   Created:
   //      [2003-10-08] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_SystemRequirements()
   {
      try
      { window.showModalDialog(_URL_SystemRequirements, null, "scroll:0; center:1; dialogHeight:383px; dialogWidth:497px; status:0; help:0; resizable:1;"); }
      catch(Err)
      {}//catch
   }//IE_Show_SystemRequirements()
   
   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_ForgotPassword()
   //      Displays the "Forgot your Password?" window
   //
   //   Requires: Nothing.
   //   Returns: Nothing.
   //   Created:
   //      [2003-10-08] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_ForgotPassword()
   {
      try
      { window.showModalDialog(_URL_ForgotPassword, null, "scroll:0; center:1; dialogHeight:383px; dialogWidth:497px; status:0; help:0;"); }
      catch(Err)
      {}//catch
   }//IE_Show_ForgotPassword()
   
   ////////////////////////////////////////////////////////////////////////////
   //   IE_Show_SingleCalendar()
   //      Displays the single calendar popup dialog
   //
   //   Requires: [bShowTime] [true] indicates times will be shown
   //   Returns: Nothing.
   //   Created:
   //      [2003-11-18] Sven Batalla - Initial Version
   ////////////////////////////////////////////////////////////////////////////
   function IE_Show_SingleCalendar(bShowTime)
   {
      try
      {
         var nHeight = ((bShowTime == true)?452:405);
         return window.showModalDialog(_URL_SingleCalendar, bShowTime, "scroll:0; center:1; dialogWidth:500px; dialogHeight:" + nHeight + "px; status:0; help:0;");
      }//try
      catch(Err)
      {}//catch
   }//IE_ShowSingleCalendar()