(4530,178,0.62,'smarty','0','getting closer.',1130300387,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.surveyId}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"button\" value=\"Load\" onclick=\"promptSurveyLoad();\" />\r\n<br /><br />\r\n\r\n<h2 id=\"editor-title\">Creating A New Survey</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"\" /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"\" /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n          <option value=\"Daily\">Daily</option>          \r\n          <option value=\"Weekly\">Weekly</option>\r\n          <option value=\"Monthly\">Monthly</option>          \r\n          <option value=\"Annually\">Annually</option>\r\n          <option value=\"Once\">Once</option>\r\n          <option value=\"No Limit\">No Limit</option>\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>          \r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea name=\"survey[instructions]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea name=\"survey[instructions]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\"><input type=\"button\" value=\"Save Changes\" /> <input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" /></div>\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-notification\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function promptSurveyLoad() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey (Survey Name)\';\r\n    xClose(\'questions-editor\'); \r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function updateTitle() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n{/literal}</script>'),(4533,178,0.65,'smarty','0','getting closer.',1130301143,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.surveyId}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"button\" value=\"Load\" onclick=\"promptSurveyLoad();\" />\r\n<br /><br />\r\n\r\n<h2 id=\"editor-title\">Creating A New Survey</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"\" /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"\" /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n          <option value=\"Daily\">Daily</option>          \r\n          <option value=\"Weekly\">Weekly</option>\r\n          <option value=\"Monthly\">Monthly</option>          \r\n          <option value=\"Annually\">Annually</option>\r\n          <option value=\"Once\">Once</option>\r\n          <option value=\"No Limit\">No Limit</option>\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\">{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea name=\"survey[instructions]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea name=\"survey[instructions]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\"><input type=\"button\" value=\"Save Changes\" /> <input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" /></div>\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-notification\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function promptSurveyLoad() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey (Survey Name)\';\r\n    xClose(\'questions-editor\'); \r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function updateTitle() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n{/literal}</script>'),(4535,178,0.67,'smarty','0','getting closer.',1130302120,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.surveyId}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n<br /><br />\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\"><input type=\"button\" value=\"Save Changes\" /> <input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" /></div>\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-notification\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function promptSurveyLoad() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey (Survey Name)\';\r\n    xClose(\'questions-editor\'); \r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function updateTitle() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n{/literal}</script>'),(4537,178,0.69,'smarty','0','getting closer.',1130302315,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.surveyId}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\"><input type=\"button\" value=\"Save Changes\" /> <input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" /></div>\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-notification\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function promptSurveyLoad() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey (Survey Name)\';\r\n    xClose(\'questions-editor\'); \r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function updateTitle() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n{/literal}</script>'),(4539,178,0.71,'smarty','0','getting closer.',1130303903,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.surveyId}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\"><input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" /></div>\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-notification\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function promptSurveyLoad() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: (Survey Name)\';\r\n    xClose(\'questions-editor\'); \r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n{/literal}</script>'),(4540,178,0.72,'smarty','0','getting closer.',1130304816,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.surveyId}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n{/literal}</script>'),(4541,178,0.73,'smarty','0','getting closer.',1130304907,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.surveyId}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4542,178,0.74,'smarty','0','getting closer.',1130310233,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\" onchange=\"\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.surveyId}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4543,178,0.75,'smarty','0','getting closer.',1130310543,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.surveyId}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4544,178,0.76,'smarty','0','getting closer.',1130310571,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4545,178,0.77,'smarty','0','getting closer.',1130310687,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\"></textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\"></textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\"></textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    <input type=\"button\" value=\"Save\" />\r\n    <input type=\"button\" value=\"Save As Next\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4546,178,0.78,'smarty','0','getting closer.',1130478310,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aQuestion.$qAlpha}\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aQuestion.$valueAlpha}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{$aQuestion.$feedbackAlpha}</textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4547,178,0.79,'smarty','0','getting closer.',1130478387,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion.$valueAlpha}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{$aLoadedQuestion.$feedbackAlpha}</textarea><br /><br /></td>\r\n  </tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4548,178,0.80,'smarty','0','getting closer.',1130479339,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion.$valueAlpha}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{$aLoadedQuestion.$feedbackAlpha}</textarea><br /><br /></td>\r\n  </tr>\r\n{if !$smarty.foreach.qAlpha.last}\r\n  <tr id=\"add-next-question_{$qAlpha}\">\r\n    <td colpan=\"2\"><input type=\"button\" value=\"Add Option [{$aQs[$smarty.foreach.iteration]}]\" /></td>\r\n  </tr>\r\n{/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4549,178,0.81,'smarty','0','getting closer.',1130479430,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}\r\n  <tr>\r\n    <td><b>Option {$qAlpha}</b>:</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" /> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion.$valueAlpha}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{$aLoadedQuestion.$feedbackAlpha}</textarea><br /><br /></td>\r\n  </tr>\r\n{if !$smarty.foreach.qAlpha.last}\r\n  <tr id=\"add-next-question_{$qAlpha}\">\r\n    <td colpan=\"2\"><input type=\"button\" value=\"Add Option [{$aQs[$smarty.foreach.qAlpha.iteration]}]\" /></td>\r\n  </tr>\r\n{/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4550,178,0.82,'smarty','0','q',1130480406,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=$aQs[$smarty.foreach.qAlpha.iteration]}\r\n  <tr id=\"question-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha} style=\"display:none;\"{/if}>\r\n    <td><b>Option {$qAlpha}</b>:<br /><br />{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<input type=\"button\" value=\"Add Feedback\" onclick=\"document.getElementById(\'feedback-row_{$qAlpha}\').style.display=\'block\';this.style.display=\'none\';\" />{/if}</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.loop.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion.$valueAlpha}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr id=\"feedback-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion.$feedbackAlpha} style=\"display:none;\"{/if}>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.$feedbackAlpha}</textarea></td>\r\n  </tr>\r\n{if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion.$qAlphaNext}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{}]\" style=\"display:none;\" /></td>\r\n  </tr>\r\n{/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4551,178,0.83,'smarty','0','q',1130480454,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=$aQs[$smarty.foreach.qAlpha.iteration]}\r\n  <tr id=\"question-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha} style=\"display:none;\"{/if}>\r\n    <td><b>Option {$qAlpha}</b>:<br /><br />{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<input type=\"button\" value=\"Add Feedback\" onclick=\"document.getElementById(\'feedback-row_{$qAlpha}\').style.display=\'block\';this.style.display=\'none\';\" />{/if}</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion.$valueAlpha}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr id=\"feedback-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion.$feedbackAlpha} style=\"display:none;\"{/if}>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.$feedbackAlpha}</textarea></td>\r\n  </tr>\r\n{if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion.$qAlphaNext}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{}]\" style=\"display:none;\" /></td>\r\n  </tr>\r\n{/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4552,178,0.84,'smarty','0','q',1130480589,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n<tr><td colspan=2>{$qAlphaNext}</td></tr>\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4553,178,0.85,'smarty','0','q',1130480893,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr id=\"question-row_{$qAlpha}\"{if !$aLoadedQuestion[$qAlpha]} style=\"display:none;\"{/if}>\r\n    <td><b>Option {$qAlpha}</b>:<br /><br />{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<input type=\"button\" value=\"Add Feedback\" onclick=\"document.getElementById(\'feedback-row_{$qAlpha}\').style.display=\'block\';this.style.display=\'none\';\" />{/if}</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr id=\"feedback-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]} style=\"display:none;\"{/if}>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion[$qAlphaNext]}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{}]\" style=\"display:none;\" /></td>\r\n  </tr>\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4554,178,0.86,'smarty','0','q',1130481134,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr id=\"question-row_{$qAlpha}\"{if !$aLoadedQuestion[$qAlpha]} style=\"display:none;\"{/if}>\r\n    <td><b>Option {$qAlpha}</b>:<br /><br />{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<input type=\"button\" value=\"Add Feedback\" onclick=\"document.getElementById(\'feedback-row_{$qAlpha}\').style.display=\'block\';this.style.display=\'none\';\" />{/if}</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr id=\"feedback-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]} style=\"display:none;\"{/if}>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion[$qAlphaNext]}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" style=\"display:none;\" /></td>\r\n  </tr>\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4555,178,0.87,'smarty','0','q',1130481287,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr id=\"question-row_{$qAlpha}\"{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]} style=\"display:none;\"{/if}>\r\n    <td><b>Option {$qAlpha}</b>:<br /><br />{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<input type=\"button\" value=\"Add Feedback\" onclick=\"document.getElementById(\'feedback-row_{$qAlpha}\').style.display=\'block\';this.style.display=\'none\';\" />{/if}</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr id=\"feedback-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]} style=\"display:none;\"{/if}>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion[$qAlphaNext]}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" style=\"display:none;\" /></td>\r\n  </tr>\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4556,178,0.88,'smarty','0','q',1130481345,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr id=\"question-row_{$qAlpha}\"{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]} style=\"display:none;\"{/if}>\r\n    <td><b>Option {$qAlpha}</b>:<br /><br />{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<input type=\"button\" value=\"Add Feedback\" onclick=\"document.getElementById(\'feedback-row_{$qAlpha}\').style.display=\'inline\';this.style.display=\'none\';\" />{/if}</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr id=\"feedback-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]} style=\"display:none;\"{/if}>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion[$qAlphaNext]}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" style=\"display:none;\" /></td>\r\n  </tr>\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4557,178,0.89,'smarty','0','q',1130482124,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr id=\"question-row_{$qAlpha}\"{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]} style=\"display:none;\"{/if}>\r\n    <td><b>Option {$qAlpha}</b>:<br /><br />{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<input type=\"button\" value=\"Add Feedback\" onclick=\"xGetElementById(\'feedback-row_{$qAlpha}\').style.display=\'inline\';this.style.display=\'none\';\" />{/if}</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr id=\"feedback-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]} style=\"display:none;\"{/if}>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion[$qAlphaNext]}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"xGetElementById(\'question-row_{$qAlphaNext}\').style.display=\'block\';this.style.display=\'none\';\" {if shownAddButton}style=\"display:none;\" {/if}/></td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4558,178,0.90,'smarty','0','q',1130482272,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr id=\"question-row_{$qAlpha}\"{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]} style=\"visibility:hidden;\"{/if}>\r\n    <td><b>Option {$qAlpha}</b>:<br /><br />{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<input type=\"button\" value=\"Add Feedback\" onclick=\"xGetElementById(\'feedback-row_{$qAlpha}\').style.visibility=\'visible\';this.style.display=\'none\';\" />{/if}</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr id=\"feedback-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]} style=\"visibility:hidden;\"{/if}>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion[$qAlphaNext]}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"xGetElementById(\'question-row_{$qAlphaNext}\').style.visibility=\'visible\';this.style.display=\'none\';\" {if shownAddButton}style=\"display:none;\" {/if}/></td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4559,178,0.91,'smarty','0','q',1130482442,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr id=\"question-row_{$qAlpha}\"{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]} style=\"visibility:hidden;\"{/if}>\r\n    <td><b>Option {$qAlpha}</b>:<br /><br />{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<input type=\"button\" value=\"Add Feedback\" onclick=\"xGetElementById(\'feedback-row_{$qAlpha}\').style.visibility=\'visible\';this.style.display=\'none\';\" />{/if}</td>\r\n    <td><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></td>\r\n  </tr>\r\n  <tr id=\"feedback-row_{$qAlpha}\"{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]} style=\"visibility:hidden;overflow:hidden;\"{/if}>\r\n    <td valign=\"top\"><b>Feedback</b>:</td>\r\n    <td><textarea name=\"question[feedbackA]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion[$qAlphaNext]}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"xGetElementById(\'question-row_{$qAlphaNext}\').style.visibility=\'visible\';this.style.display=\'none\';\" {if shownAddButton}style=\"display:none;\" {/if}/></td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4560,178,0.92,'smarty','0','q',1130483569,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><br /><input type=\"button\" value=\"Add Feedback\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last AND !$aLoadedQuestion[$qAlphaNext]}\r\n  <tr>\r\n    <td colpan=\"2\">&nbsp;<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"xGetElementById(\'question-row_{$qAlphaNext}\').style.visibility=\'visible\';this.style.display=\'none\';\" {if shownAddButton}style=\"display:none;\" {/if}/></td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display=\'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display=\'inline\';\r\n    e.style.display=\'none\';\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4561,178,0.93,'smarty','0','q',1130484003,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><br /><input type=\"button\" value=\"Add Feedback\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last && }\r\n  <tr>\r\n    <td colpan=\"2\">{if !$shownAddButton}&nbsp;{/if}<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" /></td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display=\'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display=\'inline\';\r\n    e.style.display=\'none\';\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4562,178,0.94,'smarty','0','q',1130484015,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><br /><input type=\"button\" value=\"Add Feedback\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last}\r\n  <tr>\r\n    <td colpan=\"2\">{if !$shownAddButton}&nbsp;{/if}<input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" /></td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display=\'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display=\'inline\';\r\n    e.style.display=\'none\';\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4563,178,0.95,'smarty','0','q',1130484262,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><br /><input type=\"button\" value=\"Add Feedback\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last}\r\n  <tr>\r\n    <td colpan=\"2\"><input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"showQuestion(this,\'{$qAlphaNext}\');\" {if $shownAddButton}style=\"display:none;\" {/if} />{if !$shownAddButton}&nbsp;{/if}</td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n  }\r\n\r\n  function showNextQuestion(e, qAlpha) {\r\n    xGetElementById(\'question-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'question-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    this.style.display = \'none\';\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4564,178,0.96,'smarty','0','q',1130484429,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><br /><input type=\"button\" value=\"Add Feedback\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last}\r\n  <tr>\r\n    <td colpan=\"2\"><input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"showQuestion(this,\'{$qAlphaNext}\');\" {if $shownAddButton OR $aLoadedQuestions[$qAlphaNext]}style=\"display:none;\" {/if} />{if !$shownAddButton}&nbsp;{/if}</td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n  }\r\n\r\n  function showQuestion(e, qAlpha) {\r\n    xGetElementById(\'question-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'question-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    this.style.display = \'none\';\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4566,178,0.98,'smarty','0','q',1130484869,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><input type=\"button\" value=\"Add Feedback\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td valign=\"top\"><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last}\r\n  <tr>\r\n    <td colpan=\"2\"><input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"showQuestion(this,\'{$qAlphaNext}\');\" {if $shownAddButton OR $aLoadedQuestions[$qAlphaNext]}style=\"display:none;\" {/if} />{if !$shownAddButton}&nbsp;{/if}</td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n  }\r\n\r\n  function showQuestion(e, qAlpha) {\r\n    alert (qAlpha);\r\n    xGetElementById(\'question-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'question-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    this.style.display = \'none\';\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4568,178,1.00,'smarty','0','q',1130485014,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><br /><input type=\"button\" value=\"Add Feedback [{$qAlpha}]\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td valign=\"top\"><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last}\r\n  <tr>\r\n    <td colpan=\"2\"><input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"showQuestion(this,\'{$qAlphaNext}\');\" {if $shownAddButton OR $aLoadedQuestions[$qAlphaNext]}style=\"display:none;\" {/if} />{if !$shownAddButton}&nbsp;{/if}</td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n  }\r\n\r\n  function showQuestion(e, qAlpha) {\r\n    alert (qAlpha);\r\n    xGetElementById(\'question-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'question-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    this.style.display = \'none\';\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4570,178,1.02,'smarty','0','q',1130485602,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><br /><input id=\"add-feedback-button_{$qAlpha}\" type=\"button\" value=\"Add Feedback [{$qAlpha}]\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td valign=\"top\"><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea id=\"feedback_{$qAlpha}\" name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last}\r\n  <tr>\r\n    <td colpan=\"2\"><input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"showQuestion(this,\'{$qAlphaNext}\');\" {if $shownAddButton OR $aLoadedQuestions[$qAlphaNext]}style=\"display:none;\" {/if} />{if !$shownAddButton}&nbsp;{/if}</td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n  }\r\n\r\n  function showQuestion(e, qAlpha) {\r\n    xGetElementById(\'question-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'question-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n    if (xGetElementById(\'feedback_\'+qAlpha).value) {\r\n      xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n      xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    } else {\r\n      xGetElementById(\'add-feedback-button_\'+qAlpha).style.display = \'inline\';\r\n    }\r\n    if (nextQuestionButton = xGetElementById(\'add-next-question-button_\'+qAlpha)) {\\\r\n      nextQuestionButton.style.display = \'inline\';\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4572,178,1.04,'smarty','0','q',1130486117,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><br /><input id=\"add-feedback-button_{$qAlpha}\" type=\"button\" value=\"Add Feedback [{$qAlpha}]\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td valign=\"top\"><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea id=\"feedback_{$qAlpha}\" name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last}\r\n  <tr>\r\n    <td colpan=\"2\"><input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"showQuestion(this,\'{$qAlphaNext}\');\" {if $shownAddButton OR $aLoadedQuestions[$qAlphaNext]}style=\"display:none;\" {/if} alt=\"{$qAlphaNext}:{$aLoadedQuestions[$qAlphaNext]}\" />{if !$shownAddButton}&nbsp;{/if}</td>\r\n  </tr>{assign var=\"shownAddButton\" value=1}\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n  }\r\n\r\n  function showQuestion(e, qAlpha) {\r\n    xGetElementById(\'question-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'question-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n    if (xGetElementById(\'feedback_\'+qAlpha).value) {\r\n      xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n      xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    } else {\r\n      xGetElementById(\'add-feedback-button_\'+qAlpha).style.display = \'inline\';\r\n    }\r\n    if (nextQuestionButton = xGetElementById(\'add-next-question-button_\'+qAlpha)) {\r\n      nextQuestionButton.style.display = \'inline\';\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4574,178,1.06,'smarty','1','q',1130486465,3,'67.172.226.76','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{include_php file=\"shared_handle:company_management/survey_wizard\"}\r\n\r\n<h1>Survey Wizard</h1>\r\n<p><i>Under Construction, please be patient.</i></p>\r\n<form method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n<select name=\"load_survey_id\">\r\n  <option value=\"\" style=\"font-weight:bold;\">- SELECT SURVEY TO UPDATE -</option>\r\n {foreach from=$aCompanySurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n  <option value=\"\" style=\"font-weight:bold;\">- GLOBAL SURVEYS -</option>\r\n {foreach from=$aGlobalSurveys item=survey}\r\n  <option value=\"{$survey.id}\">{$survey.surveyName}</option>\r\n {/foreach}\r\n</select> <input type=\"submit\" value=\"Load\" />\r\n</form>\r\n\r\n{* display var=$aLoadedSurvey *}\r\n\r\n<h2 id=\"editor-title\">{if $aLoadedSurvey.surveyName}Editing: <b>{$aLoadedSurvey.surveyName}</b>{else}Creating A New Survey{/if}</h2>\r\n<blockquote>\r\n  <table><tr><td valign=\"top\" align=\"center\">\r\n  <a href=\"javascript:xOpen(\'icon-change-div\');\"><img id=\"survey-icon\" class=\"sIco ico{$aLoadedSurvey.icon|default:\"Survey\"}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small>change</small></a>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  {assign_array var=\"aIcons\" values=\"Carrots,Weights,Jumper,Nurse,Stethescope,Medal,Click,Scantron\"}\r\n  {foreach from=$aIcons item=\"ico\"}\r\n    <a href=\"javascript:setIcon(\'{$ico}\');\"><img class=\"sIco ico{$ico}\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /></a>\r\n  {/foreach}\r\n</div>\r\n\r\n<div id=\"survey-editor\">\r\n  <input type=\"checkbox\" name=\"survey[isActive]\" value=\"1\"{if $aLoadedSurvey.isActive eq \'Yes\'} checked=\"checked\"{/if} /> <b>Enable this survey?</b> <small>Available to be taken once saved.</small><br />\r\n  <input type=\"checkbox\" name=\"survey[isIncentivePoints]\" value=\"1\"{if $aLoadedSurvey.isIncentivePoints eq \'Yes\'} checked=\"checked\"{/if} /> <b>Incentive points?</b> <small>Total score will be added to incentive points.</small><br />\r\n  <hr />\r\n  <table align=\"center\" border=\"0\" style=\"margin-left:10px;\">\r\n  <tr>\r\n    <td><b>Survey Name</b>:</td>\r\n    <td><input id=\"survey-name\" type=\"text\" onchange=\"setChanged(\'s\');\" size=\"45\" maxlength=\"64\" name=\"survey[surveyName]\" value=\"{$aLoadedSurvey.surveyName}\" onkeypress=\"titleUpdate();\" /> &nbsp; \r\n      <b>Base Value</b>: <input type=\"text\" onchange=\"setChanged(\'s\');\" size=\"4\" maxlength=\"5\" name=\"survey[baseValue]\" value=\"{$aLoadedSurvey.baseValue}\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td><b>Frequency</b>:</td>\r\n    <td><select name=\"survey[frequency]\">\r\n{assign_array var=\"aFrequencies\" values=\"Daily,Weekly,Monthly,Annually,Once,No Limit\"}\r\n         {foreach from=$aFrequencies item=frequency}\r\n          <option onchange=\"setChanged(\'s\');\" value=\"{$frequency}\"{if $frequency eq $aLoadedSurvey.frequency} selected=\"selected{/if}>{$frequency}</option>\r\n         {/foreach}\r\n        </select> &nbsp; \r\n        <b>Category</b>: <select name=\"survey[categoryId]\" onchange=\"setChanged(\'s\');\">\r\n          <option value=\"\">- SELECT A CATEGORY -</option>\r\n         {foreach from=$aSurveyCategories item=category}\r\n          <option value=\"{$category.id}\"{if $category.id eq $aLoadedSurvey.surveyCategoryId} selected=\"selected\"{/if}>{$category.name}</option> \r\n         {/foreach}\r\n        </select></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Instructions:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[instructions]\" rows=\"3\" cols=\"50\">{$aLoadedSurvey.instructions}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Completion:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'s\');\" name=\"survey[completionText]\" rows=\"2\" cols=\"50\">{$aLoadedSurvey.completionText}</textarea><br />\r\n      <small>A brief &quot;Thank You&quot; message after survey has been finished.</small><br /><br /></td>\r\n  </tr>\r\n  </table>\r\n\r\n  <div align=\"center\">\r\n    <b style=\"color:red;\" id=\"survey-save-alert\" style=\"display:none;\">* Survey updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Save Changes\" /> {if $aLoadedSurvey.surveyName}<input type=\"button\" value=\"Save As New\" /> {/if}<input id=\"questions-editor-button\" type=\"button\" value=\"Edit Questions\" onclick=\"editQuestions();\" />\r\n  </div>\r\n\r\n</div>\r\n\r\n<div id=\"questions-editor\" style=\"display:none;\">\r\n<table align=\"center\">\r\n  <tr>\r\n    <td valign=\"bottom\"><h2>Question #<b id=\"question-number-b\">1</b></h2></td>\r\n    <td valign=\"bottom\" align=\"center\"><input type=\"button\" value=\"Back\" /> <input type=\"button\" value=\"Next\" /></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Question</b>:</td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[question]\" rows=\"3\" cols=\"50\">{$aLoadedQuestion.question}</textarea></td>\r\n  </tr>\r\n  <tr>\r\n    <td valign=\"top\"><b>Feedback:</b></td>\r\n    <td><textarea onchange=\"setChanged(\'q\');\" name=\"question[generalFeedback]\" rows=\"2\" cols=\"50\">{$aLoadedQuestion.generalFeedback}</textarea><br />\r\n      <small>Explanation of question shown after survey is completed.</small><br /><br /></td>\r\n  </tr>\r\n{assign_array var=\'aQs\' values=\'A,B,C,D,E\'}\r\n{foreach from=$aQs item=\'qAlpha\' name=\'qAlpha\'}{assign var=\"qAlphaNext\" value=`$aQs[$smarty.foreach.qAlpha.iteration]`}\r\n  <tr>{if !$smarty.foreach.qAlpha.first AND !$aLoadedQuestion[$qAlpha]}{assign var=\"hideQuestion\" value=1}{else}{assign var=\"hideQuestion\" value=0}{/if}\r\n    <td><span id=\"question-cell-1_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><b>Option {$qAlpha}</b>:{assign var=\"feedbackAlpha\" value=\"feedback`$qAlpha`\"}{if !$aLoadedQuestion.$feedbackAlpha}<br /><br /><input id=\"add-feedback-button_{$qAlpha}\" type=\"button\" value=\"Add Feedback [{$qAlpha}]\" onclick=\"showFeedback(this,\'{$qAlpha}\');\"{if $hideQuestion} style=\"display:none;\"{/if} />{/if}</span></td>\r\n    <td valign=\"top\"><span id=\"question-cell-2_{$qAlpha}\"{if $hideQuestion} style=\"display:none;\"{/if}><input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[{$qAlpha}]\" size=\"51\" maxlength=\"128\" value=\"{$aLoadedQuestion.$qAlpha}\" {if !$smarty.foreach.qAlpha.first}onload=\"if(this.value==\'\')\"{/if}/> &nbsp;\r\n      <b>Value</b>: <input onchange=\"setChanged(\'q\');\" type=\"text\" name=\"question[value{$qAlpha}]\" size=\"4\" {assign var=\"valueAlpha\" value=\"value`$qAlpha`\"}value=\"{$aLoadedQuestion[$valueAlpha]}\" maxlength=\"5\" /></span></td>\r\n  </tr>\r\n  <tr>{if !$aLoadedQuestion.$qAlpha OR !$aLoadedQuestion[$feedbackAlpha]}{assign var=\"hideFeedback\" value=1}{else}{assign var=\"hideFeedback\" value=0}{/if}\r\n    <td valign=\"top\"><span id=\"feedback-cell-1_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><b>Feedback</b>:</span></td>\r\n    <td><span id=\"feedback-cell-2_{$qAlpha}\"{if $hideFeedback} style=\"display:none;\"{/if}><textarea id=\"feedback_{$qAlpha}\" name=\"question[feedback{$qAlpha}]\" onchange=\"setChanged(\'q\');\" rows=\"2\" cols=\"50\">{$aLoadedQuestion[$feedbackAlpha]}</textarea></span></td>\r\n  </tr>\r\n  {if !$smarty.foreach.qAlpha.last}\r\n  <tr>\r\n    <td colpan=\"2\"><input id=\"add-next-question-button_{$qAlpha}\" type=\"button\" value=\"Add Option [{$qAlphaNext}]\" onclick=\"showQuestion(this,\'{$qAlphaNext}\');\" {if $shownAddButton OR $aLoadedQuestion[$qAlphaNext]}style=\"display:none;\" {else}{assign var=\"shownAddButton\" value=1}{/if} /></td>\r\n  </tr>\r\n  {/if}\r\n{/foreach}\r\n<tr>\r\n  <td valign=\"top\"><b>Placement</b>:</td>\r\n  <td><select name=\"question[ids]\">\r\n      <option value=\"1\" onchange=\"setChanged(\'q\');\">1</option>\r\n    </select> Select which number you want this question to be.<br /><small>Existing questions will be moved down.</small><br /><br /></td>\r\n</tr>\r\n<tr>\r\n  <td colspan=\"2\" align=\"center\">\r\n    <b style=\"color:red;\" id=\"question-save-alert\" style=\"display:none;\">* Question updates not yet saved.</b><br />\r\n    <input type=\"button\" value=\"Discard Changes\" onclick=\"editSurvey();\" />\r\n    {if $aLoadedSurvey.companyId gt 0}<input type=\"button\" value=\"Save Changes\" />{/if}\r\n    <input type=\"button\" value=\"Save As New\" />\r\n    <input type=\"button\" value=\"Delete\" />\r\n  </td>\r\n</tr>\r\n</table>\r\n</div>\r\n</td></tr></table>\r\n</blockquote>\r\n</div>\r\n\r\n<script type=\"text/javascript\">{literal}\r\n\r\n  function setIcon(ico) {\r\n    xGetElementById(\'survey-icon\').className = \'sIco ico\'+ico;\r\n    xClose(\'icon-change-div\');\r\n  }\r\n\r\n  function editSurvey() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing: <b>\'+surveyName+\'</b>\';\r\n    xClose(\'questions-editor\');\r\n    xOpen(\'survey-editor\');\r\n  }\r\n\r\n  function editQuestions() {\r\n    xGetElementById(\'editor-title\').innerHTML = \'Editing Survey Questions (Survey Name)\';\r\n    xOpen(\'questions-editor\');\r\n    xClose(\'survey-editor\');\r\n  }\r\n\r\n  function titleUpdate() {\r\n    surveyName = xGetElementById(\'survey-name\').value;\r\n    xGetElementById(\'editor-title\').innerHTML = (surveyName) ? \'Editing: <b>\'+surveyName+\'</b>\' : \'Editing: <b>Untitled</b>\';\r\n  }\r\n\r\n  function setChanged(type) {\r\n    switch(type) {\r\n      case \'s\':\r\n        xGetElementById(\'survey-save-alert\').style.display = \'inline\';\r\n        break;\r\n      case \'q\':\r\n        xGetElementById(\'question-save-alert\').style.display = \'inline\';\r\n        break;\r\n    }\r\n  }\r\n\r\n  function showFeedback(e,qAlpha) {\r\n    xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n  }\r\n\r\n  function showQuestion(e, qAlpha) {\r\n    xGetElementById(\'question-cell-1_\'+qAlpha).style.display = \'inline\';\r\n    xGetElementById(\'question-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    e.style.display = \'none\';\r\n    if (xGetElementById(\'feedback_\'+qAlpha).value) {\r\n      xGetElementById(\'feedback-cell-1_\'+qAlpha).style.display = \'inline\';\r\n      xGetElementById(\'feedback-cell-2_\'+qAlpha).style.display = \'inline\';\r\n    } else {\r\n      xGetElementById(\'add-feedback-button_\'+qAlpha).style.display = \'inline\';\r\n    }\r\n    if (nextQuestionButton = xGetElementById(\'add-next-question-button_\'+qAlpha)) {\r\n      nextQuestionButton.style.display = \'inline\';\r\n    }\r\n  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(5327,233,1.74,'smarty','0','Trying to get team captains showing.',1256621222,2,'71.195.230.181','{assign var=\"hideWidgets\" value=0}\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{assign var=\"GUIDs\" value=\"\"}\r\n\r\n{select_query assign=\"managerId\" return=\"val\"}\r\n	userId FROM competitions c WHERE c.id = {$smarty.request.cid}\r\n{/select_query}\r\n\r\n{if $managerId eq $user->id or $acm->isDomainAdmin()}\r\n	{assign var=\"isManager\" value=\"true\"}\r\n	<!-- ismanager -->\r\n{/if}\r\n\r\n{if $isManager or \'yes\' == $smarty.session.company.preferences.anyone_joins_teams}\r\n	{assign var=\"canCreateTeams\" value=\"true\"}\r\n	{assign var=\"canAssignToTeams\" value=\"true\"}\r\n	{include_php file=\"shared_handle:competition/management\"}\r\n{/if}\r\n\r\n{include_php file=\"shared_handle:competition/load\"}\r\n\r\n<script type=\"text/javascript\">{literal}\r\n	var GUIDs = \'0\';\r\n\r\n	function updateGUIDs() {\r\n		var checkBoxes = document.forms[\'leaderBoardForm\'][\"graphCheckbox[]\"];\r\n		if (!checkBoxes.length) {\r\n			checkBoxes[0] = checkBoxes;\r\n			checkBoxes.length = 1;\r\n		}\r\n		GUIDs = \'\';\r\n		for (var x = 0; x < checkBoxes.length; x++) {\r\n			if (checkBoxes[x].checked == true && checkBoxes[x].value) {\r\n				GUIDs += checkBoxes[x].value+\',\'; \r\n			}\r\n			\r\n		}\r\n		rewriteGraphLinks();\r\n	}\r\n\r\n\r\n	function loadGraphWindow(graphParams) {\r\n		uri = \'?pg=flashgraph-frame&compId={/literal}{$competition.id}{literal}; //&\'+graphParams+\'&userIds=\'+GUIDs;\r\n		var gFrame = window.frames[\'graphwindow\'];\r\n		// gFrame.location.replace(uri);\r\n		var gForm = document.getElementById(\'form_leaderBoard\');\r\n		gForm.gParams.value = graphParams;\r\n		gForm.userIds.value = GUIDs;\r\n		gForm.submit();\r\n		return false;\r\n	}\r\n{/literal}</script>\r\n\r\n{include_php file=\"shared_handle:competition.verifyInitialPot\"}\r\n\r\n{capture name=\"scoringMethod\"}\r\n	<b>{$competition.current_parameter.name|capitalize}</b> ({$competition.current_parameter.units}) - {$competition.current_parameter.basedOn|capitalize}{* - {$competition.current_parameter.polarity|capitalize} *}\r\n{/capture}\r\n\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n	<tr>\r\n		<td valign=\"top\" width=\"275\">\r\n\r\n		{if $competition.prizes|@count}\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'winners\', \'\', \'showHide\');\"><img id=\"winners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Winners\r\n		</h2>\r\n\r\n		<div id=\"winners\" style=\"display:block;\">\r\n		{foreach from=$competition.prizes item=\"prize\" key=\"prizeId\"}\r\n			<a href=\"javascript://\" onclick=\"window.open(\'?pg=competition/winners&cid={$competition.id}&prizeId={$prizeId}\', \'\', \'height=425,width=300,menubar=no,status=no,scrollbars=yes,titlebar=no,resizable=yes\');\">{$prize.title}</a><br />\r\n		{/foreach}\r\n		</div>\r\n		{/if}\r\n		\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'leaderBoard\', \'\', \'showHide\');\"><img id=\"leaderBoard_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Leaders\r\n		</h2>\r\n		\r\n		{if $competition.dateOfObject}<div align=\"right\"><small><i>as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}</i></small></div>{/if}\r\n\r\n		<div id=\"leaderBoard\" style=\"display:block;\">\r\n		<small>{$smarty.capture.scoringMethod}</small><br />\r\n		{if $competition.style eq \"Group-vs-Group\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Team Average)</div>\r\n		{elseif $competition.style eq \"Company-vs-Company\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Company Average)</div>\r\n		{/if}\r\n		{if $competition.parameters|@count gt 1}\r\n			<select name=\"scoringMethod\" onchange=\"if(this.value)location.replace(\'?pg={$page.name}&cid={$competition.id}&cpid=\'+this.value);\" style=\"width:200px;\">\r\n				<option value=\"\">(Choose Leaderboard)</option>\r\n			{foreach from=$competition.parameters key=\"paramId\" item=\"param\"}\r\n				{if $paramId neq $competition.current_parameter.id}\r\n				<option value=\"{$paramId}\">{$param.name|capitalize} - {$param.basedOn|capitalize}{* - {$param.polarity} *}</option>\r\n				{/if}\r\n			{/foreach}\r\n			</select>\r\n		{/if}\r\n		<form id=\"form_leaderBoard\" name=\"leaderBoardForm\" method=\"POST\" action=\"index.php?pg=flashgraph-frame&compId={$competition.id}\" target=\"graphwindow\">\r\n		<input type=\"hidden\" name=\"gParams\" value=\"\" />\r\n		<input type=\"hidden\" name=\"userIds\" value=\"\" />\r\n		<table cellpadding=\"0\" cellspacing=\"0\">\r\n		{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\">Team</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></span>\r\n			<td class=\"thinCell\">#Pl</td>\r\n			{* <td class=\"cellHeadTiny\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show In Graphs\" /></td> *}\r\n			</tr>\r\n			{foreach name=\"rankLoop\" from=$competition.team_data item=\"teamScore\" key=\"teamName\"}\r\n				{if $teamName ne \"Waiting to Join\"}\r\n					<tr>\r\n						<td class=\"thinCell\"><small>{$smarty.foreach.rankLoop.iteration}</small></td>\r\n						<td class=\"thinCell\"><small class=\"mini\">{$teamName|default:\"&nbsp;\"}</small></td>\r\n						<td class=\"thinCell\"><small>{$teamScore|number_format:2}</small></td>\r\n						<td class=\"thinCell\"><small>{$competition.teams.$teamName|@count|default:\"0\"}</small></td>\r\n						{* <td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{foreach from=$teams.users item=teamUser}{$teamUser.id},{if $smarty.foreach.rankLoop.iteration lt 11}{append var=\"GUIDs\" value=\"`$teamUser.id`,\"}{/if}{/foreach}{$GUIDs}\"{if $smarty.foreach.rankLoop.iteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td> *}\r\n					</tr>\r\n				{/if}\r\n			{/foreach}\r\n		{else} \r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\" align=\"center\">Name</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"{$smarty.capture.scoringMethod|strip_tags}\" /></td>\r\n			<td class=\"thinCell\">Update</td>\r\n			<td class=\"thinCell\" align=\"center\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show in Graphs\" /></td>\r\n			</tr>\r\n			{foreach from=$competition.data item=\"userData\" key=\"userId\" name=\"compData\"}\r\n			{assign var=\"curIteration\" value=$smarty.foreach.compData.iteration}\r\n			{if $curIteration eq 21}\r\n			</table>\r\n			</div>\r\n			<br />\r\n			<h2 class=\"withBG\">\r\n				<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'runnerUps\', \'\', \'showHide\');\"><img id=\"runnerUps_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n				Runner Ups\r\n			</h2>\r\n			<div id=\"runnerUps\" style=\"display:none;\">\r\n			<table cellpadding=\"0\" cellspacing=\"0\">\r\n			{/if}\r\n			<tr>\r\n			<td class=\"thinCell\"><small>{$curIteration}</small></td>\r\n			<td class=\"thinCell\"><small class=\"mini\">{$competition.users[$userId]}</small></td>\r\n			<td class=\"thinCell\"><small>{$userData.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n			<td class=\"thinCell\"><small>{if $userData.doe}{$userData.doe|date_format2:\"n/j/y\"}{else}-Never-{/if}</small></td>\r\n			<td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{$userId}{if $curIteration lt 11}{append var=\"GUIDs\" value=\"`$userId`,\"}{/if}\"{if $curIteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td>\r\n			</tr>\r\n			{/foreach}\r\n		{/if}\r\n		</form>\r\n		<script type=\"text/javascript\">GUIDs = \'{$GUIDs}\';</script>\r\n		</table>\r\n		</div> \r\n		<div align=\"right\"><small><i><a href=\"?pg=faq#comp\">How is the competition scored?</a></i></small></div>\r\n		<img src=\"./img/blank.gif\" width=\"168\" height=\"1\" alt=\"\" />\r\n		{if $isManager and $competition.style neq \'Company-vs-Company\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'managePlayers\', \'\', \'showHide\');\"><img id=\"managePlayers_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div> \r\n			Manage\r\n		</h2>\r\n		<div id=\"managePlayers\" style=\"display:none;\">\r\n					<form name=\"managePlayers[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n					<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n					<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n					<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n					<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n					<input type=\"hidden\" name=\"style\" value=\"{$competition.style}\">\r\n					<span class=\"cellHeadTiny\" style=\"clear:left;\">Del</span>\r\n					<span class=\"cellHead\">View Stats</span>\r\n					{* <span class=\"cellHeadSmall\">-</span> *}\r\n					<br />\r\n					{foreach from=$competition.users item=\"username\" key=\"userId\" name=\"dateUpdated\"}\r\n						<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"managePlayers[delete][]\" value=\"{$username}\" style=\"width:14px;height:14px;margin:0px 2px;\"></small></span>\r\n						<span class=\"cell\"><small><a href=\"?pg=my_home&cid={$competition.id}&userId={$userId}&hideComps=1\">{$username}</a></small></span>\r\n						{* <span class=\"cellSmall\"><small><a href=\"mailto:{$compUser.email}\">email</a></small></span> *}\r\n						<br />\r\n					{/foreach}\r\n					<div style=\"text-align:center;\">\r\n                                                <br />\r\n						<input type=\"submit\" class=\"button\" value=\"Remove Selected\">\r\n					</div>\r\n					</form>\r\n		</div><br/>\r\n		{/if}\r\n		{* End new section for Player management. *}\r\n		\r\n		{* Begin new section for Team management.  This can be moved where ever. *}\r\n		{* ******************************** TEAM MANAGEMENT ***************************************** *}\r\n		{if $canCreateTeams and $competition.style eq \'Group-vs-Group\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'teamManagement\', \'\', \'showHide\');\"><img id=\"teamManagement_img\" src=\"./img/blank.gif\" class=\"showHide_{if $smarty.request.showTeamManagement}on{else}off{/if}\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div>\r\n			Teams</h2>\r\n		<div id=\"teamManagement\" style=\"display:{if $smarty.request.showTeamManagement}block{else}none{/if};\">\r\n			<form name=\"manageTeam[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n			<div id=\"playersList{counter}\">\r\n				{if $isManager}<span class=\"cellHeadTiny\">Del</span>{/if}\r\n				<span class=\"cellHeadLarge\" style=\"width:134px;\">Team Name</span><br />\r\n				{foreach from=$competition.teams item=\"team\" key=\"teamName\"}\r\n					{counter name=\"counterI\" start=\"0\" print=0}\r\n					{if $teamName ne \"Waiting to Join\"}\r\n						{if $isManager}<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"manageTeam[delete][]\" value=\"{$teamName|htmlspecialchars}\"></small></span>{/if}\r\n						<span class=\"cellLarge\" style=\"width:134px;\"><small>\r\n							{if $isManager or $team|@in_array:$user->id}<input id=\"renameTeam\" type=\"text\" value=\"{$teamName|htmlspecialchars}\" name=\"manageTeam[rename][{$teamName|htmlspecialchars}]\" size=\"10\" style=\"width:124px;height:12px\">\r\n							{else}<span>{$teamName}</span>\r\n							{/if}\r\n						</small></span><br />\r\n					{/if}\r\n				{/foreach}\r\n			</div>\r\n                        <br />\r\n			<div style=\"text-align:center;\">New Team: <input id=\"addTeam\" type=\"text\" name=\"manageTeam[addTeam]\" size=\"10\"><br />\r\n			<br />\r\n                        <input type=\"submit\" class=\"button\" value=\"Submit Changes\"></div>\r\n			</form>\r\n		</div><br />\r\n		{/if}\r\n		{* End new section for Team management. *}\r\n\r\n		\r\n		{* if !$isManager AND $competition.users|@count lt 45}{include file=\"layouts/ads.tpl\"}{assign var=\"adsShown\" value=\"1\"}{/if *}\r\n\r\n		{*\r\n			<h2 class=\"withBG\">Competition Stats</h2>\r\n			<span class=\"cellHeadLarge\">Category</span><span class=\"cellHeadSmall\">Result</span><br />\r\n			<span class=\"cellLarge\"><small>start weight</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupStartWeight|default:0} lbs</small></span><br />\r\n			<span class=\"cellLarge\"><small>weight lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupWeightLost|default:0} lbs</small></span><br />\r\n			{if $competition.groupPercentageWeightLost gt 0}<span class=\"cellLarge\"><small>% lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupPercentageWeightLost|default:0|number_format:\"2\"}</small></span><br />{/if}\r\n			<span class=\"cellLarge\"><small>fat intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupFat|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>calorie intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupCalories|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>minutes exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupExercise|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>distance exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupDistanceExercised|default:0}</small></span><br />\r\n			<img src=\"./img/blank.gif\" width=\"165\" height=\"1\" alt=\"\" />\r\n		*}\r\n		</td>\r\n		<td width=\"100%\" valign=\"top\">\r\n			<div id=\"contentBox\" class=\"centerBox\" style=\"margin-left:10px;\"><div class=\"topRightTreasure\">\r\n<div id=\"jackpot\">{if $competition.potAmount gt 0}${$competition.potAmount|number_format:2}{/if}</div>\r\n<h1 class=\"underline\">{$competition.title|default:\"Competition Title\"}</h1>\r\n\r\n{* ******************************** COMPETITION END *********************************** *}\r\n{if $competition.endDate lt $smarty.now}   {* COMPETITION IS OVER *}\r\n	{if $competition.results.winners|@count eq 1}\r\n		{* There was one winner, either by scoringMethod or tieBreakerMethod *}\r\n\r\n		{math assign=\"daysOfCompetition\" equation=\"(x - y) / z\" x=$competition.endDate|default:\"0\" y=$competition.startDate|default:\"0\" z=\"86400\"}\r\n		{math assign=\"marginOfVictory\" equation=\"x - y\" x=$competition.results.winningStat|default:\"0\" y=$competition.results.secondPlaceStat|default:\"0\"}\r\n\r\n		{foreach from=$competition.results.winners item=\"winnerName\"}    {*key=\"winnerName\"*}\r\n			{assign var=\"winnerData\" value=$competitions.users.$winnerName}\r\n			\r\n			{if $competition.style eq \"Group-vs-Group\"}\r\n				{assign var=\"description\" value=\"Winning Team\"}\r\n				{assign var=\"avg\" value=\"average\"}\r\n			{else}\r\n				{assign var=\"description\" value=\"Winner\"}\r\n			{/if}\r\n\r\n			<h2><br /><b>{$winnerName}</b> is the {$description}{if $competition.potAmount}, taking home <b>$<i>{$competition.potAmount|number_format:2}</i></b>{/if}!</h2>\r\n			<br />\r\n			{strip}\r\n			{if not $competition.results.isTie}   {* Not a Tie *}\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of \r\n				fierce competition, <b>{$winnerName}</b> is the \r\n				{$description}!	Based on \r\n				<b>{$competition.results.winningMethod}</b>, <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2} \r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n			{else}                                {* A Tie! *}\r\n				{assign var=\"weightLost\" value=\"Weight Lost\"}\r\n				{assign var=\"percentLost\" value=\"Percentage Weight Lost\"}\r\n\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> \r\n				days of fierce competition, there was a tie in the judging \r\n				method, <b>{$competition.scoringMethod}</b>. To break this \r\n				tie, the selected tie breaking method, \r\n				<b>{$competition.tieBreakerMethod}</b>, was used to determine \r\n				<b>{$winnerName}</b> as the {$description}. <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2}\r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n				<!--\r\n				<b>{$winnerData.$weightLost|number_format:0} pounds</b>, which \r\n				was <b>{$winnerData.$percentLost|number_format:4}%</b> body weight.\r\n				-->\r\n			{/if}\r\n			{/strip}\r\n			<br />\r\n			<br />\r\n			<b>{$winnerName}</b> won with a <b>{$marginOfVictory|number_format:3}</b> margin over <b>{$competition.results.secondPlaceUser}</b>.\r\n			\r\n			<h2><br />Congratulations to you all!</h2>\r\n			<br />\r\n			<div class=\"underline\"></div>\r\n		{/foreach}\r\n\r\n	{elseif $competition.results.winners|@count gt 1}\r\n		{* There were multiple winners, even after tieBreakerMethod (should RARELY happen) *}\r\n	\r\n		<h2>There was a tie in this competition. The winners, by <b>{$competition.results.winningMethod}</b> having lost <b>{$competition.results.winningStat}</b>, are:<br /></h2>\r\n		<ul>\r\n		{foreach from=$competition.results.winners item=\"winnerData\" key=\"winnerName\"}\r\n			<li>{$winnerName}</li>\r\n		{/foreach}\r\n		</ul>\r\n		\r\n	{else}\r\n		{* For some reason, there were no winners *}\r\n\r\n		<h2><br />\r\n		Winner information is being calculated. <br />\r\n		Please check back soon.\r\n		<br /><br /></h2>\r\n	{/if}\r\n	This competition has ended and is no longer active.<br />\r\n{/if}\r\n{* ************************************************************************************ *}\r\n\r\n<div id=\"prizeDesc\">{$competition.potDescription}<br />\r\n{if $competition.potAmount}<small style=\"color:#FFF;\">(${$competition.individualPotAmount} from {$competition.potMethod})</small>{/if}</div>\r\n\r\n{if $competition.startDate lt $smarty.now}\r\n	Time remaining: <b>{$competition.timeLeft}</b><br />\r\n{else}\r\n	This competition has not yet started!<br />\r\n{/if}\r\n\r\nStart{if $competition.startDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.startDate|date_format2:\"n/j/Y\"}</b> &nbsp; \r\nEnd{if $competition.endDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.endDate|date_format2:\"n/j/Y\"}</b><br />\r\n{if $competition.calculationMode neq \"Real-Time\"}Competition stats/scoring updated as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}{if $isManager} (<a href=\"?pg=competition&cid={$smarty.request.cid}&nocache=1\">Update Now!</a>){/if}<br />{/if}\r\n<div style=\"font-size:5px;clear:left;\">&nbsp;</div>\r\n{assign var=\"scoringMethod\" value=$competition.scoringMethod}\r\n{assign var=\"tieBreakerMethod\" value=$competition.tieBreakerMethod}\r\n{assign var=\"weeklyWinnersMethod1\" value=$competition.weeklyWinnersMethod1}\r\n{assign var=\"weeklyWinnersMethod2\" value=$competition.weeklyWinnersMethod2}\r\n\r\n{* ******************** WEEKLY WINNERS ********************* *}\r\n{if $competition.weeklyWinners}\r\n	{if $weeklyWinnersMethod1}             {* DON\'T FORGET TO REMOVE THE ACM CHECK WHEN READY!!! *}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n			<a href=\"javascript:toggle(\'weeklyWinners\', \'\', \'showHide\');\"><img id=\"weeklyWinners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n			Last Week\'s Winners<i>!</i> <small style=\"color:#000; font-size:11px;\">(<i><b>{$competition.weeklyWinners.startDate|date_format2:\"D n/j\"}</b> through <b>{$competition.weeklyWinners.endDate|date_format2:\"D n/j\"}</b></i>)</small></h2> \r\n		<div id=\"weeklyWinners\">\r\n		<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\"><tr>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod1}</div>\r\n		<img src=\"{$skinFolder}images/winner_1.gif\" style=\"float:left;\" />\r\n		{strip}\r\n		{foreach name=\"method1\" from=$competition.weeklyWinners.$weeklyWinnersMethod1 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod1}\r\n			{if $smarty.foreach.method1.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method1.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method1.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> led the way last week by \r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b> {elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{else}<b>default</b>{/if}\r\n			{else}\r\n				{if $smarty.foreach.method1.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod2} \r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod2}</div>\r\n		<img src=\"{$skinFolder}images/winner_2.gif\" style=\"float:left;\" />\r\n		{* display var=$competition.weeklyWinners.users *}\r\n		{strip}\r\n		{foreach name=\"method2\" from=$competition.weeklyWinners.$weeklyWinnersMethod2 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod2}\r\n			\r\n			{if $smarty.foreach.method2.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method2.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method2.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> won by \r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{/if}\r\n			{else}\r\n				{if $smarty.foreach.method2.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod1}\r\n	</tr></table></div>{/if}\r\n{/if}\r\n{* ********************************************************* *}\r\n\r\n{if $acm->isDomainAdmin() and $smarty.request.debug}\r\n	{display var=$competition}\r\n{/if} \r\n\r\n{* ******************************** COMPARISON GRAPHS ***************************************** *}\r\n{if $competition.graphParameters|@count}\r\n<script type=\"text/javascript\">{literal}\r\n	function rewriteGraphLinks() {\r\n		var gLinksDiv = document.getElementById(\'graphLinksDiv\');\r\n		gLinksDiv.innerHTML = \'\';\r\n		{/literal}{foreach name=\"graphTypes\" from=$competition.graphParameters item=\"cgp\"}\r\n		gLinksDiv.innerHTML += \'<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type={$cgp.name|niceText|replace:\" \":\"+\"}&esId={$cgp.estatId}&basedOn={$cgp.basedOn|replace:\" \":\"+\"}&fillPrevious={if $cgp.assumeConstantValues eq \"yes\"}1{else}0{/if}&precision={$cgp.decimalPlaces}&format=wide&userIds=\'+GUIDs+\'\" target=\"graphwindow\"><small>{$cgp.name|niceText|replace:\" \":\"&nbsp;\"}&nbsp;-&nbsp;{$cgp.basedOn|niceText|replace:\" \":\"&nbsp;\"}</small></a>{if !$smarty.foreach.graphTypes.last} | {/if}\';\r\n		{/foreach}\r\n	{literal}\r\n	}\r\n{/literal}</script>\r\n<h2 class=\"withBG\"><a name=\"graph\"></a>\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'graphs\', \'\', \'showHide\');\"><img id=\"graphs_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Comparison Graphs &nbsp; <small><i>No graph? <a href=\"http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" target=\"_blank\">click here</a> to download the free Flash Player plug-in.</i></small></h2>\r\n<div id=\"graphs\" style=\"display:block;\">\r\n	<table border=\"0\" cellpadding=\"0\" width=\"100%\">\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&format=wide\"}\r\n	<tr>\r\n		<td><div style=\"border:#999 1px solid;background-color:#FFF;padding:5px;\"><iframe \"iframe_graphwindow\" name=\"graphwindow\" src=\"{$graphURL}\" frameborder=\"0\" width=\"625\" height=\"230\" scrollbars=\"no\"></iframe></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\" align=\"center\" width=\"100%\">\r\n		<div id=\"graphLinksDiv\">\r\n		<small>\r\n		{foreach name=\"graphTypes\" from=$competition.availableGraphs key=\"graphType\" item=\"graphParams\"}\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&{$graphParams}\');\" target=\"graphwindow\">{$graphType}</a>{if $smarty.foreach.graphTypes.iteration neq $competition.availableGraphs|@count} | {/if}\r\n		{/foreach}\r\n		</small></div></td>\r\n	</tr>\r\n	</table>\r\n	<script type=\"text/javascript\">\r\n		rewriteGraphLinks();\r\n	</script>\r\n<br />\r\n</div>\r\n{/if}\r\n\r\n{* ******************************** GROUP TEAMS/PLAYERS SUMMARY W/MOVING ***************************************** *}\r\n{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'teams\', \'\', \'showHide\');\"><img id=\"teams_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	The Teams &nbsp; <small><i>Assignments and statistics</i></small></h2>\r\n<div id=\"teams\" style=\"display:block;\">\r\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\"><tr><td>\r\n	<div align=\"right\" style=\"border-bottom:1px solid black; margin:2px; padding:2px;\">All stats based on: {$smarty.capture.scoringMethod}</div>\r\n	{if $canAssignToTeams}\r\n		<form name=\"changeTeam\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n	{/if}\r\n		{assign var=\"minEx\" value=\"Minutes Exercise\"}\r\n		{assign var=\"distEx\" value=\"Distance Exercised\"}\r\n		{assign var=\"pctLst\" value=\"Percentage Weight Lost\"}\r\n		{assign var=\"wtLst\" value=\"Percentage Weight Lost\"}\r\n		{foreach from=$competition.team_data name=\"teamsLoop\" item=\"teamScore\" key=\"teamName\"}\r\n			<div id=\"playersList{$smarty.foreach.teamsLoop.iteration}\" style=\"float:left;width:310px;overflow:hidden;word-wrap:nowrap; margin:0px 5px 5px 0px;\">\r\n			{if $teamName eq \"Waiting to Join\"}<h2>Not assigned to a team</h2>{else}<h4><span style=\"font-weight:normal;\">#{$smarty.foreach.teamsLoop.iteration}) </span>{$teamName|default:\"&nbsp;\"}{/if}</h4>\r\n			<table cellpadding=\"0\" cellspacing=\"0\" style=\"width:250px; background-color:#FFC;\">\r\n			<tr>\r\n				<td class=\"thinCell\" width=\"55%\">Name</td>\r\n				<td class=\"thinCell\" width=\"25%\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></td>\r\n				<td class=\"thinCell\" width=\"20%\">Update</span>\r\n			</tr>\r\n			{foreach from=$competition.teams.$teamName item=\"userId\"}\r\n			<tr>\r\n				<td class=\"thinCell\" style=\"text-align:left;\"><small>{if $isManager or $userId eq $user->id}<input type=\"checkbox\" name=\"changeTeam[players][{$competition.users.$userId}]\" />{/if}{$competition.users.$userId}</small>{if $competition.team_captains.$teamName eq $userId OR $userId|@in_array:$competition.teams.$teamName} <img src=\"/systems/v2_ehc/images/ehc/ico/ico_captain.gif\" />{/if}</td>\r\n				{* <span class=\"cellTiny\"><small>{if $users.hideInitialWeight neq \"Yes\"}{$users.$pctLst|number_format:\"2\"|replace:\".00\":\"\"}{else}-{/if}</small></span> *}\r\n				<td class=\"thinCell\"><small>{$competition.data.$userId.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n				<td class=\"thinCell\"><small>{if $competition.data.$userId.doe}{$competition.data.$userId.doe|date_format2:\"n/j/y\"}{else}Never{/if}</small></td>\r\n			</tr>\r\n			{foreachelse}\r\n			{* No players assigned to this team. *}\r\n			<tr>\r\n				<td class=\"thinCell\">No players yet.</td>\r\n			</tr>\r\n			{/foreach}\r\n\r\n			</table>\r\n			</div>\r\n		{/foreach}\r\n	{if $canAssignToTeams and $competition.style neq \'Company-vs-Company\'}\r\n		<br />\r\n		<select name=\"changeTeam[team]\">\r\n			<option value=\"\">Move selected players to...</option>\r\n			{foreach from=$competition.teams item=\"newTeams\" key=\"newTeamName\"}\r\n				{*if $newTeamName ne $teamName and $newTeamName ne \"Waiting to Join\"*}\r\n				{if $newTeamName ne \"Waiting to Join\"}\r\n					<option value=\"{$newTeamName}\">{$newTeamName}</option>\r\n				{/if}\r\n			{/foreach}\r\n		</select><br />\r\n		<input id=\"assign_captains_checkbox\" type=\"checkbox\" name=\"assignCaptains\" value=\"1\"><label for=\"assign_captains_checkbox\"> Assign selected player(s) as captain(s)</label><br />\r\n		<input type=\"submit\" class=\"button\" value=\"Submit Changes\">\r\n		</form>\r\n		<img src=\"/systems/v2_ehc/images/ehc/ico/ico_captain.gif\" /> = Team Captain\r\n	{/if}\r\n</td></tr></table>\r\n</div>\r\n{/if}\r\n</div>\r\n	{* ******************************** DISCUSSION BOARD ***************************************** *}\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'discuss\', \'\', \'showHide\');\"><img id=\"discuss_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Discussion Board</h2>\r\n<div id=\"discuss\" style=\"display:block;\">\r\n	<table cellpadding=\"0\" width=\"100%\" border=\"0\"><tr><td><iframe src=\"?pg=competition/forum\" id=\"discussionBoard\" frameborder=\"0\" scrolling=\"yes\" style=\"width:100%;\"></iframe></td></tr></table>\r\n</div>\r\n\r\n</div></td>\r\n</tr></table>\r\n\r\n{*\r\n<script type=\"text/javascript\">{literal}\r\n	if ( window.frames != null ) {\r\n	    for ( i = 0; i< window.frames.length; i++ )\r\n	        window.alert (\"Child window \" +i+ \" is named \"+window.frames(i).name);\r\n	}\r\n{/literal}</script>\r\n*}'),(5328,105,1.28,'php','1','tried to get the new layout on this page but couldn\'t',1257378684,16,'208.53.57.52','<?php\r\n\r\nglobal $SPADE;\r\n\r\nif ($SPADE[\'user\']->isLoggedIn()) {\r\n	$SPADE[\'template\']->assign (\'pgLayout\', \'layouts/withLeftNav.tpl\');\r\n}\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Competition Questions\",\r\n		\"anchor\" => \"comp\",\r\n		\"questions\" => array(\r\n			\"How is the scoring calculated?\",\r\n			\"My weight loss is incorrect! Why?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"This depends on what the scoring method is.<br /><br />If the scoring method is based on a totals-type category, where the winner has the largest (or smallest) sum of one category (such as minutes or distance exercise), then the totals are simply calculated on all entries you placed between (or on) the start date and the end date of the competition.<br /><br />If the competition is based on weight (weight lost or percentage weight lost), the site uses the earliest weight entry for you on or after the start date of the competition. This number is subracted by the weight entry nearest, but not after the competition end date to calculate your weight lost for the competition.<br /><br />The site does not use any weight entries before the start date of the competition as your start weight because it will not assume that your weight was consistent between that time and the start of the competition.<br /><br />We recommend weighing yourself on the starting date of the competition (or as soon as possible after it begins) and making that entry in your weight loss journal.\",\r\n			\"There are many possible reasons for this, but the most common is covered above in \\\"How is the scoring calculated?\\\".<br /><br />It is also possible that you have entered incorrect data, or incorrectly calculated what you think your loss should be; please be careful to make sure your weight loss is indeed incorrectly calculated in a competition before contacting us for help.<br /><br />Another reason your weight loss might not seem correct is that the competition calculation has been cached and has not been updated since you saved entries in your weight loss journal. Please note the \\\"as of MM/DD/YYYY HH:MM A\\\" time at the top of your leader board. Some competitions are only updated manually when the competition creator or a site administrator requests a calculation update. If your competition is considerably out of date, try contacting the creator of the competition, or <a href=\\\"?pg=contact\\\">contact us</a> and let us know.\"\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.\"\r\n		\r\n		)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to select the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"\r\n		)\r\n	),\r\n	\"3\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don\'t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney failure.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, not taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n/*// If you want to make the [0] section active, delete this block!\r\nif (!$SPADE[\'acm\']->isDomainAdmin()) {\r\n	$FAQ[0] = $FAQ[1];\r\n	$FAQ[1] = $FAQ[2];\r\n	$FAQ[2] = $FAQ[3];\r\n	unset($FAQ[3]);\r\n}\r\n//Delete through this line*/\r\n\r\nif ($_SESSION[\'company\'][\'preferences\'][\'hide_competitions\'] == \'yes\') {\r\n	unset ($FAQ[0]);\r\n}\r\n\r\nif ($_SESSION[\'company\'][\'preferences\'][\'hide_home\'] == \'yes\') {\r\n	unset ($FAQ[1]);\r\n}\r\n\r\nif ($_SESSION[\'company\'][\'preferences\'][\'hide_incentives\'] == \'yes\') {\r\n	unset ($FAQ[2]);\r\n}\r\n\r\n?>\r\n\r\n\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { \r\n		if ($x == 0 && $_SESSION[\'company\'][\'preferences\'][\'hide_competitions\'] == \'yes\') continue;\r\n		if ($x == 1 && $_SESSION[\'company\'][\'preferences\'][\'hide_home\'] == \'yes\') continue;\r\n		if ($x == 2 && $_SESSION[\'company\'][\'preferences\'][\'hide_incentives\'] == \'yes\') continue;\r\n	?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { \r\n		if ($x == 0 && $_SESSION[\'company\'][\'preferences\'][\'hide_competitions\'] == \'yes\') continue;\r\n		if ($x == 1 && $_SESSION[\'company\'][\'preferences\'][\'hide_home\'] == \'yes\') continue;\r\n		if ($x == 2 && $_SESSION[\'company\'][\'preferences\'][\'hide_incentives\'] == \'yes\') continue;\r\n	?>\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(5331,233,1.77,'smarty','0','Working on e-mail your team feature.',1258158694,2,'206.71.78.158','{assign var=\"hideWidgets\" value=0}\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{assign var=\"GUIDs\" value=\"\"}\r\n\r\n{select_query assign=\"managerId\" return=\"val\"}\r\n	userId FROM competitions c WHERE c.id = {$smarty.request.cid}\r\n{/select_query}\r\n\r\n{if $managerId eq $user->id or $acm->isDomainAdmin()}\r\n	{assign var=\"isManager\" value=\"true\"}\r\n	<!-- ismanager -->\r\n{/if}\r\n\r\n{if $isManager or \'yes\' == $smarty.session.company.preferences.anyone_joins_teams}\r\n	{assign var=\"canCreateTeams\" value=\"true\"}\r\n	{assign var=\"canAssignToTeams\" value=\"true\"}\r\n	{include_php file=\"shared_handle:competition/management\"}\r\n{/if}\r\n\r\n{include_php file=\"shared_handle:competition/load\"}\r\n\r\n<script type=\"text/javascript\">{literal}\r\n	var GUIDs = \'0\';\r\n\r\n	function updateGUIDs() {\r\n		var checkBoxes = document.forms[\'leaderBoardForm\'][\"graphCheckbox[]\"];\r\n		if (!checkBoxes.length) {\r\n			checkBoxes[0] = checkBoxes;\r\n			checkBoxes.length = 1;\r\n		}\r\n		GUIDs = \'\';\r\n		for (var x = 0; x < checkBoxes.length; x++) {\r\n			if (checkBoxes[x].checked == true && checkBoxes[x].value) {\r\n				GUIDs += checkBoxes[x].value+\',\'; \r\n			}\r\n			\r\n		}\r\n		rewriteGraphLinks();\r\n	}\r\n\r\n\r\n	function loadGraphWindow(graphParams) {\r\n		uri = \'?pg=flashgraph-frame&compId={/literal}{$competition.id}{literal}; //&\'+graphParams+\'&userIds=\'+GUIDs;\r\n		var gFrame = window.frames[\'graphwindow\'];\r\n		// gFrame.location.replace(uri);\r\n		var gForm = document.getElementById(\'form_leaderBoard\');\r\n		gForm.gParams.value = graphParams;\r\n		gForm.userIds.value = GUIDs;\r\n		gForm.submit();\r\n		return false;\r\n	}\r\n{/literal}</script>\r\n\r\n{include_php file=\"shared_handle:competition.verifyInitialPot\"}\r\n\r\n{capture name=\"scoringMethod\"}\r\n	<b>{$competition.current_parameter.name|capitalize}</b> ({$competition.current_parameter.units}) - {$competition.current_parameter.basedOn|capitalize}{* - {$competition.current_parameter.polarity|capitalize} *}\r\n{/capture}\r\n\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n	<tr>\r\n		<td valign=\"top\" width=\"275\">\r\n\r\n		{if $competition.prizes|@count}\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'winners\', \'\', \'showHide\');\"><img id=\"winners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Winners\r\n		</h2>\r\n\r\n		<div id=\"winners\" style=\"display:block;\">\r\n		{foreach from=$competition.prizes item=\"prize\" key=\"prizeId\"}\r\n			<a href=\"javascript://\" onclick=\"window.open(\'?pg=competition/winners&cid={$competition.id}&prizeId={$prizeId}\', \'\', \'height=425,width=300,menubar=no,status=no,scrollbars=yes,titlebar=no,resizable=yes\');\">{$prize.title}</a><br />\r\n		{/foreach}\r\n		</div>\r\n		{/if}\r\n		\r\n		<br />\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'leaderBoard\', \'\', \'showHide\');\"><img id=\"leaderBoard_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n			Leaders\r\n		</h2>\r\n		\r\n		{if $competition.dateOfObject}<div align=\"right\"><small><i>as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}</i></small></div>{/if}\r\n\r\n		<div id=\"leaderBoard\" style=\"display:block;\">\r\n		<small>{$smarty.capture.scoringMethod}</small><br />\r\n		{if $competition.style eq \"Group-vs-Group\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Team Average)</div>\r\n		{elseif $competition.style eq \"Company-vs-Company\"}\r\n			<div align=\"center\" style=\"font-size:9px; color:#000;\">(Company Average)</div>\r\n		{/if}\r\n		{if $competition.parameters|@count gt 1}\r\n			<select name=\"scoringMethod\" onchange=\"if(this.value)location.replace(\'?pg={$page.name}&cid={$competition.id}&cpid=\'+this.value);\" style=\"width:200px;\">\r\n				<option value=\"\">(Choose Leaderboard)</option>\r\n			{foreach from=$competition.parameters key=\"paramId\" item=\"param\"}\r\n				{if $paramId neq $competition.current_parameter.id}\r\n				<option value=\"{$paramId}\">{$param.name|capitalize} - {$param.basedOn|capitalize}{* - {$param.polarity} *}</option>\r\n				{/if}\r\n			{/foreach}\r\n			</select>\r\n		{/if}\r\n		<form id=\"form_leaderBoard\" name=\"leaderBoardForm\" method=\"POST\" action=\"index.php?pg=flashgraph-frame&compId={$competition.id}\" target=\"graphwindow\">\r\n		<input type=\"hidden\" name=\"gParams\" value=\"\" />\r\n		<input type=\"hidden\" name=\"userIds\" value=\"\" />\r\n		<table cellpadding=\"0\" cellspacing=\"0\">\r\n		{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\">Team</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></span>\r\n			<td class=\"thinCell\">#Pl</td>\r\n			{* <td class=\"cellHeadTiny\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show In Graphs\" /></td> *}\r\n			</tr>\r\n			{foreach name=\"rankLoop\" from=$competition.team_data item=\"teamScore\" key=\"teamName\"}\r\n				{if $teamName ne \"Waiting to Join\"}\r\n					<tr>\r\n						<td class=\"thinCell\"><small>{$smarty.foreach.rankLoop.iteration}</small></td>\r\n						<td class=\"thinCell\"><small class=\"mini\">{$teamName|default:\"&nbsp;\"}</small></td>\r\n						<td class=\"thinCell\"><small>{$teamScore|number_format:2}</small></td>\r\n						<td class=\"thinCell\"><small>{$competition.teams.$teamName|@count|default:\"0\"}</small></td>\r\n						{* <td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{foreach from=$teams.users item=teamUser}{$teamUser.id},{if $smarty.foreach.rankLoop.iteration lt 11}{append var=\"GUIDs\" value=\"`$teamUser.id`,\"}{/if}{/foreach}{$GUIDs}\"{if $smarty.foreach.rankLoop.iteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td> *}\r\n					</tr>\r\n				{/if}\r\n			{/foreach}\r\n		{else} \r\n			<tr>\r\n			<td class=\"thinCell\">#</td>\r\n			<td class=\"thinCell\" align=\"center\">Name</td>\r\n			<td class=\"thinCell\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"{$smarty.capture.scoringMethod|strip_tags}\" /></td>\r\n			<td class=\"thinCell\">Update</td>\r\n			<td class=\"thinCell\" align=\"center\"><img src=\"{$skinFolder}images/graph_ico.gif\" width=\"15\" height=\"15\" alt=\"Show in Graphs\" /></td>\r\n			</tr>\r\n			{foreach from=$competition.data item=\"userData\" key=\"userId\" name=\"compData\"}\r\n			{assign var=\"curIteration\" value=$smarty.foreach.compData.iteration}\r\n			{if $curIteration eq 21}\r\n			</table>\r\n			</div>\r\n			<br />\r\n			<h2 class=\"withBG\">\r\n				<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'runnerUps\', \'\', \'showHide\');\"><img id=\"runnerUps_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n				</div>\r\n				Runner Ups\r\n			</h2>\r\n			<div id=\"runnerUps\" style=\"display:none;\">\r\n			<table cellpadding=\"0\" cellspacing=\"0\">\r\n			{/if}\r\n			<tr>\r\n			<td class=\"thinCell\"><small>{$curIteration}</small></td>\r\n			<td class=\"thinCell\"><small class=\"mini\">{$competition.users[$userId]}</small></td>\r\n			<td class=\"thinCell\"><small>{$userData.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n			<td class=\"thinCell\"><small>{if $userData.doe}{$userData.doe|date_format2:\"n/j/y\"}{else}-Never-{/if}</small></td>\r\n			<td class=\"thinCell\"><input class=\"graphCheckbox\" name=\"graphCheckbox[]\" type=\"checkbox\" value=\"{$userId}{if $curIteration lt 11}{append var=\"GUIDs\" value=\"`$userId`,\"}{/if}\"{if $curIteration lt 11} checked=\"checked\"{/if} onclick=\"updateGUIDs();\" /></td>\r\n			</tr>\r\n			{/foreach}\r\n		{/if}\r\n		</form>\r\n		<script type=\"text/javascript\">GUIDs = \'{$GUIDs}\';</script>\r\n		</table>\r\n		</div> \r\n		<div align=\"right\"><small><i><a href=\"?pg=faq#comp\">How is the competition scored?</a></i></small></div>\r\n		<img src=\"./img/blank.gif\" width=\"168\" height=\"1\" alt=\"\" />\r\n		{if $isManager and $competition.style neq \'Company-vs-Company\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'managePlayers\', \'\', \'showHide\');\"><img id=\"managePlayers_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div> \r\n			Manage\r\n		</h2>\r\n		<div id=\"managePlayers\" style=\"display:none;\">\r\n					<form name=\"managePlayers[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n					<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n					<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n					<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n					<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n					<input type=\"hidden\" name=\"style\" value=\"{$competition.style}\">\r\n					<span class=\"cellHeadTiny\" style=\"clear:left;\">Del</span>\r\n					<span class=\"cellHead\">View Stats</span>\r\n					{* <span class=\"cellHeadSmall\">-</span> *}\r\n					<br />\r\n					{foreach from=$competition.users item=\"username\" key=\"userId\" name=\"dateUpdated\"}\r\n						<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"managePlayers[delete][]\" value=\"{$username}\" style=\"width:14px;height:14px;margin:0px 2px;\"></small></span>\r\n						<span class=\"cell\"><small><a href=\"?pg=my_home&cid={$competition.id}&userId={$userId}&hideComps=1\">{$username}</a></small></span>\r\n						{* <span class=\"cellSmall\"><small><a href=\"mailto:{$compUser.email}\">email</a></small></span> *}\r\n						<br />\r\n					{/foreach}\r\n					<div style=\"text-align:center;\">\r\n                                                <br />\r\n						<input type=\"submit\" class=\"button\" value=\"Remove Selected\">\r\n					</div>\r\n					</form>\r\n		</div><br/>\r\n		{/if}\r\n		{* End new section for Player management. *}\r\n		\r\n		{* Begin new section for Team management.  This can be moved where ever. *}\r\n		{* ******************************** TEAM MANAGEMENT ***************************************** *}\r\n		{if $canCreateTeams and $competition.style eq \'Group-vs-Group\'}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n				<a href=\"javascript:toggle(\'teamManagement\', \'\', \'showHide\');\"><img id=\"teamManagement_img\" src=\"./img/blank.gif\" class=\"showHide_{if $smarty.request.showTeamManagement}on{else}off{/if}\" alt=\"show/hide\" border=\"0\" /></a>\r\n			</div>\r\n			Teams</h2>\r\n		<div id=\"teamManagement\" style=\"display:{if $smarty.request.showTeamManagement}block{else}none{/if};\">\r\n			<form name=\"manageTeam[]\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n			<div id=\"playersList{counter}\">\r\n				{if $isManager}<span class=\"cellHeadTiny\">Del</span>{/if}\r\n				<span class=\"cellHeadLarge\" style=\"width:134px;\">Team Name</span><br />\r\n				{foreach from=$competition.teams item=\"team\" key=\"teamName\"}\r\n					{counter name=\"counterI\" start=\"0\" print=0}\r\n					{if $teamName ne \"Waiting to Join\"}\r\n						{if $isManager}<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"manageTeam[delete][]\" value=\"{$teamName|htmlspecialchars}\"></small></span>{/if}\r\n						<span class=\"cellLarge\" style=\"width:134px;\"><small>\r\n							{if $isManager or $team|@in_array:$user->id}<input id=\"renameTeam\" type=\"text\" value=\"{$teamName|htmlspecialchars}\" name=\"manageTeam[rename][{$teamName|htmlspecialchars}]\" size=\"10\" style=\"width:124px;height:12px\">\r\n							{else}<span>{$teamName}</span>\r\n							{/if}\r\n						</small></span><br />\r\n					{/if}\r\n				{/foreach}\r\n			</div>\r\n                        <br />\r\n			<div style=\"text-align:center;\">New Team: <input id=\"addTeam\" type=\"text\" name=\"manageTeam[addTeam]\" size=\"10\"><br />\r\n			<br />\r\n                        <input type=\"submit\" class=\"button\" value=\"Submit Changes\"></div>\r\n			</form>\r\n		</div><br />\r\n		{/if}\r\n		{* End new section for Team management. *}\r\n\r\n		\r\n		{* if !$isManager AND $competition.users|@count lt 45}{include file=\"layouts/ads.tpl\"}{assign var=\"adsShown\" value=\"1\"}{/if *}\r\n\r\n		{*\r\n			<h2 class=\"withBG\">Competition Stats</h2>\r\n			<span class=\"cellHeadLarge\">Category</span><span class=\"cellHeadSmall\">Result</span><br />\r\n			<span class=\"cellLarge\"><small>start weight</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupStartWeight|default:0} lbs</small></span><br />\r\n			<span class=\"cellLarge\"><small>weight lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupWeightLost|default:0} lbs</small></span><br />\r\n			{if $competition.groupPercentageWeightLost gt 0}<span class=\"cellLarge\"><small>% lost</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupPercentageWeightLost|default:0|number_format:\"2\"}</small></span><br />{/if}\r\n			<span class=\"cellLarge\"><small>fat intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupFat|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>calorie intake</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupCalories|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>minutes exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupExercise|default:0}</small></span><br />\r\n			<span class=\"cellLarge\"><small>distance exercised</small></span>\r\n			<span class=\"cellSmall\"><small>{$competition.groupDistanceExercised|default:0}</small></span><br />\r\n			<img src=\"./img/blank.gif\" width=\"165\" height=\"1\" alt=\"\" />\r\n		*}\r\n		</td>\r\n		<td width=\"100%\" valign=\"top\">\r\n			<div id=\"contentBox\" class=\"centerBox\" style=\"margin-left:10px;\"><div class=\"topRightTreasure\">\r\n<div id=\"jackpot\">{if $competition.potAmount gt 0}${$competition.potAmount|number_format:2}{/if}</div>\r\n<h1 class=\"underline\">{$competition.title|default:\"Competition Title\"}</h1>\r\n\r\n{* ******************************** COMPETITION END *********************************** *}\r\n{if $competition.endDate lt $smarty.now}   {* COMPETITION IS OVER *}\r\n	{if $competition.results.winners|@count eq 1}\r\n		{* There was one winner, either by scoringMethod or tieBreakerMethod *}\r\n\r\n		{math assign=\"daysOfCompetition\" equation=\"(x - y) / z\" x=$competition.endDate|default:\"0\" y=$competition.startDate|default:\"0\" z=\"86400\"}\r\n		{math assign=\"marginOfVictory\" equation=\"x - y\" x=$competition.results.winningStat|default:\"0\" y=$competition.results.secondPlaceStat|default:\"0\"}\r\n\r\n		{foreach from=$competition.results.winners item=\"winnerName\"}    {*key=\"winnerName\"*}\r\n			{assign var=\"winnerData\" value=$competitions.users.$winnerName}\r\n			\r\n			{if $competition.style eq \"Group-vs-Group\"}\r\n				{assign var=\"description\" value=\"Winning Team\"}\r\n				{assign var=\"avg\" value=\"average\"}\r\n			{else}\r\n				{assign var=\"description\" value=\"Winner\"}\r\n			{/if}\r\n\r\n			<h2><br /><b>{$winnerName}</b> is the {$description}{if $competition.potAmount}, taking home <b>$<i>{$competition.potAmount|number_format:2}</i></b>{/if}!</h2>\r\n			<br />\r\n			{strip}\r\n			{if not $competition.results.isTie}   {* Not a Tie *}\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of \r\n				fierce competition, <b>{$winnerName}</b> is the \r\n				{$description}!	Based on \r\n				<b>{$competition.results.winningMethod}</b>, <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2} \r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n			{else}                                {* A Tie! *}\r\n				{assign var=\"weightLost\" value=\"Weight Lost\"}\r\n				{assign var=\"percentLost\" value=\"Percentage Weight Lost\"}\r\n\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> \r\n				days of fierce competition, there was a tie in the judging \r\n				method, <b>{$competition.scoringMethod}</b>. To break this \r\n				tie, the selected tie breaking method, \r\n				<b>{$competition.tieBreakerMethod}</b>, was used to determine \r\n				<b>{$winnerName}</b> as the {$description}. <b>{$winnerName}</b> \r\n				won with <b>{$competition.results.winningStat|number_format:2}\r\n				{if $competition.results.winningMethod eq \"Weight Lost\"}{$avg} pounds lost\r\n				{elseif $competition.results.winningMethod eq \"Percentage Weight Lost\"}{$avg} % body weight lost\r\n				{elseif $competition.results.winningMethod eq \"Minutes Exercise\"}{$avg} minutes exercised\r\n				{elseif $competition.results.winningMethod eq \"Distance Exercised\"}{$avg} miles exercised\r\n				{elseif $competition.results.winningMethod eq \"Weight Gained\"}{$avg} pounds gained\r\n				{/if}</b>.\r\n				<!--\r\n				<b>{$winnerData.$weightLost|number_format:0} pounds</b>, which \r\n				was <b>{$winnerData.$percentLost|number_format:4}%</b> body weight.\r\n				-->\r\n			{/if}\r\n			{/strip}\r\n			<br />\r\n			<br />\r\n			<b>{$winnerName}</b> won with a <b>{$marginOfVictory|number_format:3}</b> margin over <b>{$competition.results.secondPlaceUser}</b>.\r\n			\r\n			<h2><br />Congratulations to you all!</h2>\r\n			<br />\r\n			<div class=\"underline\"></div>\r\n		{/foreach}\r\n\r\n	{elseif $competition.results.winners|@count gt 1}\r\n		{* There were multiple winners, even after tieBreakerMethod (should RARELY happen) *}\r\n	\r\n		<h2>There was a tie in this competition. The winners, by <b>{$competition.results.winningMethod}</b> having lost <b>{$competition.results.winningStat}</b>, are:<br /></h2>\r\n		<ul>\r\n		{foreach from=$competition.results.winners item=\"winnerData\" key=\"winnerName\"}\r\n			<li>{$winnerName}</li>\r\n		{/foreach}\r\n		</ul>\r\n		\r\n	{else}\r\n		{* For some reason, there were no winners *}\r\n\r\n		<h2><br />\r\n		Winner information is being calculated. <br />\r\n		Please check back soon.\r\n		<br /><br /></h2>\r\n	{/if}\r\n	This competition has ended and is no longer active.<br />\r\n{/if}\r\n{* ************************************************************************************ *}\r\n\r\n<div id=\"prizeDesc\">{$competition.potDescription}<br />\r\n{if $competition.potAmount}<small style=\"color:#FFF;\">(${$competition.individualPotAmount} from {$competition.potMethod})</small>{/if}</div>\r\n\r\n{if $competition.startDate lt $smarty.now}\r\n	Time remaining: <b>{$competition.timeLeft}</b><br />\r\n{else}\r\n	This competition has not yet started!<br />\r\n{/if}\r\n\r\nStart{if $competition.startDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.startDate|date_format2:\"n/j/Y\"}</b> &nbsp; \r\nEnd{if $competition.endDate lt $smarty.now}ed{else}s{/if}: <b>{$competition.endDate|date_format2:\"n/j/Y\"}</b><br />\r\n{if $competition.calculationMode neq \"Real-Time\"}Competition stats/scoring updated as of {$competition.dateOfObject|date_format2:\"n/j/Y g:i A\"}{if $isManager} (<a href=\"?pg=competition&cid={$smarty.request.cid}&nocache=1\">Update Now!</a>){/if}<br />{/if}\r\n<div style=\"font-size:5px;clear:left;\">&nbsp;</div>\r\n{assign var=\"scoringMethod\" value=$competition.scoringMethod}\r\n{assign var=\"tieBreakerMethod\" value=$competition.tieBreakerMethod}\r\n{assign var=\"weeklyWinnersMethod1\" value=$competition.weeklyWinnersMethod1}\r\n{assign var=\"weeklyWinnersMethod2\" value=$competition.weeklyWinnersMethod2}\r\n\r\n{* ******************** WEEKLY WINNERS ********************* *}\r\n{if $competition.weeklyWinners}\r\n	{if $weeklyWinnersMethod1}             {* DON\'T FORGET TO REMOVE THE ACM CHECK WHEN READY!!! *}\r\n		<h2 class=\"withBG\">\r\n			<div class=\"topRight hideShow\">\r\n			<a href=\"javascript:toggle(\'weeklyWinners\', \'\', \'showHide\');\"><img id=\"weeklyWinners_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n			Last Week\'s Winners<i>!</i> <small style=\"color:#000; font-size:11px;\">(<i><b>{$competition.weeklyWinners.startDate|date_format2:\"D n/j\"}</b> through <b>{$competition.weeklyWinners.endDate|date_format2:\"D n/j\"}</b></i>)</small></h2> \r\n		<div id=\"weeklyWinners\">\r\n		<table width=\"100%\" cellpadding=\"3\" cellspacing=\"0\"><tr>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod1}</div>\r\n		<img src=\"{$skinFolder}images/winner_1.gif\" style=\"float:left;\" />\r\n		{strip}\r\n		{foreach name=\"method1\" from=$competition.weeklyWinners.$weeklyWinnersMethod1 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod1}\r\n			{if $smarty.foreach.method1.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method1.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method1.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> led the way last week by \r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b> {elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{else}<b>default</b>{/if}\r\n			{else}\r\n				{if $smarty.foreach.method1.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod1 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod1 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod1 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod2} \r\n		<td valign=\"top\" width=\"50%\">\r\n		<div class=\"cellHeadLarge\" style=\"width:auto;float:none;\">{$weeklyWinnersMethod2}</div>\r\n		<img src=\"{$skinFolder}images/winner_2.gif\" style=\"float:left;\" />\r\n		{* display var=$competition.weeklyWinners.users *}\r\n		{strip}\r\n		{foreach name=\"method2\" from=$competition.weeklyWinners.$weeklyWinnersMethod2 item=\"username\"}\r\n			{assign var=\"userValue\" value=$competition.weeklyWinners.users.$username.$weeklyWinnersMethod2}\r\n			\r\n			{if $smarty.foreach.method2.iteration gt 3 OR $userValue lte 0}{if $smarty.foreach.method2.iteration eq 1}Don\'t forget to update your progress so there will be winners next week{/if}<i>!</i>{php}break;{/php}\r\n			{elseif $smarty.foreach.method2.iteration eq 1}\r\n				<b>{$username|default:\"[ ?? ]\"|ucfirst}</b> won by \r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}losing <b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}losing <b>{$userValue|number_format:\"2\"}%</b> body weight{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}exercising a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}gaining <b>{$userValue}</b> pounds{/if}\r\n			{else}\r\n				{if $smarty.foreach.method2.iteration eq 2}, followed by <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{else} and <b>{$username|default:\"[ ?? ]\"|ucfirst}</b> with \r\n				{/if}\r\n				{if $weeklyWinnersMethod2 eq \'Weight Lost\'}<b>{$userValue}</b> pounds{elseif $weeklyWinnersMethod2 eq \'Percentage Weight Lost\'}<b>{$userValue|number_format:\"2\"}%</b>{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}a distance of <b>{$userValue}</b>{elseif $weeklyWinnersMethod2 eq \'Weight Gained\'}<b>{$userValue}</b> pounds{/if}\r\n			{/if}\r\n		{/foreach}\r\n		{/strip}\r\n		</td>\r\n	{/if}\r\n	{if $weeklyWinnersMethod1}\r\n	</tr></table></div>{/if}\r\n{/if}\r\n{* ********************************************************* *}\r\n\r\n{if $acm->isDomainAdmin() and $smarty.request.debug}\r\n	{display var=$competition}\r\n{/if} \r\n\r\n{* ******************************** COMPARISON GRAPHS ***************************************** *}\r\n{if $competition.graphParameters|@count}\r\n<script type=\"text/javascript\">{literal}\r\n	function rewriteGraphLinks() {\r\n		var gLinksDiv = document.getElementById(\'graphLinksDiv\');\r\n		gLinksDiv.innerHTML = \'\';\r\n		{/literal}{foreach name=\"graphTypes\" from=$competition.graphParameters item=\"cgp\"}\r\n		gLinksDiv.innerHTML += \'<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type={$cgp.name|niceText|replace:\" \":\"+\"}&esId={$cgp.estatId}&basedOn={$cgp.basedOn|replace:\" \":\"+\"}&fillPrevious={if $cgp.assumeConstantValues eq \"yes\"}1{else}0{/if}&precision={$cgp.decimalPlaces}&format=wide&userIds=\'+GUIDs+\'\" target=\"graphwindow\"><small>{$cgp.name|niceText|replace:\" \":\"&nbsp;\"}&nbsp;-&nbsp;{$cgp.basedOn|niceText|replace:\" \":\"&nbsp;\"}</small></a>{if !$smarty.foreach.graphTypes.last} | {/if}\';\r\n		{/foreach}\r\n	{literal}\r\n	}\r\n{/literal}</script>\r\n<h2 class=\"withBG\"><a name=\"graph\"></a>\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'graphs\', \'\', \'showHide\');\"><img id=\"graphs_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Comparison Graphs &nbsp; <small><i>No graph? <a href=\"http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\" target=\"_blank\">click here</a> to download the free Flash Player plug-in.</i></small></h2>\r\n<div id=\"graphs\" style=\"display:block;\">\r\n	<table border=\"0\" cellpadding=\"0\" width=\"100%\">\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&format=wide\"}\r\n	<tr>\r\n		<td><div style=\"border:#999 1px solid;background-color:#FFF;padding:5px;\"><iframe \"iframe_graphwindow\" name=\"graphwindow\" src=\"{$graphURL}\" frameborder=\"0\" width=\"625\" height=\"230\" scrollbars=\"no\"></iframe></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\" align=\"center\" width=\"100%\">\r\n		<div id=\"graphLinksDiv\">\r\n		<small>\r\n		{foreach name=\"graphTypes\" from=$competition.availableGraphs key=\"graphType\" item=\"graphParams\"}\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&{$graphParams}\');\" target=\"graphwindow\">{$graphType}</a>{if $smarty.foreach.graphTypes.iteration neq $competition.availableGraphs|@count} | {/if}\r\n		{/foreach}\r\n		</small></div></td>\r\n	</tr>\r\n	</table>\r\n	<script type=\"text/javascript\">\r\n		rewriteGraphLinks();\r\n	</script>\r\n<br />\r\n</div>\r\n{/if}\r\n\r\n{* ******************************** GROUP TEAMS/PLAYERS SUMMARY W/MOVING ***************************************** *}\r\n{if $competition.style eq \'Group-vs-Group\' or $competition.style eq \'Company-vs-Company\'}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'teams\', \'\', \'showHide\');\"><img id=\"teams_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	The Teams &nbsp; <small><i>Assignments and statistics</i></small></h2>\r\n<div id=\"teams\" style=\"display:block;\">\r\n<table cellpadding=\"0\" cellspacing=\"0\" width=\"100%\" border=\"0\"><tr><td>\r\n	<div align=\"right\" style=\"border-bottom:1px solid black; margin:2px; padding:2px;\">All stats based on: {$smarty.capture.scoringMethod}</div>\r\n	{if $canAssignToTeams}\r\n		<form name=\"changeTeam\" action=\"index.php\" method=\"POST\" style=\"margin:0px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n			<input type=\"hidden\" name=\"cid\" value=\"{$competition.id}\">\r\n			<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n			<input type=\"hidden\" name=\"no_expire_keep_alive\" value=\"cid\">\r\n	{/if}\r\n		{assign var=\"minEx\" value=\"Minutes Exercise\"}\r\n		{assign var=\"distEx\" value=\"Distance Exercised\"}\r\n		{assign var=\"pctLst\" value=\"Percentage Weight Lost\"}\r\n		{assign var=\"wtLst\" value=\"Percentage Weight Lost\"}\r\n		{foreach from=$competition.team_data name=\"teamsLoop\" item=\"teamScore\" key=\"teamName\"}\r\n			<div id=\"playersList{$smarty.foreach.teamsLoop.iteration}\" style=\"float:left;width:310px;overflow:hidden;word-wrap:nowrap; margin:0px 5px 5px 0px;\">\r\n			{if $teamName eq \"Waiting to Join\"}<h2>Not assigned to a team</h2>{else}<h4><span style=\"font-weight:normal;\">#{$smarty.foreach.teamsLoop.iteration}) </span>{$teamName|default:\"&nbsp;\"}{/if}</h4>\r\n			<table cellpadding=\"0\" cellspacing=\"0\" style=\"width:250px; background-color:#FFC;\">\r\n			<tr>\r\n				<td class=\"thinCell\" width=\"55%\">Name</td>\r\n				<td class=\"thinCell\" width=\"25%\"><img src=\"{$skinFolder}images/trophy_ico.gif\" width=\"15\" height=\"15\" alt=\"\" /></td>\r\n				<td class=\"thinCell\" width=\"20%\">Update</span>\r\n			</tr>\r\n			{foreach from=$competition.teams.$teamName item=\"userId\"}\r\n			<tr>\r\n				<td class=\"thinCell\" style=\"text-align:left;\"><small>{if $isManager or $userId eq $user->id}<input type=\"checkbox\" name=\"changeTeam[players][{$competition.users.$userId}]\" />{/if}{$competition.users.$userId}</small>{if $competition.team_captains.$teamName eq $userId OR $userId|@in_array:$competition.teams.$teamName} <img src=\"/systems/v2_ehc/images/ehc/ico/ico_captain.gif\" />{/if}</td>\r\n				{* <span class=\"cellTiny\"><small>{if $users.hideInitialWeight neq \"Yes\"}{$users.$pctLst|number_format:\"2\"|replace:\".00\":\"\"}{else}-{/if}</small></span> *}\r\n				<td class=\"thinCell\"><small>{$competition.data.$userId.val|number_format:$competition.current_parameter.decimalPlaces}</small></td>\r\n				<td class=\"thinCell\"><small>{if $competition.data.$userId.doe}{$competition.data.$userId.doe|date_format2:\"n/j/y\"}{else}Never{/if}</small></td>\r\n			</tr>\r\n			{foreachelse}\r\n			{* No players assigned to this team. *}\r\n			<tr>\r\n				<td class=\"thinCell\">No players yet.</td>\r\n			</tr>\r\n			{/foreach}\r\n\r\n			</table>\r\n			{if $smarty.server.REMOTE_ADDR eq \'206.71.78.158\' and $competition.team_captains.$teamName eq $user->id}\r\n				<div style=\"border:1px solid black; padding:5px;\">\r\n					E-Mail your team:<br />\r\n					<textarea name=\"email_team[{$teamName}][body]\" rows=\"30\" cols=\"10\"></textarea><br />\r\n					<input type=\"submit\" name=\"email_team_submit\" value=\"Send Message\" />\r\n				</div>\r\n			{/if}\r\n			</div>\r\n		{/foreach}\r\n	{if $canAssignToTeams and $competition.style neq \'Company-vs-Company\'}\r\n		<br />\r\n		<select name=\"changeTeam[team]\">\r\n			<option value=\"\">Move selected players to...</option>\r\n			{foreach from=$competition.teams item=\"newTeams\" key=\"newTeamName\"}\r\n				{*if $newTeamName ne $teamName and $newTeamName ne \"Waiting to Join\"*}\r\n				{if $newTeamName ne \"Waiting to Join\"}\r\n					<option value=\"{$newTeamName}\">{$newTeamName}</option>\r\n				{/if}\r\n			{/foreach}\r\n		</select><br />\r\n		<input id=\"assign_captains_checkbox\" type=\"checkbox\" name=\"assignCaptains\" value=\"1\"><label for=\"assign_captains_checkbox\"> Assign selected player(s) as captain(s)</label><br />\r\n		<input type=\"submit\" class=\"button\" value=\"Submit Changes\">\r\n		</form>\r\n		<img src=\"/systems/v2_ehc/images/ehc/ico/ico_captain.gif\" /> = Team Captain\r\n	{/if}\r\n</td></tr></table>\r\n</div>\r\n{/if}\r\n</div>\r\n	{* ******************************** DISCUSSION BOARD ***************************************** *}\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'discuss\', \'\', \'showHide\');\"><img id=\"discuss_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Discussion Board</h2>\r\n<div id=\"discuss\" style=\"display:block;\">\r\n	<table cellpadding=\"0\" width=\"100%\" border=\"0\"><tr><td><iframe src=\"?pg=competition/forum\" id=\"discussionBoard\" frameborder=\"0\" scrolling=\"yes\" style=\"width:100%;\"></iframe></td></tr></table>\r\n</div>\r\n\r\n</div></td>\r\n</tr></table>\r\n\r\n{*\r\n<script type=\"text/javascript\">{literal}\r\n	if ( window.frames != null ) {\r\n	    for ( i = 0; i< window.frames.length; i++ )\r\n	        window.alert (\"Child window \" +i+ \" is named \"+window.frames(i).name);\r\n	}\r\n{/literal}</script>\r\n*}'),(4597,268,0.13,'smarty','0','Page created.',1131739593,1124,'128.187.0.165','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<hl>Strength Training for Older Adults</hl>\r\n<p>Research has shown that strengthening exercises are both safe and effective for women and men of all ages, including those who are not in perfect health. In fact, people with health concerns—including heart disease or arthritis—often benefit the most from an exercise program that includes lifting weights a few times each week.</p>\r\n\r\n<p>Strength training, particularly in conjunction with regular aerobic exercise, can also have a profound impact on a person\'s mental and emotional health.</p>\r\n<p><b>Benefits of Strength Training</b></p>\r\n<p>There are numerous benefits to strength training regularly, particularly as you grow older. It can be very powerful in reducing the signs and symptoms of numerous diseases and chronic conditions, among them:</p>\r\n	<li>arthritis</li>\r\n	<li>diabetes</li>\r\n	<li>osteoporosis</li>\r\n	<li>obesity</li>\r\n	<li>back pain</li>\r\n	<li>depression </li>\r\n\r\n<p><b>Arthritis Relief</b></p>\r\n<p>Tufts University recently completed a strength-training program with older men and women with moderate to severe knee osteoarthritis. The results of this sixteen-week program showed that strength training decreased pain by 43%, increased muscle strength and general physical performance, improved the clinical signs and symptoms of the disease, and decreased disability. The effectiveness of strength training to ease the pain of osteoarthritis was just as potent, if not more potent, as medications. Similar effects of strength training have been seen in patients with rheumatoid arthritis.</p>\r\n\r\n<p><b>Strengthening of Bone</b></p>\r\n<p>Post-menopausal women can lose 1-2% of their bone mass annually. Results from a study conducted at Tufts University, which were published in the Journal of the American Medical Association in 1994, showed that strength training increases bone density and reduces the risk for fractures among women aged 50-70.</p>\r\n\r\n<p><b>Proper Weight Maintenance</b></p>\r\n<p>Strength training is crucial to weight control, because individuals who have more muscle mass have a higher metabolic rate. Muscle is active tissue that consumes calories while stored fat uses very little energy. Strength training can provide up to a 15% increase in metabolic rate, which is enormously helpful for weight loss and long-term weight control.</p>\r\n\r\n<p><b>Improved Glucose Control</b></p>\r\n<p>More than 14 million Americans have type II diabetes—a staggering three-hundred percent increase over the past forty years—and the numbers are steadily climbing. In addition to being at greater risk for heart and renal disease, diabetes is also the leading cause of blindness in older adults. Fortunately, studies now show that lifestyle changes such as strength training have a profound impact on helping older adults manage their diabetes. In a recent study of Hispanic men and women, 16 weeks of strength training produced dramatic improvements in glucose control that are comparable to taking diabetes medication. Additionally, the study volunteers were stronger, gained muscle, lost body fat, had less depression, and felt much more self-confident.</p>\r\n\r\n<p><b>Healthy State of Mind</b></p>\r\n<p>Strength training provides similar improvements in depression as anti-depressant medications. Currently, it is not known if this is because people feel better when they are stronger or if strength training produces a helpful biochemical change in the brain. It is most likely a combination of the two. When older adults participate in strength training programs, their self-confidence and self-esteem improve, which has a strong impact on their overall quality of life.</p>\r\n\r\n<p><b>Sleep Improvement</b></p>\r\n<p>People who exercise regularly enjoy improved sleep quality. They fall asleep more quickly, sleep more deeply, awaken less often, and sleep longer. As with depression, the sleep benefits obtained as a result of strength training are comparable to treatment with medication but without the side effects or the expense.</p>\r\n\r\n<p><b>Healthy Heart Tissue</b></p>\r\n<p>Strength training is important for cardiac health because heart disease risk is lower when the body is leaner. One study found that cardiac patients gained not only strength and flexibility but also aerobic capacity when they did strength training three times a week as part of their rehabilitation program. This and other studies have prompted the American Heart Association to recommend strength training as a way to reduce risk of heart disease and as a therapy for patients in cardiac rehabilitation programs.</p>\r\n'),(4598,268,0.14,'smarty','0','Page created.',1131739634,1124,'128.187.0.165','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<hl><b>Strength Training for Older Adults</b></hl>\r\n<p>Research has shown that strengthening exercises are both safe and effective for women and men of all ages, including those who are not in perfect health. In fact, people with health concerns—including heart disease or arthritis—often benefit the most from an exercise program that includes lifting weights a few times each week.</p>\r\n\r\n<p>Strength training, particularly in conjunction with regular aerobic exercise, can also have a profound impact on a person\'s mental and emotional health.</p>\r\n<p><b>Benefits of Strength Training</b></p>\r\n<p>There are numerous benefits to strength training regularly, particularly as you grow older. It can be very powerful in reducing the signs and symptoms of numerous diseases and chronic conditions, among them:</p>\r\n	<li>arthritis</li>\r\n	<li>diabetes</li>\r\n	<li>osteoporosis</li>\r\n	<li>obesity</li>\r\n	<li>back pain</li>\r\n	<li>depression </li>\r\n\r\n<p><b>Arthritis Relief</b></p>\r\n<p>Tufts University recently completed a strength-training program with older men and women with moderate to severe knee osteoarthritis. The results of this sixteen-week program showed that strength training decreased pain by 43%, increased muscle strength and general physical performance, improved the clinical signs and symptoms of the disease, and decreased disability. The effectiveness of strength training to ease the pain of osteoarthritis was just as potent, if not more potent, as medications. Similar effects of strength training have been seen in patients with rheumatoid arthritis.</p>\r\n\r\n<p><b>Strengthening of Bone</b></p>\r\n<p>Post-menopausal women can lose 1-2% of their bone mass annually. Results from a study conducted at Tufts University, which were published in the Journal of the American Medical Association in 1994, showed that strength training increases bone density and reduces the risk for fractures among women aged 50-70.</p>\r\n\r\n<p><b>Proper Weight Maintenance</b></p>\r\n<p>Strength training is crucial to weight control, because individuals who have more muscle mass have a higher metabolic rate. Muscle is active tissue that consumes calories while stored fat uses very little energy. Strength training can provide up to a 15% increase in metabolic rate, which is enormously helpful for weight loss and long-term weight control.</p>\r\n\r\n<p><b>Improved Glucose Control</b></p>\r\n<p>More than 14 million Americans have type II diabetes—a staggering three-hundred percent increase over the past forty years—and the numbers are steadily climbing. In addition to being at greater risk for heart and renal disease, diabetes is also the leading cause of blindness in older adults. Fortunately, studies now show that lifestyle changes such as strength training have a profound impact on helping older adults manage their diabetes. In a recent study of Hispanic men and women, 16 weeks of strength training produced dramatic improvements in glucose control that are comparable to taking diabetes medication. Additionally, the study volunteers were stronger, gained muscle, lost body fat, had less depression, and felt much more self-confident.</p>\r\n\r\n<p><b>Healthy State of Mind</b></p>\r\n<p>Strength training provides similar improvements in depression as anti-depressant medications. Currently, it is not known if this is because people feel better when they are stronger or if strength training produces a helpful biochemical change in the brain. It is most likely a combination of the two. When older adults participate in strength training programs, their self-confidence and self-esteem improve, which has a strong impact on their overall quality of life.</p>\r\n\r\n<p><b>Sleep Improvement</b></p>\r\n<p>People who exercise regularly enjoy improved sleep quality. They fall asleep more quickly, sleep more deeply, awaken less often, and sleep longer. As with depression, the sleep benefits obtained as a result of strength training are comparable to treatment with medication but without the side effects or the expense.</p>\r\n\r\n<p><b>Healthy Heart Tissue</b></p>\r\n<p>Strength training is important for cardiac health because heart disease risk is lower when the body is leaner. One study found that cardiac patients gained not only strength and flexibility but also aerobic capacity when they did strength training three times a week as part of their rehabilitation program. This and other studies have prompted the American Heart Association to recommend strength training as a way to reduce risk of heart disease and as a therapy for patients in cardiac rehabilitation programs.</p>\r\n'),(4599,268,0.15,'smarty','1','Page created.',1131739634,1124,'128.187.0.165','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<hl><b>Strength Training for Older Adults</b></hl>\r\n<p>Research has shown that strengthening exercises are both safe and effective for women and men of all ages, including those who are not in perfect health. In fact, people with health concerns—including heart disease or arthritis—often benefit the most from an exercise program that includes lifting weights a few times each week.</p>\r\n\r\n<p>Strength training, particularly in conjunction with regular aerobic exercise, can also have a profound impact on a person\'s mental and emotional health.</p>\r\n<p><b>Benefits of Strength Training</b></p>\r\n<p>There are numerous benefits to strength training regularly, particularly as you grow older. It can be very powerful in reducing the signs and symptoms of numerous diseases and chronic conditions, among them:</p>\r\n	<li>arthritis</li>\r\n	<li>diabetes</li>\r\n	<li>osteoporosis</li>\r\n	<li>obesity</li>\r\n	<li>back pain</li>\r\n	<li>depression </li>\r\n\r\n<p><b>Arthritis Relief</b></p>\r\n<p>Tufts University recently completed a strength-training program with older men and women with moderate to severe knee osteoarthritis. The results of this sixteen-week program showed that strength training decreased pain by 43%, increased muscle strength and general physical performance, improved the clinical signs and symptoms of the disease, and decreased disability. The effectiveness of strength training to ease the pain of osteoarthritis was just as potent, if not more potent, as medications. Similar effects of strength training have been seen in patients with rheumatoid arthritis.</p>\r\n\r\n<p><b>Strengthening of Bone</b></p>\r\n<p>Post-menopausal women can lose 1-2% of their bone mass annually. Results from a study conducted at Tufts University, which were published in the Journal of the American Medical Association in 1994, showed that strength training increases bone density and reduces the risk for fractures among women aged 50-70.</p>\r\n\r\n<p><b>Proper Weight Maintenance</b></p>\r\n<p>Strength training is crucial to weight control, because individuals who have more muscle mass have a higher metabolic rate. Muscle is active tissue that consumes calories while stored fat uses very little energy. Strength training can provide up to a 15% increase in metabolic rate, which is enormously helpful for weight loss and long-term weight control.</p>\r\n\r\n<p><b>Improved Glucose Control</b></p>\r\n<p>More than 14 million Americans have type II diabetes—a staggering three-hundred percent increase over the past forty years—and the numbers are steadily climbing. In addition to being at greater risk for heart and renal disease, diabetes is also the leading cause of blindness in older adults. Fortunately, studies now show that lifestyle changes such as strength training have a profound impact on helping older adults manage their diabetes. In a recent study of Hispanic men and women, 16 weeks of strength training produced dramatic improvements in glucose control that are comparable to taking diabetes medication. Additionally, the study volunteers were stronger, gained muscle, lost body fat, had less depression, and felt much more self-confident.</p>\r\n\r\n<p><b>Healthy State of Mind</b></p>\r\n<p>Strength training provides similar improvements in depression as anti-depressant medications. Currently, it is not known if this is because people feel better when they are stronger or if strength training produces a helpful biochemical change in the brain. It is most likely a combination of the two. When older adults participate in strength training programs, their self-confidence and self-esteem improve, which has a strong impact on their overall quality of life.</p>\r\n\r\n<p><b>Sleep Improvement</b></p>\r\n<p>People who exercise regularly enjoy improved sleep quality. They fall asleep more quickly, sleep more deeply, awaken less often, and sleep longer. As with depression, the sleep benefits obtained as a result of strength training are comparable to treatment with medication but without the side effects or the expense.</p>\r\n\r\n<p><b>Healthy Heart Tissue</b></p>\r\n<p>Strength training is important for cardiac health because heart disease risk is lower when the body is leaner. One study found that cardiac patients gained not only strength and flexibility but also aerobic capacity when they did strength training three times a week as part of their rehabilitation program. This and other studies have prompted the American Heart Association to recommend strength training as a way to reduce risk of heart disease and as a therapy for patients in cardiac rehabilitation programs.</p>\r\n'),(4600,269,0.10,'smarty','0','Page created.',1131739854,1124,'128.187.0.165',''),(4601,269,0.11,'smarty','0','Page created.',1131740109,1124,'128.187.0.165','<hl>Measuring Physical Activity Intensity</hl>\r\n<p>Walking up stairs burns almost five times more calories than riding an elevator. </p>\r\n<p><b>Time Depends on Intensity</b></p>\r\n<p>Higher intensity activities require less time spent. Lower intensity activities require more time spent.</p>\r\n<p><b>Light-Intensity Activities:</b></p>\r\n•	Walking slowly\r\n•	Golf, powered cart\r\n•	Swimming, slow treading\r\n•	Gardening or pruning\r\n•	Bicycling, very light effort\r\n•	Dusting or vacuuming\r\n•	Conditioning exercise, light stretching or warm up\r\n<p><b>Moderate-Intensity Activities:</b></p>\r\n•	Walking briskly\r\n•	Golf, pulling or carrying clubs\r\n•	Swimming, recreational\r\n•	Mowing lawn, power motor\r\n•	Tennis, doubles\r\n•	Bicycling 5 to 9 mph, level terrain, or with a few hills\r\n•	Scrubbing floors or washing windows\r\n•	Weight lifting, Nautilus machines or free weights\r\n<p><b>Vigorous-Intensity Activities:</b></p>\r\n•	Racewalking, jogging or running\r\n•	Swimming laps\r\n•	Mowing lawn, hand mower\r\n•	Tennis, singles\r\n•	Bicycling more than 10 mph, or on steep uphill terrain\r\n•	Moving or pushing furniture\r\n•	Circuit training\r\n<p><b>Time Depends on Intensity</b></p>\r\n \r\n'),(4602,269,0.12,'smarty','0','Page created.',1131740162,1124,'128.187.0.165','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<hl>Measuring Physical Activity Intensity</hl>\r\n<p>Walking up stairs burns almost five times more calories than riding an elevator. </p>\r\n<p><b>Time Depends on Intensity</b></p>\r\n<p>Higher intensity activities require less time spent. Lower intensity activities require more time spent.</p>\r\n<p><b>Light-Intensity Activities:</b></p>\r\n•	Walking slowly\r\n•	Golf, powered cart\r\n•	Swimming, slow treading\r\n•	Gardening or pruning\r\n•	Bicycling, very light effort\r\n•	Dusting or vacuuming\r\n•	Conditioning exercise, light stretching or warm up\r\n<p><b>Moderate-Intensity Activities:</b></p>\r\n•	Walking briskly\r\n•	Golf, pulling or carrying clubs\r\n•	Swimming, recreational\r\n•	Mowing lawn, power motor\r\n•	Tennis, doubles\r\n•	Bicycling 5 to 9 mph, level terrain, or with a few hills\r\n•	Scrubbing floors or washing windows\r\n•	Weight lifting, Nautilus machines or free weights\r\n<p><b>Vigorous-Intensity Activities:</b></p>\r\n•	Racewalking, jogging or running\r\n•	Swimming laps\r\n•	Mowing lawn, hand mower\r\n•	Tennis, singles\r\n•	Bicycling more than 10 mph, or on steep uphill terrain\r\n•	Moving or pushing furniture\r\n•	Circuit training\r\n<p><b>Time Depends on Intensity</b></p>\r\n \r\n'),(4603,269,0.13,'smarty','1','Page created.',1131740224,1124,'128.187.0.165','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<hl><b>Measuring Physical Activity Intensity</b></hl>\r\n<p>Walking up stairs burns almost five times more calories than riding an elevator. </p>\r\n<p><b>Time Depends on Intensity</b></p>\r\n<p>Higher intensity activities require less time spent. Lower intensity activities require more time spent.</p>\r\n<p><b>Light-Intensity Activities:</b></p>\r\n•	Walking slowly\r\n•	Golf, powered cart\r\n•	Swimming, slow treading\r\n•	Gardening or pruning\r\n•	Bicycling, very light effort\r\n•	Dusting or vacuuming\r\n•	Conditioning exercise, light stretching or warm up\r\n<p><b>Moderate-Intensity Activities:</b></p>\r\n•	Walking briskly\r\n•	Golf, pulling or carrying clubs\r\n•	Swimming, recreational\r\n•	Mowing lawn, power motor\r\n•	Tennis, doubles\r\n•	Bicycling 5 to 9 mph, level terrain, or with a few hills\r\n•	Scrubbing floors or washing windows\r\n•	Weight lifting, Nautilus machines or free weights\r\n<p><b>Vigorous-Intensity Activities:</b></p>\r\n•	Racewalking, jogging or running\r\n•	Swimming laps\r\n•	Mowing lawn, hand mower\r\n•	Tennis, singles\r\n•	Bicycling more than 10 mph, or on steep uphill terrain\r\n•	Moving or pushing furniture\r\n•	Circuit training\r\n<p><b>Time Depends on Intensity</b></p>\r\n \r\n'),(4604,270,0.10,'smarty','0','Page created.',1132591946,1124,'128.187.0.165',''),(4605,270,0.11,'smarty','0','Page created.',1132592246,1124,'128.187.0.165','<hl>Small Steps</hl>\r\n<b>Take Small Steps Today!</b>\r\n\r\n1. Walk to work.\r\n2. Use fat free milk over whole milk.\r\n3. Do sit-ups in front of the TV.\r\n4. Walk during lunch hour.\r\n5. Drink water before a meal.\r\n6. Eat leaner red meat & poultry.\r\n7. Eat half your dessert.\r\n8. Walk instead of driving whenever you can.\r\n9. Take family walk after dinner.\r\n10. Skate to work instead of driving.\r\n11. Avoid food portions larger than your fist.\r\n12. Mow lawn with push mower.\r\n13. Increase the fiber in your diet.\r\n14. Walk to your place of worship instead of driving.\r\n15. Walk kids to school.\r\n16. Get a dog and walk it.\r\n17. Join an exercise group.\r\n18. Drink diet soda.\r\n19. Replace Sunday drive with Sunday walk.\r\n20. Do yard work.\r\n21. Eat off smaller plates.\r\n22. Get off a stop early & walk.\r\n23. Don\'t eat late at night.\r\n24. Skip seconds.\r\n25. Work around the house.\r\n26. Skip buffets.\r\n27. Grill, steam or bake instead of frying.\r\n28. Bicycle to the store instead of driving.\r\n29. Take dog to the park.\r\n30. Ask your doctor about taking a multi-vitamin.\r\n31. Go for a half-hour walk instead of watching TV.\r\n32. Use vegetable oils over solid fats.\r\n33. More carrots, less cake.\r\n34. Fetch the newspaper yourself.\r\n35. Sit up straight at work.\r\n36. Wash the car by hand.\r\n37. Don\'t skip meals.\r\n38. Eat more celery sticks.\r\n39. Run when running errands.\r\n40. Pace the sidelines at kids\' athletic games.\r\n41. Take wheels off luggage.\r\n42. Choose an activity that fits into your daily life.\r\n43. Try your burger with just lettuce, tomato, and onion.\r\n44. Ask a friend to exercise with you.\r\n45. Make time in your day for physical activity.\r\n46. Exercise with a video if the weather is bad.\r\n47. Bike to the barbershop or beauty salon instead of driving.\r\n48. Keep to a regular eating schedule.\r\n49. If you find it difficult to be active after work, try it before work.\r\n50. Take a walk or do desk exercises instead of a cigarette or coffee break.\r\n51. Perform gardening or home repair activities.\r\n52. Avoid laborsaving devices.\r\n53. Take small trips on foot to get your body moving.\r\n54. Play with your kids 30 minutes a day.\r\n55. Dance to music.\r\n56. Keep a pair of comfortable walking or running shoes in your car and office.\r\n57. Make a Saturday morning walk a group habit.\r\n58. Walk briskly in the mall.\r\n59. Choose activities you enjoy & you\'ll be more likely to stick with them.\r\n60. Stretch before bed to give you more energy when you wake.\r\n61. Take the long way to the water cooler.\r\n62. Explore new physical activities.\r\n63. Vary your activities, for interest and to broaden the range of benefits.\r\n64. Reward and acknowledge your efforts.\r\n65. Choose fruit for dessert.\r\n66. Consume alcoholic beverages in moderation, if at all.\r\n67. Take stairs instead of the escalator.\r\n68. Conduct an inventory of your meal/snack and physical activity patterns.\r\n69. Share an entree with a friend.\r\n70. Grill fruits or vegetables.\r\n71. Eat before grocery shopping.\r\n72. Choose a checkout line without a candy display.\r\n73. Make a grocery list before you shop.\r\n74. Buy 100% fruit juices over soda and sugary drinks.\r\n75. Stay active in winter.  Play with your kids.\r\n76. Flavor foods with herbs, spices, and other low fat seasonings.\r\n77. Remove skin from poultry before cooking to lower fat content.\r\n78. Eat before you get too hungry.\r\n79. Don\'t skip breakfast.\r\n80. Stop eating when you are full.\r\n81. Snack on fruits and vegetables.\r\n82. Top your favorite cereal with apples or bananas.\r\n83. Try brown rice or whole-wheat pasta.\r\n84. Include several servings of whole grain food daily.\r\n85. When eating out, choose a small or medium portion.\r\n86. If main dishes are too big, choose an appetizer or a side dish instead.\r\n87. Ask for salad dressing \"on the side\".\r\n88. Don\'t take seconds.\r\n89. Park farther from destination and walk.\r\n90. Try a green salad instead of fries.\r\n91. Bake or broil fish.\r\n92. Walk instead of sitting around.\r\n93. Eat sweet foods in small amounts.\r\n94. Take your dog on longer walks.\r\n95. Drink lots of water.\r\n96. Cut back on added fats or oils in cooking or spreads.\r\n97. Walk the beach instead of sunbathing.\r\n98. Walk to a co-worker\'s desk instead of emailing or calling them.\r\n99. Carry your groceries instead of pushing a cart.\r\n100. Use a snow shovel instead of a snow blower.\r\n101. Cut high-calorie foods like cheese and chocolate into smaller pieces and only eat a few pieces. \r\n 102. Use nonfat or low-fat sour cream, mayo, sauces, dressings, and other condiments. \r\n 103. Replace sugar sweetened beverages with water and add a twist of lemon or lime. \r\n 104. Replace high-saturated fat/high calorie seasonings with herbs grown in a small herb garden in your kitchen window. \r\n 105. Refrigerate prepared soups before you eat them. As the soup cools, the fat will rise to the top.  Skim it off the surface for reduced fat content. \r\n 106. When eating out, ask your server to put half your entrée in a to-go bag. \r\n 107. Substitute vegetables for other ingredients in your sandwich. \r\n 108. Every time you eat a meal, sit down, chew slowly, and pay attention to flavors and textures. \r\n 109. Try a new fruit or vegetable (ever had jicama, plantain, bok choy, starfruit or papaya?) \r\n 110. Make up a batch of brownies with applesauce instead of oil or shortening. \r\n 111. Instead of eating out, bring a healthy, low calorie lunch to work. \r\n 112. Ask your sweetie to bring you fruit or flowers instead of chocolate. \r\n 113. Speak up for the salad bar when your coworkers are picking a restaurant for lunch, and remember calories count, so pay attention to how much and what you eat. \r\n 114. When walking, go up the hills instead of around them. \r\n 115. Walk briskly through the mall and shop \'til you drop ... pounds. \r\n 116. Clean your closet and donate clothes that are too big. \r\n 117. Take your body measurements to gauge progress. \r\n 118. Buy a set of hand weights and play a round of Simon Says with your kids - you do it with the weights, they do without.\r\n119.  Swim with your kids.\r\n'),(4606,270,0.12,'smarty','0','Page created.',1132593326,1124,'128.187.0.165','<hl>Small Steps</hl>\r\n<p><b>Take Small Steps Today!</b></p>\r\n\r\n<p>1. Walk to work.</p>\r\n<p>2. Use fat free milk over whole milk.</p>\r\n<p>3. Do sit-ups in front of the TV.</p>\r\n<p>4. Walk during lunch hour.  </p>\r\n<p>5. Drink water before a meal. </p>\r\n<p>6. Eat leaner red meat & poultry. </p>\r\n<p>7. Eat half your dessert.</p>\r\n<p>8. Walk instead of driving whenever you can.</p>\r\n<p>9. Take family walk after dinner.</p>\r\n<p>10. Skate to work instead of driving.</p>\r\n<p>11. Avoid food portions larger than your fist.</p>\r\n<p>12. Mow lawn with push mower.</p>\r\n<p>13. Increase the fiber in your diet.</p>\r\n<p>14. Walk to your place of worship instead of driving.</p>\r\n<p>15. Walk kids to school.</p>\r\n<p>16. Get a dog and walk it.</p>\r\n<p>17. Join an exercise group.</p>\r\n<p>18. Drink diet soda.</p>\r\n<p>19. Replace Sunday drive with Sunday walk.</p>\r\n<p>20. Do yard work.</p>\r\n<p>21. Eat off smaller plates.</p>\r\n<p>22. Get off a stop early & walk.</p>\r\n<p>23. Don\'t eat late at night.</p>\r\n<p>24. Skip seconds.</p>\r\n<p>25. Work around the house.</p>\r\n<p>26. Skip buffets.</p>\r\n<p>27. Grill, steam or bake instead of frying.</p>\r\n<p>28. Bicycle to the store instead of driving.</p>\r\n<p>29. Take dog to the park.</p>\r\n<p>30. Ask your doctor about taking a multi-vitamin.</p>\r\n<p>31. Go for a half-hour walk instead of watching TV.</p>\r\n<p>32. Use vegetable oils over solid fats.</p>\r\n<p>33. More carrots, less cake.</p>\r\n<p>34. Fetch the newspaper yourself.</p>\r\n<p>35. Sit up straight at work.</p>\r\n<p>36. Wash the car by hand.</p>\r\n<p>37. Don\'t skip meals.</p>\r\n<p>38. Eat more celery sticks.</p>\r\n<p>39. Run when running errands.</p>\r\n<p>40. Pace the sidelines at kids\' athletic games.</p>\r\n<p>41. Take wheels off luggage.</p>\r\n<p>42. Choose an activity that fits into your daily life.</p>\r\n<p>43. Try your burger with just lettuce, tomato, and onion.</p>\r\n<p>44. Ask a friend to exercise with you.</p>\r\n<p>45. Make time in your day for physical activity.</p>\r\n<p>46. Exercise with a video if the weather is bad.</p>\r\n<p>47. Bike to the barbershop or beauty salon instead of driving.</p>\r\n<p>48. Keep to a regular eating schedule.</p>\r\n<p>49. If you find it difficult to be active after work, try it before work.</p>\r\n<p>50. Take a walk or do desk exercises instead of a cigarette or coffee break.</p>\r\n<p>51. Perform gardening or home repair activities.</p>\r\n<p>52. Avoid laborsaving devices.</p>\r\n<p>53. Take small trips on foot to get your body moving.</p>\r\n<p>54. Play with your kids 30 minutes a day.</p>\r\n<p>55. Dance to music.</p>\r\n<p>56. Keep a pair of comfortable walking or running shoes in your car and office.</p>\r\n<p>57. Make a Saturday morning walk a group habit.</p>\r\n<p>58. Walk briskly in the mall.</p>\r\n<p>59. Choose activities you enjoy & you\'ll be more likely to stick with them.</p>\r\n<p>60. Stretch before bed to give you more energy when you wake.</p>\r\n<p>61. Take the long way to the water cooler.</p>\r\n<p>62. Explore new physical activities.</p>\r\n<p>63. Vary your activities, for interest and to broaden the range of benefits.</p>\r\n<p>64. Reward and acknowledge your efforts.</p>\r\n<p>65. Choose fruit for dessert.</p>\r\n<p>66. Consume alcoholic beverages in moderation, if at all.</p>\r\n<p>67. Take stairs instead of the escalator.</p>\r\n<p>68. Conduct an inventory of your meal/snack and physical activity patterns.</p>\r\n<p>69. Share an entree with a friend.</p>\r\n<p>70. Grill fruits or vegetables.</p>\r\n<p>71. Eat before grocery shopping.</p>\r\n<p>72. Choose a checkout line without a candy display.</p>\r\n<p>73. Make a grocery list before you shop.</p>\r\n<p>74. Buy 100% fruit juices over soda and sugary drinks.</p>\r\n<p>75. Stay active in winter.  Play with your kids.</p>\r\n<p>76. Flavor foods with herbs, spices, and other low fat seasonings.</p>\r\n<p>77. Remove skin from poultry before cooking to lower fat content.</p>\r\n<p>78. Eat before you get too hungry.</p>\r\n<p>79. Don\'t skip breakfast.</p>\r\n<p>80. Stop eating when you are full.</p>\r\n<p>81. Snack on fruits and vegetables.</p>\r\n<p>82. Top your favorite cereal with apples or bananas.</p>\r\n<p>83. Try brown rice or whole-wheat pasta.</p>\r\n<p>84. Include several servings of whole grain food daily.</p>\r\n<p>85. When eating out, choose a small or medium portion.</p>\r\n<p>86. If main dishes are too big, choose an appetizer or a side dish instead.</p>\r\n<p>87. Ask for salad dressing \"on the side\".</p>\r\n<p>88. Don\'t take seconds.</p>\r\n<p>89. Park farther from destination and walk.</p>\r\n<p>90. Try a green salad instead of fries.</p>\r\n<p>91. Bake or broil fish.</p>\r\n<p>92. Walk instead of sitting around.</p>\r\n<p>93. Eat sweet foods in small amounts.</p>\r\n<p>94. Take your dog on longer walks.</p>\r\n<p>95. Drink lots of water.</p>\r\n<p>96. Cut back on added fats or oils in cooking or spreads.</p>\r\n<p>97. Walk the beach instead of sunbathing.</p>\r\n<p>98. Walk to a co-worker\'s desk instead of emailing or calling them.</p>\r\n<p>99. Carry your groceries instead of pushing a cart.</p>\r\n<p>100. Use a snow shovel instead of a snow blower.</p>\r\n<p>101. Cut high-calorie foods like cheese and chocolate into smaller pieces and only eat a few pieces. </p>\r\n<p> 102. Use nonfat or low-fat sour cream, mayo, sauces, dressings, and other condiments. </p>\r\n<p> 103. Replace sugar sweetened beverages with water and add a twist of lemon or lime. </p>\r\n<p> 104. Replace high-saturated fat/high calorie seasonings with herbs grown in a small herb garden in your kitchen window. </p>\r\n<p> 105. Refrigerate prepared soups before you eat them. As the soup cools, the fat will rise to the top.  Skim it off the surface for reduced fat content. </p>\r\n<p> 106. When eating out, ask your server to put half your entrée in a to-go bag. </p>\r\n<p> 107. Substitute vegetables for other ingredients in your sandwich. </p>\r\n<p> 108. Every time you eat a meal, sit down, chew slowly, and pay attention to flavors and textures. </p>\r\n<p> 109. Try a new fruit or vegetable (ever had jicama, plantain, bok choy, starfruit or papaya?) </p>\r\n<p> 110. Make up a batch of brownies with applesauce instead of oil or shortening. </p>\r\n<p> 111. Instead of eating out, bring a healthy, low calorie lunch to work. </p>\r\n<p> 112. Ask your sweetie to bring you fruit or flowers instead of chocolate. </p>\r\n<p> 113. Speak up for the salad bar when your coworkers are picking a restaurant for lunch, and remember calories count, so pay attention to how much and what you eat. </p>\r\n<p> 114. When walking, go up the hills instead of around them.</p> \r\n<p> 115. Walk briskly through the mall and shop \'til you drop ... pounds.</p> \r\n <p>116. Clean your closet and donate clothes that are too big. </p>\r\n<p> 117. Take your body measurements to gauge progress. </p>\r\n <p>118. Buy a set of hand weights and play a round of Simon Says with your kids - you do it with the weights, they do without.</p>\r\n<p>119.  Swim with your kids.</p>\r\n'),(4607,270,0.13,'smarty','0','Page created.',1132593407,1124,'128.187.0.165','\r\n\r\n<hl>Small Steps</hl>\r\n<p><b>Take Small Steps Today!</b></p>\r\n\r\n<p>1. Walk to work.</p>\r\n<p>2. Use fat free milk over whole milk.</p>\r\n<p>3. Do sit-ups in front of the TV.</p>\r\n<p>4. Walk during lunch hour.  </p>\r\n<p>5. Drink water before a meal. </p>\r\n<p>6. Eat leaner red meat & poultry. </p>\r\n<p>7. Eat half your dessert.</p>\r\n<p>8. Walk instead of driving whenever you can.</p>\r\n<p>9. Take family walk after dinner.</p>\r\n<p>10. Skate to work instead of driving.</p>\r\n<p>11. Avoid food portions larger than your fist.</p>\r\n<p>12. Mow lawn with push mower.</p>\r\n<p>13. Increase the fiber in your diet.</p>\r\n<p>14. Walk to your place of worship instead of driving.</p>\r\n<p>15. Walk kids to school.</p>\r\n<p>16. Get a dog and walk it.</p>\r\n<p>17. Join an exercise group.</p>\r\n<p>18. Drink diet soda.</p>\r\n<p>19. Replace Sunday drive with Sunday walk.</p>\r\n<p>20. Do yard work.</p>\r\n<p>21. Eat off smaller plates.</p>\r\n<p>22. Get off a stop early & walk.</p>\r\n<p>23. Don\'t eat late at night.</p>\r\n<p>24. Skip seconds.</p>\r\n<p>25. Work around the house.</p>\r\n<p>26. Skip buffets.</p>\r\n<p>27. Grill, steam or bake instead of frying.</p>\r\n<p>28. Bicycle to the store instead of driving.</p>\r\n<p>29. Take dog to the park.</p>\r\n<p>30. Ask your doctor about taking a multi-vitamin.</p>\r\n<p>31. Go for a half-hour walk instead of watching TV.</p>\r\n<p>32. Use vegetable oils over solid fats.</p>\r\n<p>33. More carrots, less cake.</p>\r\n<p>34. Fetch the newspaper yourself.</p>\r\n<p>35. Sit up straight at work.</p>\r\n<p>36. Wash the car by hand.</p>\r\n<p>37. Don\'t skip meals.</p>\r\n<p>38. Eat more celery sticks.</p>\r\n<p>39. Run when running errands.</p>\r\n<p>40. Pace the sidelines at kids\' athletic games.</p>\r\n<p>41. Take wheels off luggage.</p>\r\n<p>42. Choose an activity that fits into your daily life.</p>\r\n<p>43. Try your burger with just lettuce, tomato, and onion.</p>\r\n<p>44. Ask a friend to exercise with you.</p>\r\n<p>45. Make time in your day for physical activity.</p>\r\n<p>46. Exercise with a video if the weather is bad.</p>\r\n<p>47. Bike to the barbershop or beauty salon instead of driving.</p>\r\n<p>48. Keep to a regular eating schedule.</p>\r\n<p>49. If you find it difficult to be active after work, try it before work.</p>\r\n<p>50. Take a walk or do desk exercises instead of a cigarette or coffee break.</p>\r\n<p>51. Perform gardening or home repair activities.</p>\r\n<p>52. Avoid laborsaving devices.</p>\r\n<p>53. Take small trips on foot to get your body moving.</p>\r\n<p>54. Play with your kids 30 minutes a day.</p>\r\n<p>55. Dance to music.</p>\r\n<p>56. Keep a pair of comfortable walking or running shoes in your car and office.</p>\r\n<p>57. Make a Saturday morning walk a group habit.</p>\r\n<p>58. Walk briskly in the mall.</p>\r\n<p>59. Choose activities you enjoy & you\'ll be more likely to stick with them.</p>\r\n<p>60. Stretch before bed to give you more energy when you wake.</p>\r\n<p>61. Take the long way to the water cooler.</p>\r\n<p>62. Explore new physical activities.</p>\r\n<p>63. Vary your activities, for interest and to broaden the range of benefits.</p>\r\n<p>64. Reward and acknowledge your efforts.</p>\r\n<p>65. Choose fruit for dessert.</p>\r\n<p>66. Consume alcoholic beverages in moderation, if at all.</p>\r\n<p>67. Take stairs instead of the escalator.</p>\r\n<p>68. Conduct an inventory of your meal/snack and physical activity patterns.</p>\r\n<p>69. Share an entree with a friend.</p>\r\n<p>70. Grill fruits or vegetables.</p>\r\n<p>71. Eat before grocery shopping.</p>\r\n<p>72. Choose a checkout line without a candy display.</p>\r\n<p>73. Make a grocery list before you shop.</p>\r\n<p>74. Buy 100% fruit juices over soda and sugary drinks.</p>\r\n<p>75. Stay active in winter.  Play with your kids.</p>\r\n<p>76. Flavor foods with herbs, spices, and other low fat seasonings.</p>\r\n<p>77. Remove skin from poultry before cooking to lower fat content.</p>\r\n<p>78. Eat before you get too hungry.</p>\r\n<p>79. Don\'t skip breakfast.</p>\r\n<p>80. Stop eating when you are full.</p>\r\n<p>81. Snack on fruits and vegetables.</p>\r\n<p>82. Top your favorite cereal with apples or bananas.</p>\r\n<p>83. Try brown rice or whole-wheat pasta.</p>\r\n<p>84. Include several servings of whole grain food daily.</p>\r\n<p>85. When eating out, choose a small or medium portion.</p>\r\n<p>86. If main dishes are too big, choose an appetizer or a side dish instead.</p>\r\n<p>87. Ask for salad dressing \"on the side\".</p>\r\n<p>88. Don\'t take seconds.</p>\r\n<p>89. Park farther from destination and walk.</p>\r\n<p>90. Try a green salad instead of fries.</p>\r\n<p>91. Bake or broil fish.</p>\r\n<p>92. Walk instead of sitting around.</p>\r\n<p>93. Eat sweet foods in small amounts.</p>\r\n<p>94. Take your dog on longer walks.</p>\r\n<p>95. Drink lots of water.</p>\r\n<p>96. Cut back on added fats or oils in cooking or spreads.</p>\r\n<p>97. Walk the beach instead of sunbathing.</p>\r\n<p>98. Walk to a co-worker\'s desk instead of emailing or calling them.</p>\r\n<p>99. Carry your groceries instead of pushing a cart.</p>\r\n<p>100. Use a snow shovel instead of a snow blower.</p>\r\n<p>101. Cut high-calorie foods like cheese and chocolate into smaller pieces and only eat a few pieces. </p>\r\n<p> 102. Use nonfat or low-fat sour cream, mayo, sauces, dressings, and other condiments. </p>\r\n<p> 103. Replace sugar sweetened beverages with water and add a twist of lemon or lime. </p>\r\n<p> 104. Replace high-saturated fat/high calorie seasonings with herbs grown in a small herb garden in your kitchen window. </p>\r\n<p> 105. Refrigerate prepared soups before you eat them. As the soup cools, the fat will rise to the top.  Skim it off the surface for reduced fat content. </p>\r\n<p> 106. When eating out, ask your server to put half your entrée in a to-go bag. </p>\r\n<p> 107. Substitute vegetables for other ingredients in your sandwich. </p>\r\n<p> 108. Every time you eat a meal, sit down, chew slowly, and pay attention to flavors and textures. </p>\r\n<p> 109. Try a new fruit or vegetable (ever had jicama, plantain, bok choy, starfruit or papaya?) </p>\r\n<p> 110. Make up a batch of brownies with applesauce instead of oil or shortening. </p>\r\n<p> 111. Instead of eating out, bring a healthy, low calorie lunch to work. </p>\r\n<p> 112. Ask your sweetie to bring you fruit or flowers instead of chocolate. </p>\r\n<p> 113. Speak up for the salad bar when your coworkers are picking a restaurant for lunch, and remember calories count, so pay attention to how much and what you eat. </p>\r\n<p> 114. When walking, go up the hills instead of around them.</p> \r\n<p> 115. Walk briskly through the mall and shop \'til you drop ... pounds.</p> \r\n <p>116. Clean your closet and donate clothes that are too big. </p>\r\n<p> 117. Take your body measurements to gauge progress. </p>\r\n <p>118. Buy a set of hand weights and play a round of Simon Says with your kids - you do it with the weights, they do without.</p>\r\n<p>119.  Swim with your kids.</p>\r\n'),(4608,270,0.14,'smarty','1','Page created.',1132593437,1124,'128.187.0.165','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<hl>Small Steps</hl>\r\n<p><b>Take Small Steps Today!</b></p>\r\n\r\n<p>1. Walk to work.</p>\r\n<p>2. Use fat free milk over whole milk.</p>\r\n<p>3. Do sit-ups in front of the TV.</p>\r\n<p>4. Walk during lunch hour.  </p>\r\n<p>5. Drink water before a meal. </p>\r\n<p>6. Eat leaner red meat & poultry. </p>\r\n<p>7. Eat half your dessert.</p>\r\n<p>8. Walk instead of driving whenever you can.</p>\r\n<p>9. Take family walk after dinner.</p>\r\n<p>10. Skate to work instead of driving.</p>\r\n<p>11. Avoid food portions larger than your fist.</p>\r\n<p>12. Mow lawn with push mower.</p>\r\n<p>13. Increase the fiber in your diet.</p>\r\n<p>14. Walk to your place of worship instead of driving.</p>\r\n<p>15. Walk kids to school.</p>\r\n<p>16. Get a dog and walk it.</p>\r\n<p>17. Join an exercise group.</p>\r\n<p>18. Drink diet soda.</p>\r\n<p>19. Replace Sunday drive with Sunday walk.</p>\r\n<p>20. Do yard work.</p>\r\n<p>21. Eat off smaller plates.</p>\r\n<p>22. Get off a stop early & walk.</p>\r\n<p>23. Don\'t eat late at night.</p>\r\n<p>24. Skip seconds.</p>\r\n<p>25. Work around the house.</p>\r\n<p>26. Skip buffets.</p>\r\n<p>27. Grill, steam or bake instead of frying.</p>\r\n<p>28. Bicycle to the store instead of driving.</p>\r\n<p>29. Take dog to the park.</p>\r\n<p>30. Ask your doctor about taking a multi-vitamin.</p>\r\n<p>31. Go for a half-hour walk instead of watching TV.</p>\r\n<p>32. Use vegetable oils over solid fats.</p>\r\n<p>33. More carrots, less cake.</p>\r\n<p>34. Fetch the newspaper yourself.</p>\r\n<p>35. Sit up straight at work.</p>\r\n<p>36. Wash the car by hand.</p>\r\n<p>37. Don\'t skip meals.</p>\r\n<p>38. Eat more celery sticks.</p>\r\n<p>39. Run when running errands.</p>\r\n<p>40. Pace the sidelines at kids\' athletic games.</p>\r\n<p>41. Take wheels off luggage.</p>\r\n<p>42. Choose an activity that fits into your daily life.</p>\r\n<p>43. Try your burger with just lettuce, tomato, and onion.</p>\r\n<p>44. Ask a friend to exercise with you.</p>\r\n<p>45. Make time in your day for physical activity.</p>\r\n<p>46. Exercise with a video if the weather is bad.</p>\r\n<p>47. Bike to the barbershop or beauty salon instead of driving.</p>\r\n<p>48. Keep to a regular eating schedule.</p>\r\n<p>49. If you find it difficult to be active after work, try it before work.</p>\r\n<p>50. Take a walk or do desk exercises instead of a cigarette or coffee break.</p>\r\n<p>51. Perform gardening or home repair activities.</p>\r\n<p>52. Avoid laborsaving devices.</p>\r\n<p>53. Take small trips on foot to get your body moving.</p>\r\n<p>54. Play with your kids 30 minutes a day.</p>\r\n<p>55. Dance to music.</p>\r\n<p>56. Keep a pair of comfortable walking or running shoes in your car and office.</p>\r\n<p>57. Make a Saturday morning walk a group habit.</p>\r\n<p>58. Walk briskly in the mall.</p>\r\n<p>59. Choose activities you enjoy & you\'ll be more likely to stick with them.</p>\r\n<p>60. Stretch before bed to give you more energy when you wake.</p>\r\n<p>61. Take the long way to the water cooler.</p>\r\n<p>62. Explore new physical activities.</p>\r\n<p>63. Vary your activities, for interest and to broaden the range of benefits.</p>\r\n<p>64. Reward and acknowledge your efforts.</p>\r\n<p>65. Choose fruit for dessert.</p>\r\n<p>66. Consume alcoholic beverages in moderation, if at all.</p>\r\n<p>67. Take stairs instead of the escalator.</p>\r\n<p>68. Conduct an inventory of your meal/snack and physical activity patterns.</p>\r\n<p>69. Share an entree with a friend.</p>\r\n<p>70. Grill fruits or vegetables.</p>\r\n<p>71. Eat before grocery shopping.</p>\r\n<p>72. Choose a checkout line without a candy display.</p>\r\n<p>73. Make a grocery list before you shop.</p>\r\n<p>74. Buy 100% fruit juices over soda and sugary drinks.</p>\r\n<p>75. Stay active in winter.  Play with your kids.</p>\r\n<p>76. Flavor foods with herbs, spices, and other low fat seasonings.</p>\r\n<p>77. Remove skin from poultry before cooking to lower fat content.</p>\r\n<p>78. Eat before you get too hungry.</p>\r\n<p>79. Don\'t skip breakfast.</p>\r\n<p>80. Stop eating when you are full.</p>\r\n<p>81. Snack on fruits and vegetables.</p>\r\n<p>82. Top your favorite cereal with apples or bananas.</p>\r\n<p>83. Try brown rice or whole-wheat pasta.</p>\r\n<p>84. Include several servings of whole grain food daily.</p>\r\n<p>85. When eating out, choose a small or medium portion.</p>\r\n<p>86. If main dishes are too big, choose an appetizer or a side dish instead.</p>\r\n<p>87. Ask for salad dressing \"on the side\".</p>\r\n<p>88. Don\'t take seconds.</p>\r\n<p>89. Park farther from destination and walk.</p>\r\n<p>90. Try a green salad instead of fries.</p>\r\n<p>91. Bake or broil fish.</p>\r\n<p>92. Walk instead of sitting around.</p>\r\n<p>93. Eat sweet foods in small amounts.</p>\r\n<p>94. Take your dog on longer walks.</p>\r\n<p>95. Drink lots of water.</p>\r\n<p>96. Cut back on added fats or oils in cooking or spreads.</p>\r\n<p>97. Walk the beach instead of sunbathing.</p>\r\n<p>98. Walk to a co-worker\'s desk instead of emailing or calling them.</p>\r\n<p>99. Carry your groceries instead of pushing a cart.</p>\r\n<p>100. Use a snow shovel instead of a snow blower.</p>\r\n<p>101. Cut high-calorie foods like cheese and chocolate into smaller pieces and only eat a few pieces. </p>\r\n<p> 102. Use nonfat or low-fat sour cream, mayo, sauces, dressings, and other condiments. </p>\r\n<p> 103. Replace sugar sweetened beverages with water and add a twist of lemon or lime. </p>\r\n<p> 104. Replace high-saturated fat/high calorie seasonings with herbs grown in a small herb garden in your kitchen window. </p>\r\n<p> 105. Refrigerate prepared soups before you eat them. As the soup cools, the fat will rise to the top.  Skim it off the surface for reduced fat content. </p>\r\n<p> 106. When eating out, ask your server to put half your entrée in a to-go bag. </p>\r\n<p> 107. Substitute vegetables for other ingredients in your sandwich. </p>\r\n<p> 108. Every time you eat a meal, sit down, chew slowly, and pay attention to flavors and textures. </p>\r\n<p> 109. Try a new fruit or vegetable (ever had jicama, plantain, bok choy, starfruit or papaya?) </p>\r\n<p> 110. Make up a batch of brownies with applesauce instead of oil or shortening. </p>\r\n<p> 111. Instead of eating out, bring a healthy, low calorie lunch to work. </p>\r\n<p> 112. Ask your sweetie to bring you fruit or flowers instead of chocolate. </p>\r\n<p> 113. Speak up for the salad bar when your coworkers are picking a restaurant for lunch, and remember calories count, so pay attention to how much and what you eat. </p>\r\n<p> 114. When walking, go up the hills instead of around them.</p> \r\n<p> 115. Walk briskly through the mall and shop \'til you drop ... pounds.</p> \r\n <p>116. Clean your closet and donate clothes that are too big. </p>\r\n<p> 117. Take your body measurements to gauge progress. </p>\r\n <p>118. Buy a set of hand weights and play a round of Simon Says with your kids - you do it with the weights, they do without.</p>\r\n<p>119.  Swim with your kids.</p>\r\n'),(4609,177,0.25,'smarty','1','Testing',1134610712,2,'216.194.127.150','{* redirect href=\"?pg=management/announcements\" *}\r\n\r\n{if $smarty.session.company.logo}<div style=\"float:right; padding:15px; background-color:#fff;\"><img src=\"{$smarty.session.company.logo}\" /></div>{/if}\r\n<h1>Company Management Area</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<h2 class=\"withBG\">Administrative Controls:</h2>\r\n<div style=\"margin-left:25px;\">\r\n	{include file=\"file:./layouts/companyManagementTocDisplay.tpl\"}\r\n</div>'),(4610,193,0.47,'smarty','1','Page created.',1134610962,2,'216.194.127.150','<h1> Under Construction... </h1>\r\n\r\n{include_php file=\"shared_handle:company_management/reports/general\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n<script type=\"text/javascript\" src=\"js/js-get-data.js\"></script>\r\n\r\n{if $acm->isDomainAdmin()}\r\n<input type=\"button\" value=\"GENERAL\" onclick=\"jsGetData(\'?pg=jsgetdata\',\'graphFloater\',\'reports.general\', \'general\');\" /><br />\r\n<input type=\"button\" value=\"AGE\" onclick=\"jsGetData(\'?pg=jsgetdata\',\'graphFloater\',\'reports.general\', \'age\');\" /><br />\r\n{/if}\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Configure</h3>\r\n\r\n<div id=\"configure\" style=\"display:none; margin-left:20px;\">\r\n	<form method=\"get\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n	<div style=\"float:right;\"><small>&quot;Range Offset&quot; will allow each range to begin at an offset value.</small></div>\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	<tr>\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	<tr>\r\n		<td>Weight Range Size:</td>\r\n		<td><input type=\"text\" name=\"wrs\" size=\"3\" value=\"{$WEIGHT_RANGE_STEP}\" style=\"text-align:right;\" />\r\n	</tr>\r\n	<tr>\r\n		<td>Weight Range Offset:</td>\r\n		<td><input type=\"text\" name=\"wro\" size=\"3\" value=\"{$WEIGHT_RANGE_OFFSET}\" style=\"text-align:right;\" />\r\n	</tr>\r\n	<tr>\r\n		<td>BMI Range Size:</td>\r\n		<td><input type=\"text\" name=\"brs\" size=\"3\" value=\"{$BMI_RANGE_STEP}\" style=\"text-align:right;\" />\r\n	</tr>\r\n	<tr>\r\n		<td>BMI Range Offset:</td>\r\n		<td><input type=\"text\" name=\"bro\" size=\"3\" value=\"{$BMI_RANGE_OFFSET}\" style=\"text-align:right;\" />\r\n	</tr>\r\n	<tr>\r\n		<td>Age Range Size:</td>\r\n		<td><input type=\"text\" name=\"ars\" size=\"3\" value=\"{$AGE_RANGE_STEP}\" style=\"text-align:right;\" />\r\n	</tr>\r\n	<tr>\r\n		<td>Age Range Offset:</td>\r\n		<td><input type=\"text\" name=\"aro\" size=\"3\" value=\"{$AGE_RANGE_OFFSET}\" style=\"text-align:right;\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"right\" style=\"clear:left;\"><input type=\"submit\" value=\"Submit\" /></div>\r\n	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n<hr />\r\n<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n<hr />\r\n\r\n<table width=\"400\">\r\n{foreach from=$report key=\"sectionName\" item=\"sectionData\"}\r\n	<tr>\r\n		<td colspan=\"3\"><h2 class=\"withBG\">{$sectionName|niceText}</h2></td>\r\n	</tr>\r\n	{foreach from=$sectionData key=\"field\" item=\"value\"}\r\n	{if $value|@is_array}\r\n	<tr>\r\n		<td width=\"25\">&nbsp;</td>\r\n		<td colspan=\"2\">\r\n			<h3 class=\"withBG\">\r\n				<div class=\"topRight hideShow\">\r\n					<a href=\"javascript:toggle(\'{$field}\', \'\', \'showHide\');\"><img id=\"{$field}_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n				{$field|niceText}</h3>\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td width=\"25\">&nbsp;</td>\r\n		<td colspan=\"2\" bgcolor=\"#DDDDDD\">\r\n			<div id=\"{$field}\" style=\"display:none;\">\r\n			<table border=\"0\" width=\"99%\">\r\n			{foreach from=$value key=\"subField\" item=\"subValue\"}\r\n			<tr>\r\n				<td width=\"50%\" align=\"right\">\r\n					{if $field|regex_match:\"/Age/\" and $subField neq \"unknown\"}\r\n						{$subField} to {$subField+$AGE_RANGE_STEP-1} yrs.\r\n					{elseif $field|regex_match:\"/Weight/\"}\r\n						{$subField} to {$subField+$WEIGHT_RANGE_STEP-1} lbs.\r\n					{elseif $field|regex_match:\"/Bmi/\"}\r\n						{$subField} to {$subField+$BMI_RANGE_STEP-1}\r\n					{elseif $field|regex_match:\"/Exercise/\"}\r\n						{$subField|niceText}\r\n					{else}\r\n						{$subField|niceText}\r\n					{/if}\r\n				</td>\r\n				<td width=\"50%\" align=\"right\">{$subValue}{if $subField|regex_match:\"/percent/i\"} %{/if}</td>\r\n			</tr>\r\n			{/foreach}\r\n			</table>\r\n			</div>\r\n		</td>\r\n	</tr>\r\n	{else}\r\n	<tr>\r\n		<td width=\"25\">&nbsp;</td>\r\n		<td>{$field|niceText}</td>\r\n		<td align=\"right\">{if $value|regex_match:\"/\\.\\d\\d/\"}{$value|number_format:2}{elseif $value|regex_match:\"/\\.\\d/\"}{$value|number_format:1}{elseif $value|regex_match:\"/\\d/\"}{$value|number_format:0}{else}{$value}{/if}{if $field|regex_match:\"/percent/i\"} %{/if}</td>\r\n	</tr>\r\n	{/if}\r\n	{/foreach}\r\n{/foreach}\r\n</table>\r\n\r\n{if $acm->isDomainAdmin()}\r\n<div id=\"graphFloater\">\r\n	<div id=\"gView_1\" class=\"graphView\">\r\n	<div id=\"gSet_1\" class=\"graphSet\" style=\"display:block;\">\r\n		{section name=\"gSet1\" loop=30}{assign var=\"gWidth\" value=$gWidth|random:1:100}<div class=\"graphBar\" style=\"width:{$gWidth}%;\" onmouseover=\"setGraphContent(this);\">Jan {$smarty.section.gSet1.iteration}.05 - 300lbs. ({$gWidth}%)</div>{/section}\r\n		<img class=\"gView_1_sizer\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n	</div>\r\n	\r\n	<div id=\"gSet_2\" class=\"graphSet\" style=\"display:none;\">\r\n		{section name=\"gSet2\" loop=30}{assign var=\"gWidth\" value=$gWidth|random:1:100}<div class=\"graphBar\" style=\"width:{$gWidth}%;\" onmouseover=\"setGraphContent(this);\">Jan {$smarty.section.gSet2.iteration}.05 - 300lbs. ({$gWidth}%)</div>{/section}\r\n		<img class=\"gView_1_sizer\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n	</div>\r\n	\r\n	<div id=\"gSet_3\" class=\"graphSet\" style=\"display:none;\">\r\n		{section name=\"gSet3\" loop=30}{assign var=\"gWidth\" value=$gWidth|random:1:100}<div class=\"graphBar\" style=\"width:{$gWidth}%;\" onmouseover=\"setGraphContent(this);\" title=\"Jan {$smarty.section.gSet3.iteration}.05 - 300lbs. ({$gWidth}%)\">Jan {$smarty.section.gSet3.iteration}.05 - 300lbs. ({$gWidth}%)</div>{/section}\r\n		<img class=\"gView_1_sizer\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n	</div>\r\n	</div>\r\n	\r\n	<h3>Legend:</h3>\r\n	\r\n	<table>\r\n	<tr>\r\n		<td><span id=\"gLabel_1\">&nbsp;#1&nbsp;</span></td>\r\n		<td><a href=\"javascript://\" onclick=\"xToggle(\'gSet_1\',\'\',\'flag\',\'on\');graphToFront(\'gSet_1\')\">Graph 1 Title</a></td>\r\n		<td><a href=\"javascript:xToggle(\'gSet_1\',\'\',\'flag\');\"><img class=\"flag_on\" id=\"gSet_1_swap\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></a></td>\r\n	</tr>\r\n	<tr>\r\n		<td><span id=\"gLabel_2\">&nbsp;#2&nbsp;</span></td>\r\n		<td><a href=\"javascript://\" onclick=\"xToggle(\'gSet_2\',\'\',\'flag\',\'on\');graphToFront(\'gSet_2\');\">Graph 2 Title</a></td>\r\n		<td><a href=\"javascript:xToggle(\'gSet_2\',\'\',\'flag\');\"><img class=\"flag_off\" id=\"gSet_2_swap\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></a></td>\r\n	</tr>\r\n	<tr>\r\n		<td><span id=\"gLabel_3\">&nbsp;#3&nbsp;</span></td>\r\n		<td><a href=\"javascript://\" onclick=\"xToggle(\'gSet_3\',\'\',\'flag\',\'on\');graphToFront(\'gSet_3\');\">Graph 3 Title</a></td>\r\n		<td><a href=\"javascript:xToggle(\'gSet_3\',\'\',\'flag\');\"><img class=\"flag_off\" id=\"gSet_3_swap\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></a></td>\r\n	</tr>\r\n	</table>\r\n	<br />\r\n	\r\n	<h3>Details:</h3>\r\n	<div id=\"graphRowContent\"></div>\r\n</div>\r\n{/if}\r\n'),(4611,179,0.21,'smarty','1','Page created.',1134611157,2,'216.194.127.150','<h1> Under Construction... </h1>\r\n\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n{include_php file=\"shared_handle:company_management/reports\"}\r\n\r\n<form name=\"reportForm\" method=\"get\" action=\"index.php\" target=\"_blank\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n<table width=\"100%\">\r\n<tr>\r\n	<td width=\"33%\" valign=\"top\">\r\n		<b>Select an employee to evaluate:</b><br />\r\n		<br />\r\n		<select name=\"users\" size=\"10\">\r\n			{foreach from=$companyUsers item=\"currentUser\"}\r\n				<option value=\"{$currentUser.id}\">{$currentUser.lastName}, {$currentUser.firstName} ({$currentUser.username})</option>\r\n			{/foreach}\r\n		</select>\r\n	</td>\r\n	<td width=\"33%\" valign=\"top\">\r\n		<b>Select a date range:</b><br />	\r\n		<br />\r\n\r\n		Start Date:<br />\r\n		<div id=\"fCalendar0\" style=\"float:left; display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n			<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n		</div>\r\n		<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			\r\n		<a href=\"javascript:toggle(\'fCalendar0\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n		<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n	</td>\r\n	<td width=\"33%\" valign=\"top\">\r\n		<b>Select an evaluation style:</b><br />\r\n		<br />\r\n		<input type=\"radio\" name=\"style\" value=\"monthly\"> Monthly<br />\r\n		<input type=\"radio\" name=\"style\" value=\"weekly\"> Weekly<br />\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n</form>\r\n'),(4612,238,0.47,'smarty','1','Page created.',1134611451,2,'216.194.127.150','{include_php file=\"shared_handle:company_management/reports/surveys\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Select Survey and Date Range</h3>\r\n\r\n<div id=\"configure\" style=\"display:block; margin-left:20px;\">\r\n	<form method=\"get\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Survey Name:</td>\r\n		<td colspan=\"3\"><select name=\"surveyId\">\r\n			{foreach from=$surveyList key=\"surveyId\" item=\"row\"}\r\n			<option value=\"{$surveyId}\"{if $surveyId eq $requestedSurveyId} selected=\"selected\"{/if}>{$row.surveyName}</option>\r\n			{/foreach}</select>\r\n	</tr>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" /></td>\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td colspan=\"3\"><input type=\"checkbox\" name=\"compareDates\" value=\"1\" onclick=\"toggleCompareDates(this);\"{if $comparingDates} checked=\"checked\"{/if}> Compare to another date range?</td>\r\n	</tr>\r\n	<tr>\r\n		<td><span id=\"compareDatesCell_1\" style=\"display:{if $comparingDates}block{else}none{/if};\">Start Date:</span></td>\r\n		<td><span id=\"compareDatesCell_2\" style=\"display:{if $comparingDates}block{else}none{/if};\"><input type=\"text\" name=\"begin2\" size=\"10\" value=\"{$START_DATE2|date_format2:\"m/d/Y\"}\" /></span></td>\r\n		<td><span id=\"compareDatesCell_3\" style=\"display:{if $comparingDates}block{else}none{/if};\">End Date:</span></td>\r\n		<td><span id=\"compareDatesCell_4\" style=\"display:{if $comparingDates}block{else}none{/if};\"><input type=\"text\" name=\"end2\" size=\"10\" value=\"{$END_DATE2|date_format2:\"m/d/Y\"}\" /></span></td>\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n\r\n	<script type=\"text/javascript\">{literal}\r\n		function toggleCompareDates(cb) {\r\n			var toState;\r\n			if (cb.checked) {\r\n				toState = \'block\';\r\n			} else {\r\n				toState = \'none\';\r\n			}\r\n			document.getElementById(\'compareDatesCell_1\').style.display = toState;\r\n			document.getElementById(\'compareDatesCell_2\').style.display = toState;\r\n			document.getElementById(\'compareDatesCell_3\').style.display = toState;\r\n			document.getElementById(\'compareDatesCell_4\').style.display = toState;\r\n		}\r\n	{/literal}</script>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\r\n	<hr />\r\n	<h2>{$report.surveyName}</h2>\r\n	<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i><br />\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n{if $comparingDates}\r\n	<i>Comparing against data between <b>{$START_DATE2|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE2|date_format2:\"m/d/Y\"}</b>.</i><br />\r\n	Taken <b>{$report.totalTimesTaken2|default:0}</b> Times by <b>{$report.uniqueTimesTaken2|default:0}</b> unique users\r\n{/if}\r\n	<hr />\r\n	<br />\r\n	<table style=\"border:#CCC 1px solid;background:#EEE;\" cellpadding=\"5\"><tr><td style=\"padding-right:10px;\">\r\n	<ol>\r\n	{foreach name=\"qLoop\" from=$report.questions item=\"q\"}\r\n		<li>{$q.question}\r\n		<table width=\"100%\">\r\n		<tr>\r\n			<td colspan=\"4\"></td>\r\n			<td><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" /></td>\r\n			{if $comparingDates}\r\n			<td colspan=\"2\"></td>\r\n			<td><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" /></td>\r\n			{/if}\r\n		</tr>\r\n		{if $q.A}\r\n		<tr>\r\n			<td valign=\"top\"><b>A.</b></td>\r\n			<td width=\"100%\"><small>{$q.A}</small></td>\r\n			<td valign=\"bottom\"><b>{$q.sumA|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctA|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumA > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{if $comparingDates}\r\n			<td valign=\"bottom\"><b>{$q.sumA2|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctA2|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumA2 > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctA2|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{/if}\r\n		</tr>\r\n		{/if}\r\n		{if $q.B}\r\n		<tr>\r\n			<td valign=\"top\"><b>B.</b></td>\r\n			<td width=\"100%\"><small>{$q.B}</small></td>\r\n			<td valign=\"bottom\"><b>{$q.sumB|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctB|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumB > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctB|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{if $comparingDates}\r\n			<td valign=\"bottom\"><b>{$q.sumB2|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctB2|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumB2 > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctB2|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{/if}\r\n		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td width=\"100%\"><small>{$q.C}</small></td>\r\n			<td valign=\"bottom\"><b>{$q.sumC|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctC|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumC > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctC|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{if $comparingDates}\r\n			<td valign=\"bottom\"><b>{$q.sumC2|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctC2|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumC2 > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctC2|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{/if}\r\n		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td width=\"100%\"><small>{$q.D}</small></td>\r\n			<td valign=\"bottom\"><b>{$q.sumD|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctD|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumD > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctD|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{if $comparingDates}\r\n			<td valign=\"bottom\"><b>{$q.sumD2|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctD2|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumD2 > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctD2|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{/if}\r\n		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td width=\"100%\"><small>{$q.E}</small></td>\r\n			<td valign=\"bottom\"><b>{$q.sumE|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctE|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumE > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctE|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{if $comparingDates}\r\n			<td valign=\"bottom\"><b>{$q.sumE2|default:0}</b></td>\r\n			<td valign=\"bottom\" align=\"right\">{$q.pctE2|default:0}%</td>\r\n			<td valign=\"bottom\">{if $q.sumE2 > 0}<img src=\"img/graphBar.gif\" width=\"{$q.pctE2|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\r\n			{/if}\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4613,45,0.30,'smarty','1','Hiding widgets.',1134613502,2,'216.194.127.150','{assign var=\"hideWidgets\" value=\"true\"}\r\n{assign var=\"wideFormat\" value=\"true\"}\r\n\r\n{php}$GLOBALS[\'SPADE\'][\'db\']->debugModeOn();{/php}\r\n\r\n{if $smarty.request.tm_style_table}\r\n	{session_write var=\"tm_style_table\" value=$smarty.request.tm_style_table}\r\n{/if}\r\n{if $smarty.request.tm_template}\r\n	{session_write var=\"tm_template\" value=$smarty.request.tm_template}\r\n{/if}\r\n\r\n<div align=\"right\">\r\n<form style=\"margin:0px;\" name=\"tmstyleform\" method=\"get\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\nBorder Styles:\r\n<select name=\"tm_style_table\" onchange=\"if(this.value != \'\')this.form.submit();\">\r\n	<option value=\"\">-Change-</option>\r\n	<option value=\"gray\">Gray</option>\r\n	<option value=\"gray_bubble\">Gray Bubble</option>\r\n	<option value=\"blue-white\">Blue-White</option>\r\n	<option value=\"blue-blue\">Blue-Blue</option>\r\n	<option value=\"chrome\">Chrome</option>\r\n	<option value=\"purple-white\">Purple-White</option>\r\n	<option value=\"redlava\">redlava</option>\r\n</select>\r\n&nbsp;&nbsp;\r\nTemplate:\r\n<select name=\"tm_template\" onchange=\"if(this.value != \'\')this.form.submit();\">\r\n	<option value=\"\">-Change-</option>\r\n	<option value=\"default\">Default</option>\r\n	<option value=\"slate\">Slate</option>\r\n</select>\r\n</form>\r\n</div>\r\n\r\n{assign var=\"template\" value=$smarty.session.safe.tm_template|default:\"slate\"}\r\n\r\n\r\n{tablemanager\r\n	Assign=\"tm\"\r\n	Group=\"admin_tools\"\r\n	Profile=\"manage_users\"\r\n	DeleteLogFile=\"tm-delete.log\"\r\n	TemplatePath=\"TM/templates/\"\r\n	StyleTablePath=\"img/st/\"\r\n	StyleTable=$smarty.session.safe.tm_style_table|default:\"gray\"\r\n	AddTemplate=$template|cat:\"_edit.tpl\"\r\n	MainTemplate=$template|cat:\"_main.tpl\"\r\n	ListTemplate=$template|cat:\"_list.tpl\"\r\n	EditTemplate=$template|cat:\"_edit.tpl\"\r\n	Action=\"list\"\r\n	LoginRequired=\"false\"\r\n	HeadingColor=\"90A9C4\"\r\n	HighlightColor=\"F6F9B5\"\r\n	ResultsPerPage=\"20\"\r\n	Color1=\"F7F7F7\"\r\n	Color2=\"E7E7E7\"\r\n	DataStyle=\"hideWrap\"\r\n	MaxStringLength=\"50\"\r\n	DateFormat=\"M j, Y h:i a \"\r\n	}\r\n\r\n'),(4633,271,0.24,'smarty','0','Page created.',1134721912,2,'24.2.76.126','{include_php file=\"shared_handle:company_management/reports/incentives-summary\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Configure</h3>\r\n\r\n<script type=\"text/javascript\">\r\n{literal}\r\nfunction changeOrder(ord) {\r\n	document.forms.configure.order.value = ord;\r\n	document.forms.configure.submit();\r\n}\r\n{/literal}\r\n</script>\r\n\r\n<div id=\"configure\" style=\"display:none; margin-left:20px;\">\r\n	<form name=\"configure\" method=\"get\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n	<input type=\"hidden\" name=\"order\" value=\"{$smarty.request.order}\" />\r\n\r\n	<div style=\"float:right;\"><small>&quot;Range Offset&quot; will allow each range to begin at an offset value.</small></div>\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	<tr>\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"right\" style=\"clear:left;\"><input type=\"submit\" value=\"Submit\" /></div>\r\n	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n<hr />\r\n<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n<hr />\r\n\r\n<h3 class=\"withBG\">Campaigns</h3>\r\n{foreach from=$campaigns item=\"campaign\"}\r\n	<b>Campaign #{$campaign.id}</b>\r\n	<div style=\"margin-left:15px;\">\r\n		<i>eStat</i>: {$campaign.estatName}<br />\r\n		<i>Date Range</i>: {$campaign.dateStart|date_format2:\"m/d/Y\"} <small>({$campaign.dateStart|date_format2:\"h:i:s A\"})</small> to {$campaign.dateEnd|date_format2:\"m/d/Y\"} <small>({$campaign.dateEnd|date_format2:\"h:i:s A\"})</small><br />\r\n		<i>Scoring</i>: {$campaign.value} - {$campaign.type}<br />\r\n	</div>\r\n	<br />\r\n{foreachelse}\r\n	<div style=\"margin-left:15px;\">\r\n		No active campaigns in the current time period.\r\n	</div>\r\n	<br />\r\n{/foreach}\r\n\r\n<h3 class=\"withBG\">User Data</h3>\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\">\r\n<tr>\r\n	<td><b>No.</b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'username\');\">Username</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'lastName\');\">Last Name</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'firstName\');\">First Name</a></b></td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td><b><a href=\"javascript:changeOrder({$campaign.id});\">Campaign&nbsp;#{$campaign.id}</a></b></td>\r\n	{/foreach}\r\n	<td><b><a href=\"javascript:changeOrder(\'surveys\');\">Surveys</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'total\');\">Total</a></b></td>\r\n</tr>\r\n{foreach name=\"userDataLoop\" from=$userData item=\"userData\"}\r\n<tr>\r\n	<td>{$smarty.foreach.userDataLoop.iteration}.</td>\r\n	<td>{$userData.username}</td>\r\n	<td>{$userData.lastName|default:\"-none-\"}</td>\r\n	<td>{$userData.firstName|default:\"-none-\"}</td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td align=\"right\">{$userData[$campaign.id]|default:0}</td>\r\n	{/foreach}\r\n	<td align=\"right\">{$userData.surveys|default:0}</td>\r\n	<td align=\"right\"><b>{$userData.total|default:0}</b></td>\r\n</tr>\r\n{/foreach}\r\n</table>\r\n'),(4634,271,0.25,'smarty','0','Page created.',1134722210,2,'24.2.76.126','{include_php file=\"shared_handle:company_management/reports/incentives-summary\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Configure</h3>\r\n\r\n<script type=\"text/javascript\">\r\n{literal}\r\nfunction changeOrder(ord) {\r\n	document.forms.configure.order.value = ord;\r\n	document.forms.configure.submit();\r\n}\r\n{/literal}\r\n</script>\r\n\r\n<div id=\"configure\" style=\"display:none; margin-left:20px;\">\r\n	<form name=\"configure\" method=\"get\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n	<input type=\"hidden\" name=\"order\" value=\"{$smarty.request.order}\" />\r\n\r\n	<div style=\"float:right;\"><small>&quot;Range Offset&quot; will allow each range to begin at an offset value.</small></div>\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	<tr>\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"right\" style=\"clear:left;\"><input type=\"submit\" value=\"Submit\" /></div>\r\n	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n<hr />\r\n<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n<hr />\r\n\r\n<h3 class=\"withBG\">Campaigns</h3>\r\n{foreach from=$campaigns item=\"campaign\"}\r\n	<b>Campaign #{$campaign.id}</b>\r\n	<div style=\"margin-left:15px;\">\r\n		<i>eStat</i>: {$campaign.estatName}<br />\r\n		<i>Date Range</i>: {$campaign.dateStart|date_format2:\"m/d/Y\"} <small>({$campaign.dateStart|date_format2:\"h:i:s A\"})</small> to {$campaign.dateEnd|date_format2:\"m/d/Y\"} <small>({$campaign.dateEnd|date_format2:\"h:i:s A\"})</small><br />\r\n		<i>Scoring</i>: {$campaign.value} - {$campaign.type}<br />\r\n	</div>\r\n	<br />\r\n{foreachelse}\r\n	<div style=\"margin-left:15px;\">\r\n		No active campaigns in the current time period.\r\n	</div>\r\n	<br />\r\n{/foreach}\r\n\r\n<h3 class=\"withBG\">User Data</h3>\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" style=\"z-index:10000;\">\r\n<tr>\r\n	<td><b>No.</b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'username\');\">Username</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'lastName\');\">Last Name</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'firstName\');\">First Name</a></b></td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td><b><a href=\"javascript:changeOrder({$campaign.id});\">Campaign&nbsp;#{$campaign.id}</a></b></td>\r\n	{/foreach}\r\n	<td><b><a href=\"javascript:changeOrder(\'surveys\');\">Surveys</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'total\');\">Total</a></b></td>\r\n</tr>\r\n{foreach name=\"userDataLoop\" from=$userData item=\"userData\"}\r\n<tr>\r\n	<td>{$smarty.foreach.userDataLoop.iteration}.</td>\r\n	<td>{$userData.username}</td>\r\n	<td>{$userData.lastName|default:\"-none-\"}</td>\r\n	<td>{$userData.firstName|default:\"-none-\"}</td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td align=\"right\">{$userData[$campaign.id]|default:0}</td>\r\n	{/foreach}\r\n	<td align=\"right\">{$userData.surveys|default:0}</td>\r\n	<td align=\"right\"><b>{$userData.total|default:0}</b></td>\r\n</tr>\r\n{/foreach}\r\n</table>\r\n'),(4635,271,0.26,'smarty','0','Page created.',1134722628,2,'24.2.76.126','{include_php file=\"shared_handle:company_management/reports/incentives-summary\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Configure</h3>\r\n\r\n<script type=\"text/javascript\">\r\n{literal}\r\nfunction changeOrder(ord) {\r\n	document.forms.configure.order.value = ord;\r\n	document.forms.configure.submit();\r\n}\r\n{/literal}\r\n</script>\r\n\r\n<div id=\"configure\" style=\"display:none; margin-left:20px;\">\r\n	<form name=\"configure\" method=\"get\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n	<input type=\"hidden\" name=\"order\" value=\"{$smarty.request.order}\" />\r\n\r\n	<div style=\"float:right;\"><small>&quot;Range Offset&quot; will allow each range to begin at an offset value.</small></div>\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	<tr>\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"right\" style=\"clear:left;\"><input type=\"submit\" value=\"Submit\" /></div>\r\n	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n<hr />\r\n<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n<hr />\r\n\r\n<h3 class=\"withBG\">Campaigns</h3>\r\n{foreach from=$campaigns item=\"campaign\"}\r\n	<b>Campaign #{$campaign.id}</b>\r\n	<div style=\"margin-left:15px;\">\r\n		<i>eStat</i>: {$campaign.estatName}<br />\r\n		<i>Date Range</i>: {$campaign.dateStart|date_format2:\"m/d/Y\"} <small>({$campaign.dateStart|date_format2:\"h:i:s A\"})</small> to {$campaign.dateEnd|date_format2:\"m/d/Y\"} <small>({$campaign.dateEnd|date_format2:\"h:i:s A\"})</small><br />\r\n		<i>Scoring</i>: {$campaign.value} - {$campaign.type}<br />\r\n	</div>\r\n	<br />\r\n{foreachelse}\r\n	<div style=\"margin-left:15px;\">\r\n		No active campaigns in the current time period.\r\n	</div>\r\n	<br />\r\n{/foreach}\r\n\r\n<h3 class=\"withBG\">User Data</h3>\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" style=\"z-index:10000;\">\r\n<tr>\r\n	<td><b>No.</b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'username\');\">Username</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'lastName\');\">Last Name</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'firstName\');\">First Name</a></b></td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td><b><a href=\"javascript:changeOrder({$campaign.id});\">Campaign&nbsp;#{$campaign.id}</a></b></td>\r\n	{/foreach}\r\n	<td><b><a href=\"javascript:changeOrder(\'surveys\');\">Surveys</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'total\');\">Total</a></b></td>\r\n</tr>\r\n{foreach name=\"userDataLoop\" from=$userData item=\"userData\"}\r\n<tr>\r\n	<td>{$smarty.foreach.userDataLoop.iteration}.</td>\r\n	<td><a href=\"mailto:{$userData.email|default:\"unknown@unknown.com\"}\">{$userData.username}</a></td>\r\n	<td>{$userData.lastName|default:\"-none-\"}</td>\r\n	<td>{$userData.firstName|default:\"-none-\"}</td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td align=\"right\">{$userData[$campaign.id]|default:0}</td>\r\n	{/foreach}\r\n	<td align=\"right\">{$userData.surveys|default:0}</td>\r\n	<td align=\"right\"><b>{$userData.total|default:0}</b></td>\r\n</tr>\r\n{/foreach}\r\n</table>\r\n'),(4636,271,0.27,'smarty','0','Page created.',1134722665,2,'24.2.76.126','{include_php file=\"shared_handle:company_management/reports/incentives-summary\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Configure</h3>\r\n\r\n<script type=\"text/javascript\">\r\n{literal}\r\nfunction changeOrder(ord) {\r\n	document.forms.configure.order.value = ord;\r\n	document.forms.configure.submit();\r\n}\r\n{/literal}\r\n</script>\r\n\r\n<div id=\"configure\" style=\"display:none; margin-left:20px;\">\r\n	<form name=\"configure\" method=\"get\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n	<input type=\"hidden\" name=\"order\" value=\"{$smarty.request.order}\" />\r\n\r\n	<div style=\"float:right;\"><small>&quot;Range Offset&quot; will allow each range to begin at an offset value.</small></div>\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	<tr>\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"right\" style=\"clear:left;\"><input type=\"submit\" value=\"Submit\" /></div>\r\n	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n<hr />\r\n<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n<hr />\r\n\r\n<h3 class=\"withBG\">Campaigns</h3>\r\n{foreach from=$campaigns item=\"campaign\"}\r\n	<b>Campaign #{$campaign.id}</b>\r\n	<div style=\"margin-left:15px;\">\r\n		<i>eStat</i>: {$campaign.estatName}<br />\r\n		<i>Date Range</i>: {$campaign.dateStart|date_format2:\"m/d/Y\"} <small>({$campaign.dateStart|date_format2:\"h:i:s A\"})</small> to {$campaign.dateEnd|date_format2:\"m/d/Y\"} <small>({$campaign.dateEnd|date_format2:\"h:i:s A\"})</small><br />\r\n		<i>Scoring</i>: {$campaign.value} - {$campaign.type}<br />\r\n	</div>\r\n	<br />\r\n{foreachelse}\r\n	<div style=\"margin-left:15px;\">\r\n		No active campaigns in the current time period.\r\n	</div>\r\n	<br />\r\n{/foreach}\r\n\r\n<h3 class=\"withBG\">User Data</h3>\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" style=\"z-index:10000;\">\r\n<tr bgcolor=\"#CCC\">\r\n	<td><b>No.</b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'username\');\">Username</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'lastName\');\">Last Name</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'firstName\');\">First Name</a></b></td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td><b><a href=\"javascript:changeOrder({$campaign.id});\">Campaign&nbsp;#{$campaign.id}</a></b></td>\r\n	{/foreach}\r\n	<td><b><a href=\"javascript:changeOrder(\'surveys\');\">Surveys</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'total\');\">Total</a></b></td>\r\n</tr>\r\n{foreach name=\"userDataLoop\" from=$userData item=\"userData\"}\r\n<tr>\r\n	<td>{$smarty.foreach.userDataLoop.iteration}.</td>\r\n	<td><a href=\"mailto:{$userData.email|default:\"unknown@unknown.com\"}\">{$userData.username}</a></td>\r\n	<td>{$userData.lastName|default:\"-none-\"}</td>\r\n	<td>{$userData.firstName|default:\"-none-\"}</td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td align=\"right\">{$userData[$campaign.id]|default:0}</td>\r\n	{/foreach}\r\n	<td align=\"right\">{$userData.surveys|default:0}</td>\r\n	<td align=\"right\"><b>{$userData.total|default:0}</b></td>\r\n</tr>\r\n{/foreach}\r\n</table>\r\n'),(4637,271,0.28,'smarty','0','Page created.',1134722685,2,'24.2.76.126','{include_php file=\"shared_handle:company_management/reports/incentives-summary\"}\r\n<h1>{$page.title}</h1>\r\n<h2>{$smarty.session.company.companyName}</h2>\r\n\r\n<hr />\r\n\r\n<div style=\"width:400px;\">\r\n<h3 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'configure\', \'\', \'showHide\');\"><img id=\"configure_img\" src=\"./img/blank.gif\" class=\"showHide_off\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Configure</h3>\r\n\r\n<script type=\"text/javascript\">\r\n{literal}\r\nfunction changeOrder(ord) {\r\n	document.forms.configure.order.value = ord;\r\n	document.forms.configure.submit();\r\n}\r\n{/literal}\r\n</script>\r\n\r\n<div id=\"configure\" style=\"display:none; margin-left:20px;\">\r\n	<form name=\"configure\" method=\"get\" action=\"index.php\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n	<input type=\"hidden\" name=\"order\" value=\"{$smarty.request.order}\" />\r\n\r\n	<div style=\"float:right;\"><small>&quot;Range Offset&quot; will allow each range to begin at an offset value.</small></div>\r\n\r\n	<table>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	<tr>\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE|date_format2:\"m/d/Y\"}\" />\r\n	</tr>\r\n	</table>\r\n\r\n	<div align=\"right\" style=\"clear:left;\"><input type=\"submit\" value=\"Submit\" /></div>\r\n	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n<hr />\r\n<i>Report for data between <b>{$START_DATE|date_format2:\"m/d/Y\"}</b> and <b>{$END_DATE|date_format2:\"m/d/Y\"}</b>.</i>\r\n<hr />\r\n\r\n<h3 class=\"withBG\">Campaigns</h3>\r\n{foreach from=$campaigns item=\"campaign\"}\r\n	<b>Campaign #{$campaign.id}</b>\r\n	<div style=\"margin-left:15px;\">\r\n		<i>eStat</i>: {$campaign.estatName}<br />\r\n		<i>Date Range</i>: {$campaign.dateStart|date_format2:\"m/d/Y\"} <small>({$campaign.dateStart|date_format2:\"h:i:s A\"})</small> to {$campaign.dateEnd|date_format2:\"m/d/Y\"} <small>({$campaign.dateEnd|date_format2:\"h:i:s A\"})</small><br />\r\n		<i>Scoring</i>: {$campaign.value} - {$campaign.type}<br />\r\n	</div>\r\n	<br />\r\n{foreachelse}\r\n	<div style=\"margin-left:15px;\">\r\n		No active campaigns in the current time period.\r\n	</div>\r\n	<br />\r\n{/foreach}\r\n\r\n<h3 class=\"withBG\">User Data</h3>\r\n<table border=\"1\" cellpadding=\"1\" cellspacing=\"0\" style=\"z-index:10000;\">\r\n<tr bgcolor=\"#CCCCCC\">\r\n	<td><b>No.</b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'username\');\">Username</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'lastName\');\">Last Name</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'firstName\');\">First Name</a></b></td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td><b><a href=\"javascript:changeOrder({$campaign.id});\">Campaign&nbsp;#{$campaign.id}</a></b></td>\r\n	{/foreach}\r\n	<td><b><a href=\"javascript:changeOrder(\'surveys\');\">Surveys</a></b></td>\r\n	<td><b><a href=\"javascript:changeOrder(\'total\');\">Total</a></b></td>\r\n</tr>\r\n{foreach name=\"userDataLoop\" from=$userData item=\"userData\"}\r\n<tr>\r\n	<td>{$smarty.foreach.userDataLoop.iteration}.</td>\r\n	<td><a href=\"mailto:{$userData.email|default:\"unknown@unknown.com\"}\">{$userData.username}</a></td>\r\n	<td>{$userData.lastName|default:\"-none-\"}</td>\r\n	<td>{$userData.firstName|default:\"-none-\"}</td>\r\n	{foreach from=$campaigns item=\"campaign\"}\r\n		<td align=\"right\">{$userData[$campaign.id]|default:0}</td>\r\n	{/foreach}\r\n	<td align=\"right\">{$userData.surveys|default:0}</td>\r\n	<td align=\"right\"><b>{$userData.total|default:0}</b></td>\r\n</tr>\r\n{/foreach}\r\n</table>\r\n'),(5009,303,0.10,'smarty','0','Page created.',1143571395,1124,'216.194.127.150',''),(5010,303,0.11,'smarty','0','Page created.',1143571704,1124,'216.194.127.150','<hl><b>Stretching</b></hl>\r\n\r\n<p>Many people overlook the benefits of stretching before physical activity. Stretching, in addition to warming up, can help optimize your workout as well as help prevent or reduce injuries. It doesn’t matter what kind of shape you are in, your body needs to be warmed up and stretched before participating in any physical activity. The aims of stretching are to gently lengthen muscles before and after any form of exercise, and to improve tissue elasticity / flexibility. </p>\r\n\r\n\r\n<p>There are many different muscle groups within the body that can be stretched. Some tips that one should remember when stretching are</p>\r\n\r\n<p>\r\n1.	Begin with gradual mobility exercises of all the joints, i.e. simply rotate the wrists, bend the arm and roll your shoulders. This will allow the body\'s natural lubrication to protect the surface of your bones at these joints.  Using the natural range of motion the joints have their own fluid to aid in protection.</p>\r\n<p>\r\n2.	Always warm up the body prior to stretching, as this increases blood flow around the body, which in turn makes the muscles more supple. </p>\r\n<p>\r\n3.	After exercise, slowly bring your heart rate down before you begin stretching in order to avoid blood pooling within your muscles, which can lead to cramping and dizzy spells. </p> \r\n<p>\r\n4.	If you’re wet and sweaty, you can put on a sweatshirt to keep your body warm as you cool down. This will also help keep you from getting a chill. You could also take a warm shower or bath to keep warm and relax the muscles. </p>\r\n<p>\r\n5.	Never bounce while you stretch, unless you are doing specific stretches for certain sports, i.e. ballistic stretching for martial arts.</p>\r\n<p>\r\n6.	Hold the stretch until you feel the muscle loosen off, then repeat for a further 15 seconds. </p>\r\n<p>\r\n7.	While stretching you should feel some slight discomfort, if you don’t feel anything, then you may be doing the stretch incorrectly, or simply the muscle has eased off. </p>\r\n<p>\r\n8.	Stop immediately if you feel any severe pain. </p>\r\n<p>\r\n9.	Remember to breathe regularly and rhythmically, exhale as you extend the stretch, and do not hold your breath.</p>\r\n<p>\r\n10.	To remember to stretch each muscle group start with your legs, and work your way up the body.</p>\r\n\r\n<p>Always remember to do warm up and cool down stretches before and after participating in physical activity. Through stretching one can protect their body from injury as they strive to keep it healthy. </p>\r\n'),(5011,303,0.12,'smarty','1','Page created.',1143573092,1124,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<hl><b>Stretching</b></hl>\r\n\r\n<p>Many people overlook the benefits of stretching before physical activity. Stretching, in addition to warming up, can help optimize your workout as well as help prevent or reduce injuries. It doesn’t matter what kind of shape you are in, your body needs to be warmed up and stretched before participating in any physical activity. The aims of stretching are to gently lengthen muscles before and after any form of exercise, and to improve tissue elasticity / flexibility. </p>\r\n\r\n\r\n<p>There are many different muscle groups within the body that can be stretched. Some tips that one should remember when stretching are</p>\r\n\r\n<p>\r\n1.	Begin with gradual mobility exercises of all the joints, i.e. simply rotate the wrists, bend the arm and roll your shoulders. This will allow the body\'s natural lubrication to protect the surface of your bones at these joints.  Using the natural range of motion the joints have their own fluid to aid in protection.</p>\r\n<p>\r\n2.	Always warm up the body prior to stretching, as this increases blood flow around the body, which in turn makes the muscles more supple. </p>\r\n<p>\r\n3.	After exercise, slowly bring your heart rate down before you begin stretching in order to avoid blood pooling within your muscles, which can lead to cramping and dizzy spells. </p> \r\n<p>\r\n4.	If you’re wet and sweaty, you can put on a sweatshirt to keep your body warm as you cool down. This will also help keep you from getting a chill. You could also take a warm shower or bath to keep warm and relax the muscles. </p>\r\n<p>\r\n5.	Never bounce while you stretch, unless you are doing specific stretches for certain sports, i.e. ballistic stretching for martial arts.</p>\r\n<p>\r\n6.	Hold the stretch until you feel the muscle loosen off, then repeat for a further 15 seconds. </p>\r\n<p>\r\n7.	While stretching you should feel some slight discomfort, if you don’t feel anything, then you may be doing the stretch incorrectly, or simply the muscle has eased off. </p>\r\n<p>\r\n8.	Stop immediately if you feel any severe pain. </p>\r\n<p>\r\n9.	Remember to breathe regularly and rhythmically, exhale as you extend the stretch, and do not hold your breath.</p>\r\n<p>\r\n10.	To remember to stretch each muscle group start with your legs, and work your way up the body.</p>\r\n\r\n<p>Always remember to do warm up and cool down stretches before and after participating in physical activity. Through stretching one can protect their body from injury as they strive to keep it healthy. </p>\r\n'),(4871,230,0.12,'smarty','1','Page created.',1140503681,2,'24.2.76.126','{include_php file=\"shared_handle:jsGetData\"}{assign var=\"pgLayout\" value=\"no layout\"}<html>\r\n<head></head>\r\n<body>\r\n\r\n	<div id=\"theData\" style=\"display:none;\">{$jsData}</div>\r\n\r\n	<script type=\"text/javascript\">\r\n		if (parent && parent.document) {ldelim}\r\n			parent.document.getElementById(\'{$jsObj}\').innerHTML = document.getElementById(\'theData\').innerHTML;\r\n		{rdelim}\r\n	</script>\r\n\r\n</body>\r\n</html>\r\n'),(4872,286,0.16,'smarty','0','Page created.',1140740640,16,'216.194.127.150','{include file=\"layouts/forceLoggedIn.tpl\"}\r\n{include_php file=\"shared_handle:company/consumerSurveyList\"}\r\n\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>Healthy For Life</h1>\r\n\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n	<img class=\"iconClipboard\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n</td><td valign=\"top\" width=\"100%\">\r\n	Welcome to Healthy For Life 2006. Participants in this program are awarded points for completing additional activities. Take this short assessment each month and the points you have earned will be tracked throughout the year. This will also serve as a reminder of activities that need to be completed. Remember- proper documentation, including the wellness coordinator’s initials, will still be required.  	\r\n</td></tr>\r\n</table>\r\n\r\n<blockquote>\r\n<table width=\"100%\"><tr>\r\n<td valign=\"top\" width=\"100%\">\r\n	<h3>Available Surveys:</h3>\r\n	<table>\r\n	{foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n	<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n		{if $item.dateAvailable gt 0}\r\n			<img class=\"ico{$item.id}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{else}\r\n			<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"ico{$item.id}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></a></td>\r\n		   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{/if}\r\n	{foreachelse}\r\n	<tr><td valign=\"top\" colspan=\"3\">\r\n		None found.</td></tr>\r\n	{/foreach}\r\n	</table>\r\n</td>\r\n</tr>\r\n</table>\r\n</blockquote>'),(4873,196,1.58,'smarty','0','Finally added table for adjustments',1140741027,16,'216.194.127.150','{if $smarty.session.company.preferences.hide_incentives eq \"yes\"}{include file=\"file:layouts/hiddenPageRedirector.tpl\"}{/if}\r\n{include file=\"layouts/forceLoggedIn.tpl\"}\r\n\r\n{* HANDLERS *}\r\n{include_php file=\"shared_handle:company/participationPoints_v2\"}\r\n{include_php file=\"shared_handle:company/surveyList\"}\r\n{include_php file=\"shared_handle:company/incentivePointAdjustments\"}\r\n\r\n\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{if $smarty.session.company.preferences.title_my_incentives}{$smarty.session.company.preferences.title_my_incentives}</h1>{else}\r\n<h1>{$page.title}</h1>{/if}\r\n\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n	<img class=\"iconPrize\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n</td><td valign=\"top\" width=\"100%\">\r\n	{$incentiveText|default:\"<em>Yearly Incentive</em><br /><br />Not Yet Determined.\"}	\r\n</td></tr>\r\n</table>\r\n<br />\r\n{assign var=\"surveyPointsEarned\" value=$surveyPointsEarned|default:\"0\"}\r\n{assign var=\"totalIncentivePointAdjustments\" value=$totalIncentivePointAdjustments|default:\"0\"}\r\n<h2 class=\"boxed\"><i>Total Points Earned</i>: <em>{$totalParticipationPoints|math:\"x+$surveyPointsEarned+$totalIncentivePointAdjustments\"}</em></h2>\r\n\r\n<blockquote>\r\n<table width=\"700\">\r\n<tr><td valign=\"top\">\r\n	\r\n	<table>\r\n	<tr><td colspan=\"2\">\r\n		<h3>{if $smarty.session.company.preferences.change_word_survey}{$smarty.session.company.preferences.change_word_survey}{else}Available Surveys:</h3></td>{/if}\r\n	    <td valign=\"middle\"></td></tr>\r\n	{foreach from=$surveys item=item name=\"loopSurveys\"}\r\n	{assign var=\"hideCheck\" value=\"hide_survey_`$item.id`\"}\r\n	{if $smarty.session.company.preferences[$hideCheck] neq \"yes\"}\r\n		<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n		{if $item.dateAvailable gt 0}\r\n			<img class=\"sIco ico{$item.icon}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{else}\r\n			<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"sIco ico{$item.icon}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></a></td>\r\n		   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{/if}\r\n	{/if}\r\n	{foreachelse}\r\n	<tr><td valign=\"top\" colspan=\"3\">>\r\n		None found.</td></tr>\r\n	{/foreach}\r\n\r\n	<tr><td>&nbsp;</td>\r\n	    <td align=\"right\"><em>Survey points earned:</em></td>\r\n	    <td align=\"center\"><span class=\"boxed\">{$surveyPointsEarned|default:0}</span></td></tr>\r\n\r\n	<tr><td colspan=\"2\">\r\n		<h3>{if $smarty.session.company.preferences.wellnessConnection}{$smarty.session.company.preferences.wellnessConnection}<br /><a href=\"?pg=wellnessConnection\">Click Here</a>{else}</h3></td>\r\n		{/if}\r\n	    <td valign=\"middle\"></td></tr>\r\n\r\n\r\n	{if $smarty.session.company.preferences.hide_survey_hra neq \"yes\"}\r\n		{select_query return=\"row\" assign=\"aHRA\"}\r\n			dateTaken, pointsEarned FROM surveys_taken\r\n			WHERE userId = {$user->id}\r\n			AND surveyId = 8\r\n			ORDER BY dateTaken DESC\r\n			LIMIT 1\r\n		{/select_query}\r\n		<tr><td><img class=\"icoStethescope\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		    <td><b><u>HRA Score</u>:</b>\r\n		    {if ($aHRA.dateTaken eq \"\") OR ($aHRA.dateTaken < $smarty.now|math:\"x - 31536000\")}<br /><a href=\"javascript://\" onclick=\"openSurvey(8);\">Available Now</a>{/if}</td>\r\n		    <td align=\"center\"><em>{$aHRA.pointsEarned}</em></td></tr>\r\n	{/if}\r\n\r\n	{if $vanity eq \"onai\" or $vanity eq \"mycompany\" or $vanity eq \"zions\" or $vanity eq \"zions2\"}\r\n	<tr><td><img class=\"icoWeights\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		    <td><b><u>Consumer Tools</u>:</b><br /><em>NEW<i>!</i></em></td>\r\n		    <td align=\"center\"><a href=\"?pg=consumer_tools\">Click Here</a></td></tr>\r\n	{/if}\r\n\r\n	{if 0 neq $totalIncentivePointAdjustments}\r\n	<br style=\"clear:left;\" />\r\n	<tr><td colspan=\"3\"><h3>Adjustments/Redemptions:</h3></td></tr>\r\n        {foreach from=$incentivePointAdjustments item=\"adjustment\" name=\"loopAdjustments\"}<tr><td nowrap>\r\n	<tr><td colspan=\"2\"><small><i>{$adjustment.dateAssigned|date_format2:\"m/d/Y\"}</i> - {$adjustment.comment}</small></td>\r\n	    <td valign=\"middle\" align=\"right\"><em>{$adjustment.points}</em></td></tr>\r\n        {foreachelse}\r\n		<tr><td colspan=\"3\">None.</td></tr>\r\n        {/foreach}\r\n	<tr><td colspan=\"2\" align=\"right\"><em>Total:</em></td>\r\n		<td align=\"center\" nowrap=\"nowrap\"><span class=\"boxed\"><nobr>{$totalIncentivePointAdjustments|default:0}</nobr></span></td></tr>\r\n	{/if}\r\n\r\n	</table>\r\n\r\n</td><td valign=\"top\">\r\n	<h3>Feedback:</h3>\r\n	<table>\r\n	<tr><td>\r\n	<img class=\"icoNurse\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n	</td><td>\r\n	<ul>\r\n		<li><a href=\"javascript:viewSurveys();\">Review My History</a></li>\r\n		{if $smarty.session.company.preferences.hide_survey_hra neq \"yes\"}\r\n		<li><a href=\"?pg=HRAScoreInfo\">HRA Score Info</a></li>\r\n		{/if}\r\n	<ul>\r\n	</td></tr>\r\n	</table>\r\n	<br />\r\n\r\n	{if $aScales|@count gt 0} {* PARTICIPATION POINTS -- IF APPLICABLE *}\r\n	<table align=\"right\">\r\n	<tr><td colspan=\"3\"><h3>Participation Points:</h3></td></tr>\r\n        {foreach from=$aScales item=\"scale\" name=\"loopScales\"}<tr><td nowrap>\r\n	<tr><td>{$scale.name|niceText}</td>\r\n	    <td><small>({$scale.dateStart|date_format2:\"m/d/y\"} - {$scale.dateEnd|date_format2:\"m/d/y\"})</small></td>\r\n	    <td valign=\"middle\" align=\"right\"><em>{$aScores[$scale.id]|number_format:\"1\"}</em></td></tr>\r\n        {foreachelse}\r\n		<tr><td colspan=\"3\">None.</td></tr>\r\n        {/foreach}\r\n	<tr><td colspan=\"2\" align=\"right\"><em>Participation points earned:</em></td>\r\n		<td align=\"right\"><span class=\"boxed\">{$totalParticipationPoints|default:0}</span></td></tr>\r\n	</table>\r\n	{/if}\r\n\r\n	</td></tr>\r\n</table>\r\n</blockquote>'),(4875,196,1.60,'smarty','0','Finally added table for adjustments',1140741446,16,'216.194.127.150','{if $smarty.session.company.preferences.hide_incentives eq \"yes\"}{include file=\"file:layouts/hiddenPageRedirector.tpl\"}{/if}\r\n{include file=\"layouts/forceLoggedIn.tpl\"}\r\n\r\n{* HANDLERS *}\r\n{include_php file=\"shared_handle:company/participationPoints_v2\"}\r\n{include_php file=\"shared_handle:company/surveyList\"}\r\n{include_php file=\"shared_handle:company/incentivePointAdjustments\"}\r\n\r\n\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{if $smarty.session.company.preferences.title_my_incentives}{$smarty.session.company.preferences.title_my_incentives}</h1>{else}\r\n<h1>{$page.title}</h1>{/if}\r\n\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n	<img class=\"iconPrize\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n</td><td valign=\"top\" width=\"100%\">\r\n	{$incentiveText|default:\"<em>Yearly Incentive</em><br /><br />Not Yet Determined.\"}	\r\n</td></tr>\r\n</table>\r\n<br />\r\n{assign var=\"surveyPointsEarned\" value=$surveyPointsEarned|default:\"0\"}\r\n{assign var=\"totalIncentivePointAdjustments\" value=$totalIncentivePointAdjustments|default:\"0\"}\r\n<h2 class=\"boxed\"><i>Total Points Earned</i>: <em>{$totalParticipationPoints|math:\"x+$surveyPointsEarned+$totalIncentivePointAdjustments\"}</em></h2>\r\n\r\n<blockquote>\r\n<table width=\"700\">\r\n<tr><td valign=\"top\">\r\n	\r\n	<table>\r\n	<tr><td colspan=\"2\">\r\n		<h3>{if $smarty.session.company.preferences.change_word_survey}{$smarty.session.company.preferences.change_word_survey}{else}Available Surveys:</h3></td>{/if}\r\n	    <td valign=\"middle\"></td></tr>\r\n	{foreach from=$surveys item=item name=\"loopSurveys\"}\r\n	{assign var=\"hideCheck\" value=\"hide_survey_`$item.id`\"}\r\n	{if $smarty.session.company.preferences[$hideCheck] neq \"yes\"}\r\n		<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n		{if $item.dateAvailable gt 0}\r\n			<img class=\"sIco ico{$item.icon}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{else}\r\n			<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"sIco ico{$item.icon}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></a></td>\r\n		   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{/if}\r\n	{/if}\r\n	{foreachelse}\r\n	<tr><td valign=\"top\" colspan=\"3\">>\r\n		None found.</td></tr>\r\n	{/foreach}\r\n\r\n	<tr><td>&nbsp;</td>\r\n	    <td align=\"right\"><em>{if $smarty.session.company.preferences.change_word_survey}{$smarty.session.company.preferences.change_word_survey}points earned{else}Survey points earned:{/if}</em></td>\r\n	    <td align=\"center\"><span class=\"boxed\">{$surveyPointsEarned|default:0}</span></td></tr>\r\n\r\n	<tr><td colspan=\"2\">\r\n		<h3>{if $smarty.session.company.preferences.wellnessConnection}{$smarty.session.company.preferences.wellnessConnection}<br /><a href=\"?pg=wellnessConnection\">Click Here</a>{else}</h3></td>\r\n		{/if}\r\n	    <td valign=\"middle\"></td></tr>\r\n\r\n\r\n	{if $smarty.session.company.preferences.hide_survey_hra neq \"yes\"}\r\n		{select_query return=\"row\" assign=\"aHRA\"}\r\n			dateTaken, pointsEarned FROM surveys_taken\r\n			WHERE userId = {$user->id}\r\n			AND surveyId = 8\r\n			ORDER BY dateTaken DESC\r\n			LIMIT 1\r\n		{/select_query}\r\n		<tr><td><img class=\"icoStethescope\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		    <td><b><u>HRA Score</u>:</b>\r\n		    {if ($aHRA.dateTaken eq \"\") OR ($aHRA.dateTaken < $smarty.now|math:\"x - 31536000\")}<br /><a href=\"javascript://\" onclick=\"openSurvey(8);\">Available Now</a>{/if}</td>\r\n		    <td align=\"center\"><em>{$aHRA.pointsEarned}</em></td></tr>\r\n	{/if}\r\n\r\n	{if $vanity eq \"onai\" or $vanity eq \"mycompany\" or $vanity eq \"zions\" or $vanity eq \"zions2\"}\r\n	<tr><td><img class=\"icoWeights\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		    <td><b><u>Consumer Tools</u>:</b><br /><em>NEW<i>!</i></em></td>\r\n		    <td align=\"center\"><a href=\"?pg=consumer_tools\">Click Here</a></td></tr>\r\n	{/if}\r\n\r\n	{if 0 neq $totalIncentivePointAdjustments}\r\n	<br style=\"clear:left;\" />\r\n	<tr><td colspan=\"3\"><h3>Adjustments/Redemptions:</h3></td></tr>\r\n        {foreach from=$incentivePointAdjustments item=\"adjustment\" name=\"loopAdjustments\"}<tr><td nowrap>\r\n	<tr><td colspan=\"2\"><small><i>{$adjustment.dateAssigned|date_format2:\"m/d/Y\"}</i> - {$adjustment.comment}</small></td>\r\n	    <td valign=\"middle\" align=\"right\"><em>{$adjustment.points}</em></td></tr>\r\n        {foreachelse}\r\n		<tr><td colspan=\"3\">None.</td></tr>\r\n        {/foreach}\r\n	<tr><td colspan=\"2\" align=\"right\"><em>Total:</em></td>\r\n		<td align=\"center\" nowrap=\"nowrap\"><span class=\"boxed\"><nobr>{$totalIncentivePointAdjustments|default:0}</nobr></span></td></tr>\r\n	{/if}\r\n\r\n	</table>\r\n\r\n</td><td valign=\"top\">\r\n	<h3>Feedback:</h3>\r\n	<table>\r\n	<tr><td>\r\n	<img class=\"icoNurse\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n	</td><td>\r\n	<ul>\r\n		<li><a href=\"javascript:viewSurveys();\">Review My History</a></li>\r\n		{if $smarty.session.company.preferences.hide_survey_hra neq \"yes\"}\r\n		<li><a href=\"?pg=HRAScoreInfo\">HRA Score Info</a></li>\r\n		{/if}\r\n	<ul>\r\n	</td></tr>\r\n	</table>\r\n	<br />\r\n\r\n	{if $aScales|@count gt 0} {* PARTICIPATION POINTS -- IF APPLICABLE *}\r\n	<table align=\"right\">\r\n	<tr><td colspan=\"3\"><h3>Participation Points:</h3></td></tr>\r\n        {foreach from=$aScales item=\"scale\" name=\"loopScales\"}<tr><td nowrap>\r\n	<tr><td>{$scale.name|niceText}</td>\r\n	    <td><small>({$scale.dateStart|date_format2:\"m/d/y\"} - {$scale.dateEnd|date_format2:\"m/d/y\"})</small></td>\r\n	    <td valign=\"middle\" align=\"right\"><em>{$aScores[$scale.id]|number_format:\"1\"}</em></td></tr>\r\n        {foreachelse}\r\n		<tr><td colspan=\"3\">None.</td></tr>\r\n        {/foreach}\r\n	<tr><td colspan=\"2\" align=\"right\"><em>Participation points earned:</em></td>\r\n		<td align=\"right\"><span class=\"boxed\">{$totalParticipationPoints|default:0}</span></td></tr>\r\n	</table>\r\n	{/if}\r\n\r\n	</td></tr>\r\n</table>\r\n</blockquote>'),(4877,196,1.62,'smarty','0','Finally added table for adjustments',1140741562,16,'216.194.127.150','{if $smarty.session.company.preferences.hide_incentives eq \"yes\"}{include file=\"file:layouts/hiddenPageRedirector.tpl\"}{/if}\r\n{include file=\"layouts/forceLoggedIn.tpl\"}\r\n\r\n{* HANDLERS *}\r\n{include_php file=\"shared_handle:company/participationPoints_v2\"}\r\n{include_php file=\"shared_handle:company/surveyList\"}\r\n{include_php file=\"shared_handle:company/incentivePointAdjustments\"}\r\n\r\n\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{if $smarty.session.company.preferences.title_my_incentives}{$smarty.session.company.preferences.title_my_incentives}</h1>{else}\r\n<h1>{$page.title}</h1>{/if}\r\n\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n	<img class=\"iconPrize\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n</td><td valign=\"top\" width=\"100%\">\r\n	{$incentiveText|default:\"<em>Yearly Incentive</em><br /><br />Not Yet Determined.\"}	\r\n</td></tr>\r\n</table>\r\n<br />\r\n{assign var=\"surveyPointsEarned\" value=$surveyPointsEarned|default:\"0\"}\r\n{assign var=\"totalIncentivePointAdjustments\" value=$totalIncentivePointAdjustments|default:\"0\"}\r\n<h2 class=\"boxed\"><i>Total Points Earned</i>: <em>{$totalParticipationPoints|math:\"x+$surveyPointsEarned+$totalIncentivePointAdjustments\"}</em></h2>\r\n\r\n<blockquote>\r\n<table width=\"700\">\r\n<tr><td valign=\"top\">\r\n	\r\n	<table>\r\n	<tr><td colspan=\"2\">\r\n		<h3>{if $smarty.session.company.preferences.change_word_survey}{$smarty.session.company.preferences.change_word_survey}{else}Available Surveys:</h3></td>{/if}\r\n	    <td valign=\"middle\"></td></tr>\r\n	{foreach from=$surveys item=item name=\"loopSurveys\"}\r\n	{assign var=\"hideCheck\" value=\"hide_survey_`$item.id`\"}\r\n	{if $smarty.session.company.preferences[$hideCheck] neq \"yes\"}\r\n		<tr><td valign=\"top\" nowrap=\"nowrap\">\r\n		{if $item.dateAvailable gt 0}\r\n			<img class=\"sIco ico{$item.icon}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		   <td valign=\"top\"><b><u>{$item.surveyName}</u>:</b> {if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}<small>Available At:</small> {$item.dateAvailable|date_format2:\"g:i A\"}{else}<small>Available On:</small> {$item.dateAvailable|date_format2:\"m/d/y\"}{/if}<br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{else}\r\n			<a href=\"javascript://\" onclick=\"openSurvey({$item.id});\"><img class=\"sIco ico{$item.icon}\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></a></td>\r\n		   <td valign=\"top\" nowrap=\"nowrap\"><b><u>{$item.surveyName}</u>:</b> <a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">Available Now</a><br />\r\n			{$item.feedbackTitle|default:\"No feedback available.\"}<br />\r\n			<a href=\"?pg=my_feedback&surveyId={$item.id}&amp;feedbackId={$item.feedbackId}\">Click here to learn more<b><i>!</i></b></a><br />\r\n			<br /></td>\r\n		   <td valign=\"middle\" align=\"right\"><em>{$item.pointsEarned}</em></td></tr>\r\n		{/if}\r\n	{/if}\r\n	{foreachelse}\r\n	<tr><td valign=\"top\" colspan=\"3\">>\r\n		None found.</td></tr>\r\n	{/foreach}\r\n\r\n	<tr><td>&nbsp;</td>\r\n	    <td align=\"right\"><em>{if $smarty.session.company.preferences.change_word_survey}{$smarty.session.company.preferences.change_word_survey}&nbsppoints earned{else}Survey points earned:{/if}</em></td>\r\n	    <td align=\"center\"><span class=\"boxed\">{$surveyPointsEarned|default:0}</span></td></tr>\r\n\r\n	<tr><td colspan=\"2\">\r\n		<h3>{if $smarty.session.company.preferences.wellnessConnection}{$smarty.session.company.preferences.wellnessConnection}<br /><a href=\"?pg=wellnessConnection\">Click Here</a>{else}</h3></td>\r\n		{/if}\r\n	    <td valign=\"middle\"></td></tr>\r\n\r\n\r\n	{if $smarty.session.company.preferences.hide_survey_hra neq \"yes\"}\r\n		{select_query return=\"row\" assign=\"aHRA\"}\r\n			dateTaken, pointsEarned FROM surveys_taken\r\n			WHERE userId = {$user->id}\r\n			AND surveyId = 8\r\n			ORDER BY dateTaken DESC\r\n			LIMIT 1\r\n		{/select_query}\r\n		<tr><td><img class=\"icoStethescope\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		    <td><b><u>HRA Score</u>:</b>\r\n		    {if ($aHRA.dateTaken eq \"\") OR ($aHRA.dateTaken < $smarty.now|math:\"x - 31536000\")}<br /><a href=\"javascript://\" onclick=\"openSurvey(8);\">Available Now</a>{/if}</td>\r\n		    <td align=\"center\"><em>{$aHRA.pointsEarned}</em></td></tr>\r\n	{/if}\r\n\r\n	{if $vanity eq \"onai\" or $vanity eq \"mycompany\" or $vanity eq \"zions\" or $vanity eq \"zions2\"}\r\n	<tr><td><img class=\"icoWeights\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" /></td>\r\n		    <td><b><u>Consumer Tools</u>:</b><br /><em>NEW<i>!</i></em></td>\r\n		    <td align=\"center\"><a href=\"?pg=consumer_tools\">Click Here</a></td></tr>\r\n	{/if}\r\n\r\n	{if 0 neq $totalIncentivePointAdjustments}\r\n	<br style=\"clear:left;\" />\r\n	<tr><td colspan=\"3\"><h3>Adjustments/Redemptions:</h3></td></tr>\r\n        {foreach from=$incentivePointAdjustments item=\"adjustment\" name=\"loopAdjustments\"}<tr><td nowrap>\r\n	<tr><td colspan=\"2\"><small><i>{$adjustment.dateAssigned|date_format2:\"m/d/Y\"}</i> - {$adjustment.comment}</small></td>\r\n	    <td valign=\"middle\" align=\"right\"><em>{$adjustment.points}</em></td></tr>\r\n        {foreachelse}\r\n		<tr><td colspan=\"3\">None.</td></tr>\r\n        {/foreach}\r\n	<tr><td colspan=\"2\" align=\"right\"><em>Total:</em></td>\r\n		<td align=\"center\" nowrap=\"nowrap\"><span class=\"boxed\"><nobr>{$totalIncentivePointAdjustments|default:0}</nobr></span></td></tr>\r\n	{/if}\r\n\r\n	</table>\r\n\r\n</td><td valign=\"top\">\r\n	<h3>Feedback:</h3>\r\n	<table>\r\n	<tr><td>\r\n	<img class=\"icoNurse\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" />\r\n	</td><td>\r\n	<ul>\r\n		<li><a href=\"javascript:viewSurveys();\">Review My History</a></li>\r\n		{if $smarty.session.company.preferences.hide_survey_hra neq \"yes\"}\r\n		<li><a href=\"?pg=HRAScoreInfo\">HRA Score Info</a></li>\r\n		{/if}\r\n	<ul>\r\n	</td></tr>\r\n	</table>\r\n	<br />\r\n\r\n	{if $aScales|@count gt 0} {* PARTICIPATION POINTS -- IF APPLICABLE *}\r\n	<table align=\"right\">\r\n	<tr><td colspan=\"3\"><h3>Participation Points:</h3></td></tr>\r\n        {foreach from=$aScales item=\"scale\" name=\"loopScales\"}<tr><td nowrap>\r\n	<tr><td>{$scale.name|niceText}</td>\r\n	    <td><small>({$scale.dateStart|date_format2:\"m/d/y\"} - {$scale.dateEnd|date_format2:\"m/d/y\"})</small></td>\r\n	    <td valign=\"middle\" align=\"right\"><em>{$aScores[$scale.id]|number_format:\"1\"}</em></td></tr>\r\n        {foreachelse}\r\n		<tr><td colspan=\"3\">None.</td></tr>\r\n        {/foreach}\r\n	<tr><td colspan=\"2\" align=\"right\"><em>Participation points earned:</em></td>\r\n		<td align=\"right\"><span class=\"boxed\">{$totalParticipationPoints|default:0}</span></td></tr>\r\n	</table>\r\n	{/if}\r\n\r\n	</td></tr>\r\n</table>\r\n</blockquote>'),