(4717,233,1.54,'smarty','0','Testing new Other Winners section',1138082454,2,'24.2.76.126','{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	{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 $acm->isDomainAdmin() and $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\"}\r\n			<a href=\"javascript://\" onclick=\"window.open(\'?pg=competition/winners&cid={$competition.id}&prizeId={$prize.id}\', \'\', \'height=550,width=285,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 $isManager 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				<span class=\"cellHeadTiny\">Del</span>\r\n				<span class=\"cellHeadLarge\" style=\"width:134px;\">Team Name</span><br />\r\n				{foreach from=$competition.teams item=\"teams\" key=\"teamName\"}\r\n					{counter name=\"counterI\" start=\"0\" print=0}\r\n					{if $teamName ne \"Waiting to Join\"}\r\n						<span class=\"cellTiny\" style=\"clear:left;\"><small><input type=\"checkbox\" name=\"manageTeam[delete][]\" value=\"{$teamName|htmlspecialchars}\"></small></span>\r\n						<span class=\"cellLarge\" style=\"width:134px;\"><small><input id=\"renameTeam\" type=\"text\" value=\"{$teamName|htmlspecialchars}\" name=\"manageTeam[rename][{$teamName|htmlspecialchars}]\" size=\"10\" style=\"width:124px;height:12px\"></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 $isManager}\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}<input type=\"checkbox\" name=\"changeTeam[players][{$competition.users.$userId}]\" />{/if}{$competition.users.$userId}</small></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 $isManager 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 type=\"submit\" class=\"button\" value=\"Submit Changes\">\r\n		</form>\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*}'),(4293,258,0.22,'php','0','Added some descriptions next to the steps in the menu',1126854360,2,'24.2.76.126','<h1><a href=\"?pg=<?php echo $SPADE[\'page\'][\'name\']; ?>\">Version 2 (V2) Conversion: Overall Step 4</a></h1>\r\n<br />\r\n\r\n<?php\r\n\r\nif (FALSE == isset($_REQUEST[\'confirm\'])) {\r\n\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=1\">Click here to proceed with the PHP conversion (step 1: User eStats).</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=2\">Execute step 2: eStat Entries.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=3\">Execute step 3: Company / Groups (EHC ONLY).</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=4\">Execute step 4: Competitions.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=5\">Execute step 5: Fix eStat Entries for Non-Standard Units.</a><br />\';\r\n	echo \'<a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=6\">Execute step 6: Rebuild eStats From Surveys Taken (EHC ONLY).</a><br />\';\r\n	echo \'<br />\';\r\n	echo \'Make sure that you have executed steps 1 through 3 of the conversion process on a FRESH copy of of the old V1 EHC database.<br />\';\r\n\r\n	return;\r\n}\r\n\r\ndefine (\'LAST_STEP_NUMBER\', 6);\r\n\r\n/**\r\n * NOTES:\r\n \r\n*** Current eStats\r\n*\r\n\r\n1  weight  Your current weight  1  lifestyle  yes  2  1119738180  \r\n2  water  amount of water consumed  4  nutrition  yes  16  1119740160  \r\n3  time exercised  amount of time exercised  7  fitness  yes  16  1119740340  \r\n4  distance exercised  amount of distance exercised  9  fitness  yes  16  1119740400  \r\n5  fruits and vegetables  fruit and vegetables eaten  12  nutrition  yes  16  1119740460  \r\n6  sleep  amount of time slept at night  8  lifestyle  yes  16  1119740640  \r\n7  calorie intake  Calories eaten  18  nutrition  yes  2  1122444781  \r\n8  fat intake  Fat in all food eaten  17  nutrition  yes  2  1122444781  \r\n9  carb intake  Carbohydrates in all food eaten  17  nutrition  yes  2  1122444781  \r\n\r\n*** Current units\r\n*\r\n\r\n1  pounds  1  2  1119738422  \r\n2  kilograms  1  2  1119738444  \r\n4  glasses  1  16  1119742425  \r\n5  ounces  0  16  1119742425  \r\n7  minutes  0  16  1119742490  \r\n8  hours  2  16  1119742490  \r\n9  miles  2  16  1119742515  \r\n10  kilometers  2  16  1119742515  \r\n11  laps  1  16  1119742546  \r\n12  cups  1  16  1119742939  \r\n13  pieces  1  16  1119742953  \r\n16  steps  0  16  1119743102  \r\n17  grams  1  2  1122444589  \r\n18  calories  0  2  1122444589  \r\n\r\n */\r\n\r\necho \'<h2>PHP Conversion Step \' . (int)$_REQUEST[\'confirm\'] . \'</h2>\';\r\n\r\nswitch ((int)$_REQUEST[\'confirm\']) {\r\n// -------------------------------- USER ESTATS ---------------------------------------------\r\ncase \'1\':\r\n\r\n	echo \"Creating User eStats (determining which eStats to track) for all users.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Clear out table first (just in case)\r\n	$Q = \"DELETE FROM user_estats\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up all users to track weight with \'pounds\' as units\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT u.id AS \'userId\', 1 as \'estatId\', 1 AS \'unitId\', \'daily\' as \'frequency\'\r\n		FROM _users u\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up all users to track time exercised with \'minutes\' as units\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT u.id AS \'userId\', 3 as \'estatId\', 7 AS \'unitId\', \'daily\' as \'frequency\'\r\n		FROM _users u\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'distance exercised\' for users who had entries (estat 4, \'steps\' unit 16, \'miles\' unit 9)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT us.userId AS \'userId\', 4 AS \'estatId\', IF(avg(distanceExercised)>100,16,9) AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.distanceExercised > 0\r\n		GROUP BY us.userId\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'water\' for users who had entries (estat 2, \'ounces\' unit 5, \'glasses\' unit 4)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT us.userId AS \'userId\', 2 AS \'estatId\', IF(avg(water)>7,5,4) AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.water > 0\r\n		GROUP BY us.userId\";\r\n		\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'calories\' for users who had entries (estat 7, \'calories\' unit 18)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)\r\n		SELECT us.userId AS \'userId\', 7 AS \'estatId\', 18 AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.calories > 0\r\n		GROUP BY us.userId\";\r\n	\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'fat\' for users who had entries (estat 8, \'grams\' unit 17)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)		\r\n		SELECT us.userId AS \'userId\', 8 AS \'estatId\', 17 AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.fat > 0\r\n		GROUP BY us.userId\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Set up \'carbs\' for users who had entries (estat 9, \'grams\' unit 17)\r\n	$Q = \"INSERT INTO user_estats (userId, estatId, unitId, frequency)		\r\n		SELECT us.userId AS \'userId\', 9 AS \'estatId\', 17 AS \'unitId\', \'daily\' AS \'frequency\'\r\n		FROM user_statistics us \r\n		WHERE us.carbs > 0\r\n		GROUP BY us.userId\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	break;\r\n\r\n// -------------------------------- ESTAT ENTRIES ---------------------------------------------\r\ncase \'2\':\r\n\r\n	echo \"Creating eStat Entries for all users.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Clear out table first (just in case)\r\n	$Q = \"DELETE FROM estat_entries\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'weight\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 1 AS \'estatId\', us.weight AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.weight > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'water\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 2 AS \'estatId\', us.water AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.water > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'time exercised\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 3 AS \'estatId\', us.minutesExercise AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.minutesExercise > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'distance exercised\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 4 AS \'estatId\', us.distanceExercised AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.distanceExercised > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'calories\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 7 AS \'estatId\', us.calories AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.calories > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'fat\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 8 AS \'estatId\', us.fat AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.fat > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	// Insert \'carb\' records\r\n	$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n		SELECT us.userId, 9 AS \'estatId\', us.carbs AS \'value\', us.dateOfEntry, us.userId AS \'createdByUserId\', UNIX_TIMESTAMP(NOW()) AS \'dateCreated\'\r\n		FROM user_statistics us\r\n		WHERE us.carbs > 0\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError(\'An error occurred at \' . __FILE__ . \':\' . __LINE__ . \'.\');\r\n		return false;\r\n	}\r\n\r\n	break;\r\n\r\n// -------------------------------- COMPANY / GROUPS ---------------------------------------------\r\ncase \'3\':\r\n\r\n	echo \"Creating groups for all companies and group memberships for all users.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Create groups for companies\r\n	$Q = \"SELECT id, companyName, companyVanity, userId\r\n		FROM companies\";\r\n\r\n	$companies = $SPADE[\'db\']->query($Q);\r\n\r\n	foreach ($companies as $company) {\r\n		$Q = \"INSERT INTO _groups (name, description, about, ownerId)\r\n			VALUES (\'\" . $company[\'companyVanity\'] . \"\', \r\n				\'\" . $company[\'companyName\'] . \"\', \r\n				\'Company Group Account\', \r\n				\" . (int)$company[\'userId\'] . \")\";\r\n\r\n		$companyGroupId = $SPADE[\'db\']->query($Q);\r\n\r\n		if (FALSE == $companyGroupId) {\r\n			logError (\'An error occurred while attempting to create a group for company \"\' . $company[\'companyName\'] . \'\".\');\r\n			continue;\r\n		}\r\n\r\n		// Update companies with group IDs\r\n		$Q = \"UPDATE companies \r\n			SET groupId = \" . (int)$companyGroupId . \"\r\n			WHERE id = \" . (int)$company[\'id\'];\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'An error occurred while attempting to update the company \"\' . $company[\'companyName\'] . \'\" with its new group id (\' . $companyGroupId . \').\');\r\n			continue;\r\n		}\r\n\r\n		// Create group memberships for all users\r\n		$Q = \"INSERT INTO _group_users (groupId, userId, title)\r\n			SELECT \" . (int)$companyGroupId . \" AS \'groupId\', u.id AS \'userId\', \'Employee: \" . addslashes($company[\'companyName\']) . \"\' AS \'title\'\r\n			FROM _users u\r\n			WHERE u.companyId = \" . (int)$company[\'id\'];\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'An error occurred while attempting to create group memberships for employees of \"\' . $company[\'companyName\'] . \'\". It is possible this company has no registered employees.\');\r\n			//continue;\r\n		}\r\n\r\n		// Update group_forums table with now corresponding group ID\r\n		$Q = \"UPDATE group_forums\r\n			SET groupId = \" . (int)$companyGroupId . \"\r\n			WHERE groupId = \" . (int)$company[\'id\'];\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'An error occurred while attempting to update the company forums for \"\' . $company[\'companyName\'] . \'\". It is possible this company had no registered forums.\');\r\n			//continue;\r\n		}\r\n	\r\n		echo \'SUCCESS: \' . $company[\'id\'] . \'.) \' . $company[\'companyName\'] . \' -- \' . $company[\'companyVanity\'] . \'.ehealthcompete.com<br />\';\r\n	}\r\n\r\n\r\n	break;\r\n\r\n// -------------------------------- COMPETITIONS ---------------------------------------------\r\ncase \'4\':\r\n\r\n	echo \"Converting competition data.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	$scoringMethods = array(\r\n		\'Weight Lost\' => array( \'estatId\' => 1, \'basedOn\' => \'actual change\', \'polarity\' => \'negative\' ),\r\n		\'Percentage Weight Lost\' => array( \'estatId\' => 1, \'basedOn\' => \'percent change\', \'polarity\' => \'negative\' ),\r\n		\'Minutes Exercise\' => array( \'estatId\' => 3, \'basedOn\' => \'total\', \'polarity\' => \'positive\' ),\r\n		\'Distance Exercised\' => array( \'estatId\' => 4, \'basedOn\' => \'total\', \'polarity\' => \'positive\' ),\r\n		\'Weight Gained\' => array( \'estatId\' => 1, \'basedOn\' => \'actual change\', \'polarity\' => \'positive\')\r\n	);\r\n\r\n	/**		\r\n	1  weight  Your current weight  1  lifestyle  yes  2  1119738180  \r\n	2  water  amount of water consumed  4  nutrition  yes  16  1119740160  \r\n	3  time exercised  amount of time exercised  7  fitness  yes  16  1119740340  \r\n	4  distance exercised  amount of distance exercised  9  fitness  yes  16  1119740400  \r\n	5  fruits and vegetables  fruit and vegetables eaten  12  nutrition  yes  16  1119740460  \r\n	6  sleep  amount of time slept at night  8  lifestyle  yes  16  1119740640  \r\n	7  calorie intake  Calories eaten  18  nutrition  yes  2  1122444781  \r\n	8  fat intake  Fat in all food eaten  17  nutrition  yes  2  1122444781  \r\n	9  carb intake  Carbohydrates in all food eaten  17  nutrition  yes  2  1122444781  \r\n	**/\r\n\r\n\r\n	$Q = \"SELECT * FROM competitions_old\";\r\n\r\n	$competitions = $SPADE[\'db\']->query($Q);\r\n\r\n	// Copy main competition data over...\r\n	// Done in SQL step 1.\r\n\r\n	foreach ($competitions as $comp) {\r\n		// ----- CREATE COMPETITION PARAMETERS ----- //\r\n		$currentParameters = array();\r\n		$currentParameters[] = $comp[\'scoringMethod\'];		\r\n\r\n		// Create competition parameters\r\n		$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n			VALUES (\" . (int)$comp[\'id\'] . \",\r\n				\" . (int)$scoringMethods[$comp[\'scoringMethod\']][\'estatId\'] . \",\r\n				\'\" . $scoringMethods[$comp[\'scoringMethod\']][\'basedOn\'] . \"\',\r\n				\'\" . $scoringMethods[$comp[\'scoringMethod\']][\'polarity\'] . \"\',\r\n				0)\";\r\n\r\n		if (FALSE == ($parameterId = $SPADE[\'db\']->query($Q))) {\r\n			logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		// Add parameter \r\n		if ($comp[\'tieBreakerMethod\'] && !in_array($comp[\'tieBreakerMethod\'], $currentParameters)) {\r\n			$currentParameters[] = $comp[\'tieBreakerMethod\'];\r\n\r\n			$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n				VALUES (\" . (int)$comp[\'id\'] . \",\r\n					\" . (int)$scoringMethods[$comp[\'tieBreakerMethod\']][\'estatId\'] . \",\r\n					\'\" . $scoringMethods[$comp[\'tieBreakerMethod\']][\'basedOn\'] . \"\',\r\n					\'\" . $scoringMethods[$comp[\'tieBreakerMethod\']][\'polarity\'] . \"\',\r\n					1)\";\r\n	\r\n			if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n				logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n				continue;\r\n			}\r\n		}\r\n\r\n		if ($comp[\'weeklyWinnersMethod1\'] && !in_array($comp[\'weeklyWinnersMethod1\'], $currentParameters)) {\r\n			$currentParameters[] = $comp[\'weeklyWinnersMethod1\'];\r\n\r\n			$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n				VALUES (\" . (int)$comp[\'id\'] . \",\r\n					\" . (int)$scoringMethods[$comp[\'weeklyWinnersMethod1\']][\'estatId\'] . \",\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod1\']][\'basedOn\'] . \"\',\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod1\']][\'polarity\'] . \"\',\r\n					2)\";\r\n	\r\n			if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n				logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n				continue;\r\n			}\r\n		}\r\n\r\n		if ($comp[\'weeklyWinnersMethod2\'] && !in_array($comp[\'weeklyWinnersMethod2\'], $currentParameters)) {\r\n			$currentParameters[] = $comp[\'weeklyWinnersMethod2\'];\r\n\r\n			$Q = \"INSERT INTO competition_parameters (competitionId, estatId, basedOn, polarity, displayOrder)\r\n				VALUES (\" . (int)$comp[\'id\'] . \",\r\n					\" . (int)$scoringMethods[$comp[\'weeklyWinnersMethod2\']][\'estatId\'] . \",\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod2\']][\'basedOn\'] . \"\',\r\n					\'\" . $scoringMethods[$comp[\'weeklyWinnersMethod2\']][\'polarity\'] . \"\',\r\n					3)\";\r\n	\r\n			if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n				logError (\'Unable to create (primary) competition parameter for competition ID \' . $comp[\'id\'] . \'.\');\r\n				continue;\r\n			}\r\n		}\r\n\r\n\r\n		// ----- CREATE COMPETITION PRIZES ----- //\r\n		$Q = \"INSERT INTO competition_prizes (\r\n				competitionId, title, description, maxWinners, \r\n				frequency, andOr, dateStart, dateEnd )\r\n			VALUES (\" . (int)$comp[\'id\'] . \",\r\n				\'Competition Prize\',\r\n				\'\" . addslashes($comp[\'potDescription\']) . \"\',\r\n				1,\r\n				\'once\',\r\n				\'and\',\r\n				\" . (int)$comp[\'startDate\'] . \",\r\n				\" . (int)$comp[\'endDate\'] . \")\";\r\n\r\n		if (FALSE == ($prizeId = $SPADE[\'db\']->query($Q))) {\r\n			logError (\'Unable to create a competition prize for competition ID \' . (int)$comp[\'id\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		\r\n		// ----- CREATE COMPETITION PRIZE PARAMETERS ----- //\r\n		$Q = \"INSERT INTO competition_prize_parameters (\r\n				competitionPrizeId, competitionParameterId)\r\n			VALUES (\" . (int)$prizeId . \",\r\n				\" . (int)$parameterId . \")\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Unable to create a competition prize parameter for competition ID \' . (int)$comp[\'id\'] . \'.\');\r\n			continue;\r\n		}\r\n	}\r\n\r\n	// ----- CREATE INVOICES ----- //\r\n	$Q = \"SELECT cp.userId, u.firstName, u.lastName, c.companyName, u.address1, u.address2,\r\n			u.city, u.state, u.country, u.zip, u.phone1, u.email,\r\n			cp.amount, cp.dateDonated, cp.paymentMethod, cp.entryFee,\r\n			cp.compId, comp.title\r\n		FROM competition_pot cp\r\n		INNER JOIN _users u ON (cp.userId = u.id)\r\n		LEFT JOIN competitions comp ON (cp.compId = comp.id)\r\n		LEFT JOIN companies c ON (u.companyId = c.id)\";\r\n\r\n	$paymentDetails = $SPADE[\'db\']->query($Q);\r\n\r\n	// Continue if no entry fees were paid\r\n	if (FALSE == is_array($paymentDetails) || 0 == sizeof($paymentDetails)) {\r\n		continue;\r\n	}\r\n\r\n	foreach ($paymentDetails as $payment) {\r\n		$Q = \"INSERT INTO invoices (\r\n				userId, firstName, lastName, company,\r\n				address1, address2, city, state, country, zip, phone, email,\r\n				dateDue, amountDue)\r\n			VALUES (\r\n				\" . (int)$payment[\'userId\'] . \",\r\n				\'\" . addslashes($payment[\'firstName\']) . \"\',\r\n				\'\" . addslashes($payment[\'lastName\']) . \"\',\r\n				\'\" . addslashes($payment[\'companyName\']) . \"\',\r\n				\'\" . addslashes($payment[\'address1\']) . \"\',\r\n				\'\" . addslashes($payment[\'address2\']) . \"\',\r\n				\'\" . addslashes($payment[\'city\']) . \"\',\r\n				\'\" . addslashes($payment[\'state\']) . \"\',\r\n				\'\" . addslashes($payment[\'country\']) . \"\', \r\n				\'\" . $payment[\'zip\'] . \"\',\r\n				\'\" . $payment[\'phone1\'] . \"\',\r\n				\'\" . addslashes($payment[\'email\']) . \"\',\r\n				\" . (int)$payment[\'dateDonated\'] . \",\r\n				\'\" . $payment[\'entryFee\'] . \"\')\";\r\n\r\n		if (FALSE == ($invoiceId = $SPADE[\'db\']->query($Q))) {\r\n			logError (\'Could not create an invoice for competition payment for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\'] . \' \' . $payment[\'lastName\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		$Q = \"INSERT INTO competition_entry_fees (\r\n				competitionId, userId, amount, invoiceId)\r\n			VALUES (\r\n				\'\" . $payment[\'compId\'] . \"\',\r\n				\" . (int)$payment[\'userId\'] . \",\r\n				\'\" . $payment[\'amount\'] . \"\',\r\n				\" . (int)$invoiceId . \")\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Unable to save the competition entry fee for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\'] . \' \' . $payment[\'lastName\'] . \'.\');\r\n			continue;\r\n		}\r\n\r\n		$Q = \"INSERT INTO invoice_line_items (\r\n				invoiceNumber, description, price, quantity)\r\n			VALUES (\r\n				\" . (int)$invoiceId . \",\r\n				\'Competition entry fee, competition #\" . $payment[\'compId\'] . \"\',\r\n				\'\" . $payment[\'entryFee\'] . \"\', \r\n				1)\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Could not create an invoice line item for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\'] . \' \' . $payment[\'lastName\'] . \'.\');\r\n		}\r\n\r\n		$Q = \"INSERT INTO invoice_payments (\r\n				invoiceNumber, dateOfPayment, amountPaid, paymentMethod)\r\n			VALUES (\r\n				\" . (int)$invoiceId . \",\r\n				\" . (int)$payment[\'dateDonated\'] . \",\r\n				\'\" . $payment[\'amount\'] . \"\',\r\n				\'\" . $payment[\'paymentMethod\'] . \"\')\";\r\n\r\n		if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n			logError (\'Could not create an invoice payment for comp ID \' . $payment[\'compId\'] . \' for \' . $payment[\'firstName\' ] . \' \' . $payment[\'lastName\'] . \'.\');\r\n			continue;\r\n		}\r\n	}\r\n\r\n	break;\r\n\r\n// -------------------------------- FIX ESTAT ENTRIES FOR NON-STANDARD UNITS ---------------------------------------------\r\ncase \'5\':\r\n\r\n	echo \"Converting eStats for non-standard units.<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	// Get userId\'s of users who have non-standard units (ounces = unitId 5) for water entries.\r\n	$Q = \"SELECT u.id\r\n		FROM user_estats ue\r\n		INNER JOIN _users u ON (ue.userId = u.id)\r\n		WHERE ue.estatId = 2\r\n		AND ue.unitId = 5\";\r\n\r\n	$userIds = $SPADE[\'db\']->query($Q, DB_LIST);\r\n	$userIds = implode(\',\', $userIds);\r\n\r\n	$Q = \"UPDATE estat_entries \r\n		SET value = (value * 0.125)\r\n		WHERE estatId = 2\r\n		AND userId IN (\" . $userIds . \")\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError (\'An error occurred while attempting to update and convert water entries from ounces to glasses.\');\r\n		break;\r\n	}\r\n\r\n	// Get userId\'s of users who have non-standard units (steps = unitId 16) for distance exercised entries.\r\n	$Q = \"SELECT u.id\r\n		FROM user_estats ue\r\n		INNER JOIN _users u ON (ue.userId = u.id)\r\n		WHERE ue.estatId = 4\r\n		AND ue.unitId = 16\";\r\n\r\n	$userIds = $SPADE[\'db\']->query($Q, DB_LIST);\r\n	$userIds = implode(\',\', $userIds);\r\n\r\n	$Q = \"UPDATE estat_entries \r\n		SET value = (value * 0.0005)\r\n		WHERE estatId = 4\r\n		AND userId IN (\" . $userIds . \")\";\r\n\r\n	if (FALSE == $SPADE[\'db\']->query($Q)) {\r\n		logError (\'An error occurred while attempting to update and convert distance exercised entries from steps to miles.\');\r\n		break;\r\n	}\r\n\r\n\r\n	break;\r\n\r\n// -------------------------------- CORRECT / REBUILD estat_entries FROM company_survey_estats ---------------------------------------------\r\ncase \'6\':\r\n\r\n	echo \"Rebuilding estat_entries from company_survey_estats<br />\";\r\n	echo \"No error indicates success.<br />\";\r\n\r\n	$Q = \"SELECT *\r\n		FROM company_survey_estats\";\r\n\r\n	// Temp...\r\n	$Q .= \" WHERE surveyId = 34\";\r\n\r\n	$companySurveyEstats = $SPADE[\'db\']->query($Q);\r\n\r\n	foreach ($companySurveyEstats as $cse) {\r\n\r\n		$whereAddition = \'\';\r\n\r\n		if ($cse[\'dateStart\']) {\r\n			$whereAddition .= \' AND st.dateTaken > \' . $cse[\'dateStart\'];\r\n		}\r\n\r\n		if ($cse[\'dateEnd\']) {\r\n			$whereAddition .= \' AND st.dateTaken < \' . $cse[\'dateEnd\'];\r\n		}\r\n\r\n		$Q = \"SELECT ee.id\r\n			FROM surveys_taken st\r\n			INNER JOIN surveys s ON (st.surveyId = s.id)\r\n			INNER JOIN estat_entries ee ON (ee.userId = st.userId AND ee.estatId = \" . $cse[\'estatId\'] . \" AND ee.dateOfEntry = st.dateTaken)\r\n			WHERE s.id = \" . $cse[\'surveyId\'] . \"\r\n			AND (s.companyId = \" . $cse[\'companyId\'] . \" OR s.companyId = 0)\" . $whereAddition;\r\n		\r\n		display($Q);\r\n\r\n		$entryIds = trim(implode(\',\', $SPADE[\'db\']->query($Q, DB_LIST)));\r\n\r\n		if ($entryIds) {\r\n			$Q = \"DELETE FROM estat_entries WHERE id IN (\" . $entryIds . \")\";\r\n	\r\n			display($Q);\r\n	\r\n			$SPADE[\'db\']->query($Q);\r\n		}\r\n\r\n		$Q = \"SELECT st.*\r\n			FROM surveys_taken st\r\n			LEFT JOIN surveys s ON (st.surveyId = s.id)\r\n			WHERE s.id = \" . $cse[\'surveyId\'] . \"\r\n			AND (s.companyId = \" . $cse[\'companyId\'] . \" OR s.companyId = 0)\" . $whereAddition;\r\n\r\n		display($Q);\r\n\r\n		$surveysTaken = $SPADE[\'db\']->query($Q);\r\n\r\n		if (is_array($surveysTaken) AND 0 < sizeof($surveysTaken)) {\r\n			foreach ($surveysTaken as $st) {\r\n				$Q = \"INSERT INTO estat_entries (userId, estatId, value, dateOfEntry, createdByUserId, dateCreated)\r\n					VALUES (\r\n						\" . $st[\'userId\'] . \",\r\n						\" . $cse[\'estatId\'] . \",\r\n						\" . $st[\'pointsEarned\'] . \",\r\n						\" . $st[\'dateTaken\'] . \",\r\n						\" . $SPADE[\'user\']->id . \",\r\n						\" . time() . \")\";\r\n\r\n				display($Q);\r\n\r\n				$SPADE[\'db\']->query($Q);\r\n			}\r\n		}\r\n	}\r\n\r\n\r\n\r\n	break;\r\n\r\ndefault:\r\n	logError( \'Unknown confirm step number: \' . $_REQUEST[\'confirm\'] );\r\n	return;\r\n}\r\n\r\n\r\nif ($_REQUEST[\'confirm\'] <= LAST_STEP_NUMBER) {\r\n	echo \'<br /><br /><a href=\"index.php?pg=\' . $SPADE[\'page\'][\'name\'] . \'&confirm=\' . ((int)$_REQUEST[\'confirm\'] + 1) . \'\">Execute the next step of the PHP conversion process.</a>\';\r\n}\r\n\r\n\r\n?>');


INSERT INTO `_page_history` VALUES (4322,195,0.73,'smarty','0','graphLinks updates..',1127148826,3,'216.194.127.150','{if $smarty.session.company.preferences.hide_home eq \"yes\"}{include file=\"file:layouts/hiddenPageRedirector.tpl\"}{/if}\r\n{include file=\"layouts/forceLoggedIn.tpl\"}\r\n{include_php file=\"shared_handle:myHome\"}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title} - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n\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\r\n<table width=\"700\">\r\n<tr>\r\n	<td>\r\n	<div id=\"statsContainer\" style=\"overflow:hidden;\">\r\n		<a name=\"updateStats\"></a>\r\n		<iframe name=\"profileUpdateFrame\" id=\"profileUpdateIFrame\" src=\"?pg=my_statistics/update&userId={$smarty.request.userId|default:$userProfile.id}\" frameborder=\"0\" width=\"700\" height=\"440\" scrolling=\"no\"></iframe>\r\n	</div>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n<table width=\"700\">\r\n<tr><td>\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'profileGraphTable\', \'\', \'showHide\');\"><img id=\"profileGraphTable_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>User Profile &amp; Graphs</h2>\r\n</td></tr></table>\r\n\r\n<table id=\"profileGraphTable\" width=\"700\">\r\n<tr><td width=\"205\" valign=\"top\">\r\n	<div id=\"UserProfileColumn\" class=\"contentColumn\">\r\n	<h2 class=\"withBG\">Your Profile</h2>\r\n		<span class=\"cellHeadLarge\">Age:</span><span class=\"cellSmall\">{$userProfile.age|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet|default:\"-\"}\'{$userProfile.heightInches|default:\"-\"}&quot;</span><br />\r\n		<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight|default:\"-\"}</span><br /><span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Current Weight:</span><span class=\"cellSmall\">{$userProfile.currentWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">HRA Score:</span><span class=\"cellSmall\">{$aHRA.pointsEarned|default:\"-\"}</span><br />\r\n\r\n		<a href=\"?pg=my_profile\" class=\"link\"><img src=\"{$skinFolder}images/btn_profile.gif\" border=\"0\" alt=\"Update Profile\" vspace=\"10\" /></a><br />\r\n		<a href=\"?pg=my_settings\" class=\"link\"><img src=\"{$skinFolder}images/btn_settings.gif\" border=\"0\" alt=\"Account Settings\" vspace=\"0\" /></a>\r\n	</div>\r\n</td><td valign=\"top\" align=\"center\">	\r\n	<div id=\"graphContainer\">\r\n	<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small\" frameborder=\"0\" width=\"425\" height=\"240\" scrollbars=\"no\"></iframe></div>\r\n	{if $user->username eq \"chad\" OR $user->username eq \"trave\"}\r\n	{include_php file=\"shared_handle:estats/getEstatsInfo\"}\r\n	<div id=\"graphLinksDiv\">\r\n		<table width=\"100%\">\r\n		<tr>\r\n			<td width=\"100%\" align=\"center\"><small>\r\n			{foreach from=$aEstats item=\"es\" name=\"loopEstats\"}\r\n				<a href=\"?pg=flashgraph-frame&format=small&userIds={$userProfile.id}&esId={$es.id}&type={$es.name|niceText|htmlspecialchars}&precision={$es.units.decimalPlaces|default:1}\" target=\"graphwindow\">{$es.name|niceText|replace:\" \":\"&nbsp;\"}</a> {if !$smarty.foreach.loopEstats.last}|{/if}\r\n			{foreachelse}\r\n				<b>No Available eStat Graphs</b>\r\n			{/foreach}\r\n			</small></td>\r\n		</tr>\r\n		</table>\r\n	</div>\r\n	{else}\r\n	<small>\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1&totalChange=1\" target=\"graphwindow\">Change in Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1\" target=\"graphwindow\">Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</a><br />\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=water&fillPrevious=0&precision=1\" target=\"graphwindow\">Water Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise Min</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</a>\r\n	</small>\r\n	{/if}\r\n</td></tr>\r\n</table>\r\n<br />\r\n<table width=\"700\">\r\n<tr><td colspan=\"2\">\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'goalsMottosBlock\', \'\', \'showHide\');\"><img id=\"goalsMottosBlock_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>\r\n	Goals &amp; Mottos</h2>\r\n<blockquote id=\"goalsMottosBlock\" style=\"display:block;\">\r\n<dl>\r\n	<dt>Motto:</dt>\r\n	<dd>{$userProfile.personalSaying|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Nutrition Goal:</dt>\r\n	<dd>{$userProfile.nutritionGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Fitness Goal:</dt>\r\n	<dd>{$userProfile.fitnessGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Lifestyle Goal:</dt>\r\n	<dd>{$userProfile.lifestyleGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n</dl>\r\n</blockquote>\r\n</td></tr>\r\n</table>\r\n\r\n<script type=\"text/javascript\">\r\n	function updateGraphLinks(s) {ldelim}\r\n		s.replace(/\\[userId\\]/gi, \'{$userProfile.id}\'); \r\n		document.getElementById(\'graphLinksDiv\').innerHTML = s;\r\n	{rdelim}\r\n</script>'),(4323,195,0.74,'smarty','0','graphLinks updates..',1127148915,3,'216.194.127.150','{if $smarty.session.company.preferences.hide_home eq \"yes\"}{include file=\"file:layouts/hiddenPageRedirector.tpl\"}{/if}\r\n{include file=\"layouts/forceLoggedIn.tpl\"}\r\n{include_php file=\"shared_handle:myHome\"}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title} - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n\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\r\n<table width=\"700\">\r\n<tr>\r\n	<td>\r\n	<div id=\"statsContainer\" style=\"overflow:hidden;\">\r\n		<a name=\"updateStats\"></a>\r\n		<iframe name=\"profileUpdateFrame\" id=\"profileUpdateIFrame\" src=\"?pg=my_statistics/update&userId={$smarty.request.userId|default:$userProfile.id}\" frameborder=\"0\" width=\"700\" height=\"440\" scrolling=\"no\"></iframe>\r\n	</div>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n<table width=\"700\">\r\n<tr><td>\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'profileGraphTable\', \'\', \'showHide\');\"><img id=\"profileGraphTable_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>User Profile &amp; Graphs</h2>\r\n</td></tr></table>\r\n\r\n<table id=\"profileGraphTable\" width=\"700\">\r\n<tr><td width=\"205\" valign=\"top\">\r\n	<div id=\"UserProfileColumn\" class=\"contentColumn\">\r\n	<h2 class=\"withBG\">Your Profile</h2>\r\n		<span class=\"cellHeadLarge\">Age:</span><span class=\"cellSmall\">{$userProfile.age|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet|default:\"-\"}\'{$userProfile.heightInches|default:\"-\"}&quot;</span><br />\r\n		<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight|default:\"-\"}</span><br /><span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">Current Weight:</span><span class=\"cellSmall\">{$userProfile.currentWeight|default:\"-\"}</span><br />\r\n		<span class=\"cellHeadLarge\">HRA Score:</span><span class=\"cellSmall\">{$aHRA.pointsEarned|default:\"-\"}</span><br />\r\n\r\n		<a href=\"?pg=my_profile\" class=\"link\"><img src=\"{$skinFolder}images/btn_profile.gif\" border=\"0\" alt=\"Update Profile\" vspace=\"10\" /></a><br />\r\n		<a href=\"?pg=my_settings\" class=\"link\"><img src=\"{$skinFolder}images/btn_settings.gif\" border=\"0\" alt=\"Account Settings\" vspace=\"0\" /></a>\r\n	</div>\r\n</td><td valign=\"top\" align=\"center\">	\r\n	<div id=\"graphContainer\">\r\n	<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small\" frameborder=\"0\" width=\"425\" height=\"240\" scrollbars=\"no\"></iframe></div>\r\n	{if $user->username eq \"chad\" OR $user->username eq \"trave\"}\r\n	{include_php file=\"shared_handle:estats/getEstatsInfo\"}\r\n	<div id=\"graphLinksDiv\">\r\n		<table width=\"100%\">\r\n		<tr>\r\n			<td width=\"100%\" align=\"center\"><small>\r\n			{foreach from=$aEstats item=\"es\" name=\"loopEstats\"}\r\n				<a href=\"?pg=flashgraph-frame&format=small&userIds={$userProfile.id}&esId={$es.id}&type={$es.name|niceText|htmlspecialchars}&precision={$es.units.decimalPlaces|default:1}\" target=\"graphwindow\">{$es.name|niceText|replace:\" \":\"&nbsp;\"}</a> {if !$smarty.foreach.loopEstats.last}|{/if}\r\n			{foreachelse}\r\n				<b>No Available eStat Graphs</b>\r\n			{/foreach}\r\n			</small></td>\r\n		</tr>\r\n		</table>\r\n	</div>\r\n	{else}\r\n	<small>\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1&totalChange=1\" target=\"graphwindow\">Change in Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=1\" target=\"graphwindow\">Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</a><br />\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=water&fillPrevious=0&precision=1\" target=\"graphwindow\">Water Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise Min</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</a>\r\n	</small>\r\n	{/if}\r\n</td></tr>\r\n</table>\r\n<br />\r\n<table width=\"700\">\r\n<tr><td colspan=\"2\">\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'goalsMottosBlock\', \'\', \'showHide\');\"><img id=\"goalsMottosBlock_img\" src=\"blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a>\r\n	</div>\r\n	Goals &amp; Mottos</h2>\r\n<blockquote id=\"goalsMottosBlock\" style=\"display:block;\">\r\n<dl>\r\n	<dt>Motto:</dt>\r\n	<dd>{$userProfile.personalSaying|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Nutrition Goal:</dt>\r\n	<dd>{$userProfile.nutritionGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Fitness Goal:</dt>\r\n	<dd>{$userProfile.fitnessGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n	<dt>Lifestyle Goal:</dt>\r\n	<dd>{$userProfile.lifestyleGoal|default:\"- Not Set - Click on the <i><b>Update my Profile</b></i> button toward the top of this page to set your goal\"}</dd>\r\n</dl>\r\n</blockquote>\r\n</td></tr>\r\n</table>\r\n\r\n<script type=\"text/javascript\">\r\n	function updateGraphLinks(s) {ldelim}\r\n		//s.replace(/\\[userId\\]/gi, \'{$userProfile.id}\'); \r\n		document.getElementById(\'graphLinksDiv\').innerHTML = s;\r\n	{rdelim}\r\n</script>'),(4325,138,0.56,'smarty','0','starting flashgraph v2 update',1127149369,3,'216.194.127.150','{* if $user->username eq \"jhyde\"}{display var=$smarty.get}{/if *}\r\n{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n<table width=\"100%\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasBack}<a href=\"#\"><small>back</small></a>{/if}</td>\r\n	<td width=\"100%\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave1\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		Debug this graph: <a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasNext}<a href=\"#\"><small>next</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4326,138,0.57,'smarty','0','starting flashgraph v2 update',1127149468,3,'216.194.127.150','{* if $user->username eq \"jhyde\"}{display var=$smarty.get}{/if *}\r\n{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n<table width=\"100%\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasBack}<a href=\"#\"><small>back</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave1\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		Debug this graph: <a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasNext}<a href=\"#\"><small>next</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4327,138,0.58,'smarty','0','starting flashgraph v2 update',1127149532,3,'216.194.127.150','{* if $user->username eq \"jhyde\"}{display var=$smarty.get}{/if *}\r\n{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasBack}<a href=\"#\"><small>back</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave1\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		Debug this graph: <a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasNext}<a href=\"#\"><small>next</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4328,138,0.59,'smarty','0','starting flashgraph v2 update',1127149557,3,'216.194.127.150','{* if $user->username eq \"jhyde\"}{display var=$smarty.get}{/if *}\r\n{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasBack}<a href=\"#\"><small>back</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave1\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasNext}<a href=\"#\"><small>next</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4329,138,0.60,'smarty','0','starting flashgraph v2 update',1127149647,3,'216.194.127.150','{* if $user->username eq \"jhyde\"}{display var=$smarty.get}{/if *}\r\n{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasBack}<a href=\"#\"><small>back more</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave1\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasNext}<a href=\"#\"><small>forward more</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4330,138,0.61,'smarty','0','starting flashgraph v2 update',1127149737,3,'216.194.127.150','{* if $user->username eq \"jhyde\"}{display var=$smarty.get}{/if *}\r\n{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasBack}<a href=\"#\"><small>go back more</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave1\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if true OR $graphHasNext}<a href=\"#\"><small>go forward more</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4331,262,0.10,'smarty','0','Page created.',1127149799,16,'216.194.127.150',''),(4332,262,0.11,'smarty','0','Page created.',1127150494,16,'216.194.127.150','<h1>Welcome to Apple Compete!</h1>\r\n\r\n<img src=\"{$skinFolder}images/icon_products.jpg\" align=\"right\" alt=\"\" class=\"img1\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Apple Compete allows you to participate in Company Sponsored Health Competitions.\r\nIt is also where you can track and submit your \"Go for the Gold\" incentive points,\r\nand your personal results from your Health Screenings.  Take charge of your progress\r\nby signing up with <b>Apple Compete</b>.</p>\r\n\r\n<h2> Competitions</h2>\r\n\r\n<p>Once you are signed up on Apple Compete you can participate in enjoyable competitions\r\nfor prizes.  You will be able to see a real time leaderboard and know exactly how \r\nyou stand against your co-workers.  To keep your identity hidden from your co-workers\r\nyou will choose a username during the sign up process.  Join today and begin enjoying\r\nthe fun and motivation that competitions can bring.</p>\r\n\r\n<h2>Go for the Gold</h2>\r\n<p>Go for the Gold has now gone \"On Line.\"  From Apple Compete you can enter, track, and\r\nsubmit all of your \"Go for the Gold\" progress.  No more hassling with paper work with \r\nApple Compete.</p>\r\n\r\n<h2>Health Screening</h2>\r\n<p>Do want to know if your exercise and nutrition efforts are improving your Blood Pressure?\r\nWith Apple Compete you can easily track your health screening results at your own\r\ncovenince and finally have a place to record what you learn at the Health Fairs.</p>\r\n\r\n\r\n'),(4333,262,0.12,'smarty','0','Page created.',1127150910,16,'216.194.127.150','<h1>Welcome to Apple Compete!</h1>\r\n\r\n<img src=\"{$skinFolder}images/icon_products.jpg\" align=\"right\" alt=\"\" class=\"img1\" hspace=\"20\" vspace=\"20\"/><br />\r\n\r\n<p>Apple Compete allows you to participate in Company Sponsored Health Competitions.\r\nIt is also where you can track and submit your \"Go for the Gold\" incentive points,\r\nand your personal results from your Health Screenings.  Take charge of your progress\r\nby signing up with <b>Apple Compete</b>.</p>\r\n\r\n<h2> Competitions</h2>\r\n\r\n<p>Once you are signed up on Apple Compete you can participate in enjoyable competitions\r\nfor prizes.  You will be able to see a real time leaderboard and know exactly how \r\nyou stand against your co-workers.  To keep your identity hidden from your co-workers\r\nyou will choose a username during the sign up process.  Join today and begin enjoying\r\nthe fun and motivation that competitions can bring.</p>\r\n\r\n'),(4339,138,0.65,'smarty','0','starting flashgraph v2 update',1127153555,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{include_php file=\"shared_handle:assignGraphBackNextTimes\"}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n{capture name=\"graphLink\"}\r\n	<a href=\"?pg=flashgraph-frame&format=small&userIds={$smarty.request.userIds}&esId={$smarty.request.esId}&type={$smarty.request.type|niceText|htmlspecialchars}&precision={$smarty.request.precision|default:1}\" target=\"graphwindow\">{$smarty.request.type|niceText|replace:\" \":\"&nbsp;\"}</a>\r\n{/capture}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if $graphTimeBack}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeBack}\"><small>go back more</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave1\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if $graphTimeNext}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeNext}\"><small>go forward more</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4341,138,0.67,'smarty','0','starting flashgraph v2 update',1127154251,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{include_php file=\"shared_handle:assignGraphBackNextTimes\"}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n{capture name=\"graphLink\"}?pg=flashgraph-frame&format=small&userIds={$smarty.request.userIds}&esId={$smarty.request.esId}&type={$smarty.request.type|niceText|htmlspecialchars}&precision={$smarty.request.precision|default:1}{/capture}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if $graphTimeBack}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeBack}\"><small>back ({$graphTimeBack|date_format2:\"M d Y\"})</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave1\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if $graphTimeNext}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeNext}\"><small>forward ({$graphTimeNext|date_format2:\"M d Y\"})</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4359,138,0.71,'smarty','0','flashgraph v2 date range now working.',1127175210,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{include_php file=\"shared_handle:assignGraphBackNextTimes\"}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time &nbsp; <small>(<i>{$graphTimeFrom|date_format2:\"M jS\"} - {$graphTimeUntil|date_format2:\"M jS, Y\"}</i>)</small></h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n{capture name=\"graphLink\"}?pg=flashgraph-frame&format=small&userIds={$smarty.request.userIds}&esId={$smarty.request.esId}&type={$smarty.request.type|niceText|htmlspecialchars}&precision={$smarty.request.precision|default:1}{/capture}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if $graphTimeBack}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeBack}\"><small>back ({$graphTimeBack|date_format2:\"M jS, Y\"})</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if $graphTimeNext}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeNext}\"><small>forward ({$graphTimeNext|date_format2:\"M jS, Y\"})</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4363,138,0.75,'smarty','0','flashgraph v2 date range now working.',1127175766,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{include_php file=\"shared_handle:assignGraphBackNextTimes\"}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<div style=\"position:absolute;top:0px;right:0px;\">\r\n	<small><i>{$graphTimeFrom|date_format2:\"M jS, y\"|replace:\" \":\"&nbsp;\"} - {$graphTimeUntil|date_format2:\"M jS, y\"|replace:\" \":\"&nbsp;\"}</i></small>\r\n</div>\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n{capture name=\"graphLink\"}?pg=flashgraph-frame&format=small&userIds={$smarty.request.userIds}&esId={$smarty.request.esId}&type={$smarty.request.type|niceText|htmlspecialchars}&precision={$smarty.request.precision|default:1}{/capture}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if $graphTimeBack}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeBack}\"><small>back (<i>{$graphTimeBack|date_format2:\"M jS, Y\"}</i>)</small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if $graphTimeNext}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeNext}\"><small>forward (<i>{$graphTimeNext|date_format2:\"M jS, Y\"}</i>)</small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4365,138,0.77,'smarty','0','flashgraph v2 date range now working.',1127176694,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{include_php file=\"shared_handle:assignGraphBackNextTimes\"}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<div style=\"position:absolute;top:0px;right:0px;\">\r\n	<small><i>{$graphTimeFrom|date_format2:\"M jS, y\"|replace:\" \":\"&nbsp;\"} - {$graphTimeUntil|date_format2:\"M jS, y\"|replace:\" \":\"&nbsp;\"}</i></small>\r\n</div>\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if $user->username eq \"chad\" OR $user->username eq \"trave\" AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if $user->username eq \"trave\"}\r\n{capture name=\"graphLink\"}?pg=flashgraph-frame&format=small&userIds={$smarty.request.userIds}&esId={$smarty.request.esId}&type={$smarty.request.type|niceText|htmlspecialchars}&precision={$smarty.request.precision|default:1}{/capture}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if $graphTimeBack}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeBack}\"><small>back <i style=\"font-weight:normal;\">({$graphTimeBack|date_format2:\"M jS, y\"})</i></small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if $graphTimeNext}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeNext}\"><small>forward <i style=\"font-weight:normal;\">({$graphTimeNext|date_format2:\"M jS, y\"})</i></small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(4367,138,0.79,'smarty','0','flashgraph v2 date range now working.',1127178911,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"none\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	{if $styleName neq \"\"}<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skinFolder}styles/{$styleName}.css\" />{/if}\r\n	{assign var=\"vanityStyle\" value=\"`$skinFolder`styles/`$smarty.session.company.companyVanity`.css\"}\r\n	{if $vanityStyle|file_exists}<link rel=\"stylesheet\" href=\"{$vanityStyle}\" type=\"text/css\" />{/if}\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n\r\n{if $smarty.request.compId}\r\n	{assign var=\"compId\" value=\"comp\"|cat:$smarty.request.compId}\r\n{/if}\r\n{include_php file=\"shared_handle:assignGraphBackNextTimes\"}\r\n{assign var=\"type\" value=$smarty.request.type}\r\n{assign var=\"fillPrevious\" value=$smarty.request.fillPrevious|default:\"1\"}\r\n{assign var=\"precision\" value=$smarty.request.precision|default:\"0\"}\r\n{assign var=\"stars\" value=$smarty.request.stars|default:\"\"}\r\n{assign var=\"totalChange\" value=$smarty.request.totalChange|default:\"0\"}\r\n{assign var=\"userIds\" value=$smarty.request.userIds|default:\"\"}\r\n{assign var=\"esId\" value=$smarty.request.esId}\r\n{if $smarty.request.gParams}{include_php file=\"shared_handle:assignGraphParams\"}{/if}\r\n{if $smarty.request.format eq \"small\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_sm.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{elseif $smarty.request.format eq \"wide\"}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher_wide.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{else}\r\n	{assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher.swf?id=\":$compId:\"!\":$type:\"!\":$fillPrevious:\"!\":$precision:\"!\":$stars:\"!\":$totalChange:\"!\":$userIds:\"!\":$esId:\"&session_id=\":$smarty.session.session_id}\r\n{/if}\r\n\r\n{* assign var=\"url\" value=$skinFolder|cat:\"/flash/grapher{if $smarty.request.format eq \"small\"}_sm{elseif $smarty.request.format eq \"wide\"}_wide{/if}.swf?id=comp1!weight!1!0!!1&session_id=\":$smarty.session.session_id\" *}\r\n\r\n<div style=\"position:absolute;top:0px;right:0px;\">\r\n	<small><i>{$graphTimeFrom|date_format2:\"M jS, y\"|replace:\" \":\"&nbsp;\"} - {$graphTimeUntil|date_format2:\"M jS, y\"|replace:\" \":\"&nbsp;\"}</i></small>\r\n</div>\r\n\r\n<h3 class=\"underline\">&nbsp; {if $userIds}Showing{else}Comparing{/if} {if $totalChange}Change in {/if}{$type|niceText} Over Time</h3>\r\n{if true AND ($type OR $smarty.get.esId)}\r\n	{if $smarty.request.format eq \"small\"}\r\n		{swf src=$url width=\"425\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{elseif $smarty.request.format eq \"wide\"}\r\n		{swf src=$url width=\"595\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{else}\r\n		{swf src=$url width=\"555\" height=\"195\" bgcolor=\"#FFFFFF\" wmode=\"transparent\"}\r\n	{/if}\r\n{elseif true OR $user->username eq \"jhyde\"}\r\n	{if $smarty.request.format eq \"small\"}\r\n		<img src=\"{$systemFolder}images/choose_graph_small.gif\" width=\"421\" height=\"187\" />\r\n	{else}\r\n		<img src=\"{$systemFolder}images/choose_graph_wide.gif\" width=\"588\" height=\"180\" />\r\n	{/if}\r\n{else}\r\n<ul>\r\n	<li>The eHealthCompete graphing engine is temporarily unavailable due to upgrades.</li>\r\n</ul>\r\n{/if}\r\n\r\n{if true OR $user->username eq \"trave\"}\r\n{capture name=\"graphLink\"}?pg=flashgraph-frame&format=small&userIds={$smarty.request.userIds}&esId={$smarty.request.esId}&type={$smarty.request.type|niceText|htmlspecialchars}&precision={$smarty.request.precision|default:1}{/capture}\r\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr>\r\n	<td nowrap=\"nowrap\">{if $graphTimeBack}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeBack}\"><small>back <i style=\"font-weight:normal;\">({$graphTimeBack|date_format2:\"M jS, y\"})</i></small></a>{/if}</td>\r\n	<td width=\"100%\" align=\"center\">&nbsp;\r\n	{if $acm->isDomainAdmin() && $user->username neq \"trave\"}\r\n		{$smarty.request.gParams}\r\n		{assign var=\"debugUrl\" value=$url|regex_replace:\"/.*\\?/\":\"?pg=flashgraph&\"}\r\n		<a href=\"{$debugUrl}\" target=\"_blank\">Source</a> | <a href=\"{$debugUrl}&debug=1\" target=\"_blank\">Debugger</a>\r\n	{/if}</td>\r\n	<td nowrap=\"nowrap\">{if $graphTimeNext}<a href=\"{$smarty.capture.graphLink}&graphTime={$graphTimeNext}\"><small>forward <i style=\"font-weight:normal;\">({$graphTimeNext|date_format2:\"M jS, y\"})</i></small></a>{/if}</td>\r\n</tr>\r\n</table>\r\n{/if}\r\n</body></html>'),(5305,233,1.64,'smarty','0','Trying to allow anyone to join teams..',1256021693,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></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 type=\"submit\" class=\"button\" value=\"Submit Changes\">\r\n		</form>\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*}'),(4409,264,0.24,'smarty','0','Page created.',1127423631,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"integration/signup\" from=\"signup\" assign=\"signup\"}\r\n{if $signup.session_id != $smarty.session.session_id}{message type=\"error\" value=\"There has been a problem loading your user data, please return to the original site and log in again. If this problem persists please contact our support department.\" db_log=0 is_critical=0}{store_messages}{redirect href=\"?pg=apple/landing\"}{/if}\r\n{if $smarty.post.signup.alias}{include_php file=\"handle:integration/signup.verifyProfile\"}{/if}\r\n<h1 class=\"underline\">Create My Profile</h1>\r\n\r\n<div>\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n<form name=\"signup\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<table cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td>\r\n\r\n<div class=\"chunk300\" style=\"width:310px;\">\r\n<h2 class=\"withBG\">Personal Profile</h2>\r\n*Choose an Alias:\r\n<input type=\"text\" name=\"signup[alias]\" value=\"\" /><br />\r\n<br />\r\n*Date of Birth:\r\n{get_month name=\"signup[dob][month]\"}\r\n{get_day   name=\"signup[dob][day]\"}\r\n{math assign=\"end_year\" equation=\"x - 18\" x=$smarty.now|date_format2:\"Y\"}  {* Minimum age is 18 years for now *}\r\n{get_year  name=\"signup[dob][year]\" start=\"1915\" end=$end_year}<br />\r\n<br />\r\n*Gender: \r\n<input type=\"radio\" name=\"signup[gender]\" value=\"not specified\" checked style=\"display:none;\"/><input type=\"radio\" name=\"signup[gender]\" value=\"male\" />Male &nbsp; <input type=\"radio\" name=\"signup[gender]\" value=\"female\" />Female &nbsp;<br />\r\n</div>\r\n</td></tr></table>\r\n\r\n<div class=\"hBox\" align=\"right\">\r\n	<br />\r\n	{if $prev.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_back.gif\" class=\"btn_image\" onclick=\"pg.value=\'{$prev.pageName}\';\">&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\">{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n</form>\r\n</div>'),(4410,264,0.25,'smarty','0','Page created.',1127428025,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"integration/signup\" from=\"signup\" assign=\"signup\"}\r\n{if $signup.session_id != $smarty.session.session_id}{message type=\"error\" value=\"There has been a problem loading your user data, please return to the original site and log in again. If this problem persists please contact our support department.\" db_log=0 is_critical=0}{store_messages}{redirect href=\"?pg=apple/landing\"}{/if}\r\n{if $smarty.post.signup.alias}{include_php file=\"handle:integration/signup.verifyProfile\"}{/if}\r\n<h1 class=\"underline\">Create My Profile</h1>\r\n\r\n<div>\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n<form name=\"signup\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<table cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td>\r\n\r\n<div class=\"chunk300\" style=\"width:310px;\">\r\n<h2 class=\"withBG\">Personal Profile</h2>\r\n*Choose an Alias:\r\n<input type=\"text\" name=\"signup[alias]\" value=\"\" /><br />\r\n<br />\r\n*Date of Birth:\r\n{get_month name=\"signup[dob][month]\" options=\"><option value=\'\'>- Month -</option>\"}\r\n{get_day   name=\"signup[dob][day]\" options=\"><option value=\'\'>- Month -</option>\"}\r\n{math assign=\"end_year\" equation=\"x - 18\" x=$smarty.now|date_format2:\"Y\"}  {* Minimum age is 18 years for now *}\r\n{get_year name=\"signup[dob][year]\" start=\"1915\" end=$end_year options=\"><option value=\'\'>- Month -</option>\"}<br />\r\n<br />\r\n*Gender: \r\n<input type=\"radio\" name=\"signup[gender]\" value=\"not specified\" checked style=\"display:none;\"/><input type=\"radio\" name=\"signup[gender]\" value=\"male\" />Male &nbsp; <input type=\"radio\" name=\"signup[gender]\" value=\"female\" />Female &nbsp;<br />\r\n</div>\r\n</td></tr></table>\r\n\r\n<div class=\"hBox\" align=\"right\">\r\n	<br />\r\n	{if $prev.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_back.gif\" class=\"btn_image\" onclick=\"pg.value=\'{$prev.pageName}\';\">&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\">{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n</form>\r\n</div>'),(4411,264,0.26,'smarty','1','Page created.',1127428186,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"integration/signup\" from=\"signup\" assign=\"signup\"}\r\n{if $signup.session_id != $smarty.session.session_id}{message type=\"error\" value=\"There has been a problem loading your user data, please return to the original site and log in again. If this problem persists please contact our support department.\" db_log=0 is_critical=0}{store_messages}{redirect href=\"?pg=apple/landing\"}{/if}\r\n{if $smarty.post.signup.alias}{include_php file=\"handle:integration/signup.verifyProfile\"}{/if}\r\n<h1 class=\"underline\">Create My Profile</h1>\r\n\r\n<div>\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n<form name=\"signup\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<table cellpadding=\"0\" cellspacing=\"0\" align=\"center\"><tr><td>\r\n\r\n<div class=\"chunk300\" style=\"width:310px;\">\r\n<h2 class=\"withBG\">Personal Profile</h2>\r\n*Choose an Alias:\r\n<input type=\"text\" name=\"signup[alias]\" value=\"\" /><br />\r\n<br />\r\n*Date of Birth:\r\n{get_month name=\"signup[dob][month]\" xoptions=\"><option value=\'\'>- Month -</option>\"}\r\n{get_day   name=\"signup[dob][day]\" xoptions=\"><option value=\'\'>- Day -</option>\"}\r\n{math assign=\"end_year\" equation=\"x - 18\" x=$smarty.now|date_format2:\"Y\"}  {* Minimum age is 18 years for now *}\r\n{get_year name=\"signup[dob][year]\" start=\"1915\" end=$end_year xoptions=\"><option value=\'\'>- Year -</option>\"}<br />\r\n<br />\r\n*Gender: \r\n<input type=\"radio\" name=\"signup[gender]\" value=\"not specified\" checked style=\"display:none;\"/><input type=\"radio\" name=\"signup[gender]\" value=\"male\" />Male &nbsp; <input type=\"radio\" name=\"signup[gender]\" value=\"female\" />Female &nbsp;<br />\r\n</div>\r\n</td></tr></table>\r\n\r\n<div class=\"hBox\" align=\"right\">\r\n	<br />\r\n	{if $prev.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_back.gif\" class=\"btn_image\" onclick=\"pg.value=\'{$prev.pageName}\';\">&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\">{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n</form>\r\n</div>'),(4412,263,0.18,'smarty','0','Page created.',1127428577,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"integration/signup\" from=\"signup\" assign=\"signup\"}\r\n{if $signup.session_id != $smarty.session.session_id}{message type=\"error\" value=\"There has been a problem loading your user data, please return to the original site and log in again. If this problem persists please contact our support department.\" db_log=0 is_critical=0}{store_messages}{redirect href=\"?pg=apple/landing\"}{/if}\r\n{if $smarty.post.signup.agree}{include_php file=\"handle:integration/signup.agreeAndLogIn\"}{/if}\r\n\r\n{display var=$signup}\r\n\r\n{select_query assign=\"termsOfUse\" return=\"val\"}\r\n	h.content \r\nFROM _toc t \r\n	INNER JOIN _pages p ON (t.pageId = p.id)\r\n	INNER JOIN _page_history h ON (h.pageId = p.id)\r\n	LEFT JOIN _users u ON (h.userId = u.id)\r\nWHERE\r\n	t.pageName = \'terms\' AND h.isActive = \'1\'\r\nORDER BY h.version DESC\r\n{/select_query}\r\n\r\n{capture name=\"search\"}{literal}/\\{[^\\}]*\\}/{/literal}{/capture}\r\n\r\n{$termsOfUse|regex_replace:$smarty.capture.search:\"\"}\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n<form name=\"signup\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"email\" value=\"{$signup.email}\">\r\n<input type=\"hidden\" name=\"signup[return]\" value=\"{$signup.return}\">\r\n\r\n<div align=\"center\" class=\"quote\">\r\n	I, {$signup.firstName} {$signup.lastName}, agree to these terms:<br />\r\n	<em>\r\n	<input type=\"radio\" name=\"signup[agree]\" value=\"Yes\"> Yes &nbsp; <input type=\"radio\" name=\"signup[agree]\" value=\"No\"> No\r\n	</em>\r\n</div>\r\n<br />\r\n<h2 class=\"withBG\">Sign up for our Newsletter?</h2>\r\n<p>eHealthCompete sends its users useful tips and advice from the health and wellness world, if you would like to add yourself to this group of recipients, select \'Yes\' below.</p>\r\n\r\n<div style=\"text-align:center;\"><input type=\"radio\" name=\"newsletterAction\" value=\"add\" checked=\"checked\"> Yes <input type=\"radio\" name=\"newsletterAction\" value=\"\"> No</div>\r\n\r\n<div class=\"hBox\" align=\"right\">\r\n	<br />\r\n	{if $prev.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_back.gif\" class=\"btn_image\" onclick=\"pg.value=\'{$prev.pageName}\';\">&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\">{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n\r\n</form>'),(4413,263,0.19,'smarty','0','Page created.',1127428996,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"integration/signup\" from=\"signup\" assign=\"signup\"}\r\n{if $signup.session_id != $smarty.session.session_id}{message type=\"error\" value=\"There has been a problem loading your user data, please return to the original site and log in again. If this problem persists please contact our support department.\" db_log=0 is_critical=0}{store_messages}{redirect href=\"?pg=apple/landing\"}{/if}\r\n{if $smarty.post.signup.agree}{include_php file=\"handle:integration/signup.agreeAndLogIn\"}{/if}\r\n\r\n{* display var=$signup *}\r\n\r\n{select_query assign=\"termsOfUse\" return=\"val\"}\r\n	h.content \r\nFROM _toc t \r\n	INNER JOIN _pages p ON (t.pageId = p.id)\r\n	INNER JOIN _page_history h ON (h.pageId = p.id)\r\n	LEFT JOIN _users u ON (h.userId = u.id)\r\nWHERE\r\n	t.pageName = \'terms\' AND h.isActive = \'1\'\r\nORDER BY h.version DESC\r\n{/select_query}\r\n\r\n{capture name=\"search\"}{literal}/\\{[^\\}]*\\}/{/literal}{/capture}\r\n\r\n{$termsOfUse|regex_replace:$smarty.capture.search:\"\"}\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n<form name=\"signup\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"email\" value=\"{$signup.email}\">\r\n<input type=\"hidden\" name=\"signup[return]\" value=\"{$signup.return}\">\r\n\r\n<div align=\"center\" class=\"quote\">\r\n	I, {$signup.firstName} {$signup.lastName}, agree to these terms:<br />\r\n	<em>\r\n	<input type=\"radio\" name=\"signup[agree]\" value=\"Yes\"> Yes &nbsp; <input type=\"radio\" name=\"signup[agree]\" value=\"No\"> No\r\n	</em>\r\n</div>\r\n<br />\r\n<h2 class=\"withBG\">Sign up for our Newsletter?</h2>\r\n<p>eHealthCompete sends its users useful tips and advice from the health and wellness world, if you would like to add yourself to this group of recipients, select \'Yes\' below.</p>\r\n\r\n<div style=\"text-align:center;\"><input type=\"radio\" name=\"newsletterAction\" value=\"add\" checked=\"checked\"> Yes <input type=\"radio\" name=\"newsletterAction\" value=\"\"> No</div>\r\n\r\n<div class=\"hBox\" align=\"right\">\r\n	<br />\r\n	{if $prev.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_back.gif\" class=\"btn_image\" onclick=\"pg.value=\'{$prev.pageName}\';\">&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\">{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n\r\n</form>'),(4414,263,0.20,'smarty','0','Page created.',1127434458,3,'216.194.127.150','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"integration/signup\" from=\"signup\" assign=\"signup\"}\r\n{if $signup.session_id != $smarty.session.session_id}{message type=\"error\" value=\"There has been a problem loading your user data, please return to the original site and log in again. If this problem persists please contact our support department.\" db_log=0 is_critical=0}{store_messages}{redirect href=\"?pg=apple/landing\"}{/if}\r\n{if $smarty.post.signup.agree}{include_php file=\"handle:integration/signup.agreeAndLogIn\"}{/if}\r\n\r\n{* display var=$signup *}\r\n\r\n{select_query assign=\"termsOfUse\" return=\"val\"}\r\n	h.content \r\nFROM _toc t \r\n	INNER JOIN _pages p ON (t.pageId = p.id)\r\n	INNER JOIN _page_history h ON (h.pageId = p.id)\r\n	LEFT JOIN _users u ON (h.userId = u.id)\r\nWHERE\r\n	t.pageName = \'terms\' AND h.isActive = \'1\'\r\nORDER BY h.version DESC\r\n{/select_query}\r\n\r\n{capture name=\"search\"}{literal}/\\{[^\\}]*\\}/{/literal}{/capture}\r\n\r\n{$termsOfUse|regex_replace:$smarty.capture.search:\"\"}\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n<form name=\"signup\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" name=\"email\" value=\"{$signup.email}\">\r\n<input type=\"hidden\" name=\"signup[return]\" value=\"{$signup.return}\">\r\n\r\n<div align=\"center\" class=\"quote\">\r\n	I, {$signup.firstName} {$signup.lastName}, agree to these terms:<br />\r\n	<em>\r\n	<input type=\"radio\" name=\"signup[agree]\" value=\"Yes\"> Yes &nbsp; <input type=\"radio\" name=\"signup[agree]\" value=\"No\"> No\r\n	</em>\r\n</div>\r\n<br />\r\n{* \r\n<h2 class=\"withBG\">Sign up for our Newsletter?</h2>\r\n<p>eHealthCompete sends its users useful tips and advice from the health and wellness world, if you would like to add yourself to this group of recipients, select \'Yes\' below.</p>\r\n\r\n<div style=\"text-align:center;\"><input type=\"radio\" name=\"newsletterAction\" value=\"add\" checked=\"checked\"> Yes <input type=\"radio\" name=\"newsletterAction\" value=\"\"> No</div>\r\n*}\r\n<div class=\"hBox\" align=\"right\">\r\n	<br />\r\n	{if $prev.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_back.gif\" class=\"btn_image\" onclick=\"pg.value=\'{$prev.pageName}\';\">&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\">{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n\r\n</form>'),(4415,175,0.54,'smarty','0','Changed default target to new my_home, also made Sign Up not show up if a company is not currently registered.',1127434914,3,'216.194.127.150','{* TEMPORARY FIX *}\r\n{assign var=\"targetPage\" value=\"my_home\"}\r\n{if $user->isLoggedIn()}\r\n	{store_messages}\r\n	{redirect href=\"index.php?pg=`$targetPage`\"}\r\n{else}\r\n{assign var=\"hideLogin\" value=\"true\"}\r\n<table align=\"center\" width=\"305\" cellpadding=\"0\" cellspacing=\"0\">\r\n<tr><td align=\"center\">\r\n	<h2>{$smarty.session.company.companyName}</h2>\r\n</td></tr>\r\n<tr><td>\r\n	<div align=\"center\" class=\"chunk300\">\r\n		{if $smarty.session.company.preferences.hide_login eq \"yes\"}\r\n			<p>Direct Log-In has been disabled, you must log in from the company site.  If you have any questions please contact our support department.</p>\r\n		{else}\r\n		<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"{$targetPage}\" />\r\n		<input type=\"hidden\" name=\"return\" value=\"{$smarty.request.return|default:$signup.return|default:\"home\"}\" />\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n		<input type=\"hidden\" name=\"forgotPassword\" value=\"\" />\r\n	\r\n		<h2 class=\"withBG\">Log In:</h2>\r\n			Username: <input id=\"usernameBox2\" type=\"text\" name=\"username\" value=\"{$smarty.request.username}\" class=\"textInput\" size=\"12\" /><br />\r\n			Password: <input type=\"password\" name=\"password\" class=\"textInput\" size=\"12\" /><br />\r\n			<div class=\"underline\">&nbsp;</div>\r\n			<a href=\"javascript:document.forms[\'loginForm2\'].submit();\">Submit</a> | <a href=\"javascript:doForgotPassword(\'usernameBox2\', \'loginForm2\');\">Forgot Password?</a>\r\n			<input type=\"submit\" name=\"loginSubmit\" value=\"Submit\" style=\"position:absolute; top:-300px; left:-300px;\" />\r\n		</form>\r\n		<script language=\"javascript\">\r\n			document.forms.loginForm2.username.focus();\r\n		</script>\r\n		{/if}\r\n	</div>\r\n</td></tr>\r\n<tr><td align=\"right\">\r\n	<br />\r\n	{if $smarty.session.company.companyName}\r\n		<small>Not registered yet?</small> <a href=\"?pg=signup/begin\">Sign Up Now!</a> &nbsp;\r\n	{else}\r\n		<!-- Place holder for sign up info content. -->\r\n	{/if}\r\n</td></tr>\r\n</table>\r\n{/if}'),(4427,238,0.17,'smarty','0','Page created.',1127443049,3,'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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	<b>{$report.totalSubmissions|default:0}</b> Taken<br /><br />\r\n\r\n	{foreach name=\"qLoop\" from=$report.questions item=\"q\"}\r\n	<b>{$smarty.foreach.qLoop.iteration}.</b>) {$q.question}\r\n	{/foreach}\r\n{/if}'),(4428,238,0.18,'smarty','0','Page created.',1127443611,3,'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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	<b>{$report.totalTimesTaken|default:0}</b> Times Taken &nbsp; (<i>{$report.uniqueTimesTaken|default:0} unique users</i>)<br /><br />\r\n\r\n	{foreach name=\"qLoop\" from=$report.questions item=\"q\"}\r\n	<b>{$smarty.foreach.qLoop.iteration}.</b>) {$q.question}\r\n	{/foreach}\r\n{/if}'),(4429,238,0.19,'smarty','0','Page created.',1127449316,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\r\n	<ol>\r\n	{foreach name=\"qLoop\" from=$report.questions item=\"q\"}\r\n		<li>{$q.question}\r\n		<table width=\"400\">\r\n		{if $q.A}\r\n		<tr>\r\n			<td valign=\"top\"><b>A.</b></td>\r\n			<td><small>{$q.A}</small></td>\r\n			<td valign=\"bottom\">{$q.sumA|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctA|default:0}%</td>\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><small>{$q.B}</small></td>\r\n			<td valign=\"bottom\">{$q.sumB|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctB|default:0}%</td>\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><small>{$q.C}</small></td>\r\n			<td valign=\"bottom\">{$q.sumC|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctC|default:0}%</td>\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><small>{$q.D}</small></td>\r\n			<td valign=\"bottom\">{$q.sumD|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctD|default:0}%</td>\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><small>{$q.E}</small></td>\r\n			<td valign=\"bottom\">{$q.sumE|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctE|default:0}%</td>\r\n		</tr>\r\n		{/if}\r\n		</table>\r\n	{/foreach}\r\n{/if}'),(4430,238,0.20,'smarty','0','Page created.',1127449402,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\r\n	<ol>\r\n	{foreach name=\"qLoop\" from=$report.questions item=\"q\"}\r\n		<li>{$q.question}\r\n		<table width=\"350\">\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\">{$q.sumA|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctA|default:0}%</td>\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><small>{$q.B}</small></td>\r\n			<td valign=\"bottom\">{$q.sumB|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctB|default:0}%</td>\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><small>{$q.C}</small></td>\r\n			<td valign=\"bottom\">{$q.sumC|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctC|default:0}%</td>\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><small>{$q.D}</small></td>\r\n			<td valign=\"bottom\">{$q.sumD|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctD|default:0}%</td>\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><small>{$q.E}</small></td>\r\n			<td valign=\"bottom\">{$q.sumE|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctE|default:0}%</td>\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n{/if}'),(4431,238,0.21,'smarty','0','Page created.',1127449542,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\r\n	<blockquote style=\"width:350px;\">\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		{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\">{$q.sumA|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctA|default:0}%</td>\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><small>{$q.B}</small></td>\r\n			<td valign=\"bottom\">{$q.sumB|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctB|default:0}%</td>\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><small>{$q.C}</small></td>\r\n			<td valign=\"bottom\">{$q.sumC|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctC|default:0}%</td>\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><small>{$q.D}</small></td>\r\n			<td valign=\"bottom\">{$q.sumD|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctD|default:0}%</td>\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><small>{$q.E}</small></td>\r\n			<td valign=\"bottom\">{$q.sumE|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctE|default:0}%</td>\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</blockquote>\r\n{/if}'),(4432,238,0.22,'smarty','0','Page created.',1127449633,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\r\n	<table width=\"350\" style=\"border:#CCC 2px solid;\" cellpadding=\"5\"><tr><td>\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		{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\">{$q.sumA|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctA|default:0}%</td>\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><small>{$q.B}</small></td>\r\n			<td valign=\"bottom\">{$q.sumB|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctB|default:0}%</td>\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><small>{$q.C}</small></td>\r\n			<td valign=\"bottom\">{$q.sumC|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctC|default:0}%</td>\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><small>{$q.D}</small></td>\r\n			<td valign=\"bottom\">{$q.sumD|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctD|default:0}%</td>\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><small>{$q.E}</small></td>\r\n			<td valign=\"bottom\">{$q.sumE|default:0}</td>\r\n			<td valign=\"bottom\">{$q.pctE|default:0}%</td>\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4433,238,0.23,'smarty','0','Page created.',1127449800,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\r\n	<table width=\"350\" style=\"border:#CCC 2px solid;\" cellpadding=\"5\"><tr><td>\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		{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		</tr>\r\n		{/if}\r\n		{if $q.B}\r\n		<tr>\r\n			<td valign=\"top\"><b>B.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4434,238,0.24,'smarty','0','Page created.',1127449899,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\r\n	<table width=\"350\" 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		{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		</tr>\r\n		{/if}\r\n		{if $q.B}\r\n		<tr>\r\n			<td valign=\"top\"><b>B.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4435,238,0.25,'smarty','0','Page created.',1127450692,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\r\n	<table width=\"350\" 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		{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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctB|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctC|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctD|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctE|ceil}\" height=\"10\" alt=\"\" /></td>\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4436,238,0.26,'smarty','0','Page created.',1127450746,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctB|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctC|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctD|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctE|ceil}\" height=\"10\" alt=\"\" /></td>\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4437,238,0.27,'smarty','0','Page created.',1127450840,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\" width=\"110\"><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\" width=\"110\"><img src=\"img/graphBar.gif\" width=\"{$q.pctB|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\" width=\"110\"><img src=\"img/graphBar.gif\" width=\"{$q.pctC|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\" width=\"110\"><img src=\"img/graphBar.gif\" width=\"{$q.pctD|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\" width=\"110\"><img src=\"img/graphBar.gif\" width=\"{$q.pctE|ceil}\" height=\"10\" alt=\"\" /></td>\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4438,238,0.28,'smarty','0','Page created.',1127450909,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctB|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctC|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctD|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctE|ceil}\" height=\"10\" alt=\"\" /></td>\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4439,238,0.29,'smarty','0','Page created.',1127450929,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" /><br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctB|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctC|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctD|ceil}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctE|ceil}\" height=\"10\" alt=\"\" /></td>\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4440,238,0.30,'smarty','0','Page created.',1127451176,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" /><br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|floor}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctB|floor}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctC|floor}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctD|floor}\" height=\"10\" alt=\"\" /></td>\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><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\"><img src=\"img/graphBar.gif\" width=\"{$q.pctE|floor}\" height=\"10\" alt=\"\" /></td>\r\n		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4441,238,0.31,'smarty','0','Page created.',1127451298,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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=\"center\" style=\"clear:left;\"><input type=\"submit\" value=\"Load Report\" /></div>	\r\n	</form>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" />{if $q.sumA > 0}<br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\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><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4442,238,0.32,'smarty','0','Page created.',1127452460,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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 colspan=\"4\" align=\"center\"><input type=\"checkbox\" name=\"compareDates\" value=\"1\" onchange=\"toggleCompareDates(this);\"> Compare to?</td>\r\n	</tr>\r\n	<tr>\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE2|date_format2:\"m/d/Y\"}\" disabled=\"disabled\" />\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE2|date_format2:\"m/d/Y\"}\" disabled=\"disabled\" />\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			if (cb.checked) {\r\n				alert (\'!\');\r\n			} else {\r\n				alert (\'?\');\r\n			}\r\n		}\r\n	{/literal}</script>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" />{if $q.sumA > 0}<br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\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><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4443,238,0.33,'smarty','0','Page created.',1127452626,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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>&nbsp;</td>\r\n		<td colspan=\"3\" align=\"center\"><input type=\"checkbox\" name=\"compareDates\" value=\"1\" onchange=\"toggleCompareDates(this);\"> Compare to?</td>\r\n	</tr>\r\n	<tr id=\"compareDatesRow\" style=\"display:none;\">\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE2|date_format2:\"m/d/Y\"}\" />\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE2|date_format2:\"m/d/Y\"}\" />\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			if (cb.checked) {\r\n				document.getElementById(\'compareDatesRow\').style.display = \'none\';\r\n			} else {\r\n				document.getElementById(\'compareDatesRow\').style.display = \'block\';\r\n			}\r\n		}\r\n	{/literal}</script>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" />{if $q.sumA > 0}<br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\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><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4444,238,0.34,'smarty','0','Page created.',1127452740,3,'24.2.76.126','{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=\"post\" 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\"}\" />\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>&nbsp;</td>\r\n		<td colspan=\"3\"><input type=\"checkbox\" name=\"compareDates\" value=\"1\" onchange=\"toggleCompareDates(this);\"> Compare to another date range?</td>\r\n	</tr>\r\n	<tr id=\"compareDatesRow\" style=\"display:none;\">\r\n		<td>Start Date:</td>\r\n		<td><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE2|date_format2:\"m/d/Y\"}\" />\r\n		<td>End Date:</td>\r\n		<td><input type=\"text\" name=\"end\" size=\"10\" value=\"{$END_DATE2|date_format2:\"m/d/Y\"}\" />\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			if (cb.checked) {\r\n				document.getElementById(\'compareDatesRow\').style.display = \'none\';\r\n				alert (\'none\');\r\n			} else {\r\n				document.getElementById(\'compareDatesRow\').style.display = \'block\';\r\n				alert (\'block\');\r\n			}\r\n		}\r\n	{/literal}</script>\r\n</div>\r\n</div>\r\n\r\n{if $report.surveyName}\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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" />{if $q.sumA > 0}<br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\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><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4445,238,0.35,'smarty','0','Page created.',1127453304,3,'24.2.76.126','{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=\"post\" 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\" onchange=\"toggleCompareDates(this);\"> Compare to another date range?</td>\r\n	</tr>\r\n	<tr>\r\n		<td><span id=\"compareDatesCell_1\">Start Date:</span></td>\r\n		<td><span id=\"compareDatesCell_2\"><input type=\"text\" name=\"begin\" size=\"10\" value=\"{$START_DATE2|date_format2:\"m/d/Y\"}\" /></span></td>\r\n		<td><span id=\"compareDatesCell_3\">End Date:</span></td>\r\n		<td><span id=\"compareDatesCell_4\"><input type=\"text\" name=\"end\" 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	<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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" />{if $q.sumA > 0}<br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\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><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4446,238,0.36,'smarty','0','Page created.',1127453438,3,'24.2.76.126','{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=\"post\" 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\" onchange=\"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=\"begin\" 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=\"end\" 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	<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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" />{if $q.sumA > 0}<br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\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><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4447,238,0.37,'smarty','0','Page created.',1127453528,3,'24.2.76.126','{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=\"post\" 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\" onchange=\"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	<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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" />{if $q.sumA > 0}<br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\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><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4448,238,0.38,'smarty','0','Page created.',1127453825,3,'24.2.76.126','{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=\"post\" 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 = \'none\';\r\n			} else {\r\n				toState = \'block\';\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	<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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" />{if $q.sumA > 0}<br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\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><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4449,238,0.39,'smarty','0','Page created.',1127453858,3,'24.2.76.126','{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=\"post\" 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	<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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		{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\"><img src=\"blank.gif\" width=\"110\" height=\"1\" alt=\"\" />{if $q.sumA > 0}<br /><img src=\"img/graphBar.gif\" width=\"{$q.pctA|ceil}\" height=\"10\" alt=\"\" />{/if}</td>\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><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4450,238,0.40,'smarty','0','Page created.',1127453968,3,'24.2.76.126','{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=\"post\" 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	<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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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		</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		</tr>\r\n		{/if}\r\n		{if $q.B}\r\n		<tr>\r\n			<td valign=\"top\"><b>B.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.C}\r\n		<tr>\r\n			<td valign=\"top\"><b>C.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.D}\r\n		<tr>\r\n			<td valign=\"top\"><b>D.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		{if $q.E}\r\n		<tr>\r\n			<td valign=\"top\"><b>E.</b></td>\r\n			<td><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		</tr>\r\n		{/if}\r\n		</table><br /><br /></li>\r\n	{/foreach}\r\n	</td></tr></table>\r\n{/if}'),(4451,238,0.41,'smarty','0','Page created.',1127455473,3,'24.2.76.126','{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=\"post\" 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	<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	<h2>{$report.surveyName}</h2>\r\n\r\n	Taken <b>{$report.totalTimesTaken|default:0}</b> Times by <b>{$report.uniqueTimesTaken|default:0}</b> unique users<br /><br />\r\n\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><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><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><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><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}'),(4452,238,0.42,'smarty','0','Page created.',1127455694,3,'24.2.76.126','{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=\"post\" 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	- and -<br /><br />\r\n	<i>Comparing against 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	<hr />\r\n\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><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><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><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><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}'),(4453,238,0.43,'smarty','0','Page created.',1127455722,3,'24.2.76.126','{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=\"post\" 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	- and -<br /><br />\r\n	<i>Comparing against 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}\r\n	<hr />\r\n\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><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><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><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><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}'),(4454,238,0.44,'smarty','0','Page created.',1127455749,3,'24.2.76.126','{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=\"post\" 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_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}\r\n	<hr />\r\n\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><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><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><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><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}'),(4455,238,0.45,'smarty','0','Page created.',1127455807,3,'24.2.76.126','{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=\"post\" 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><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><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><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><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}'),(4456,238,0.46,'smarty','0','Page created.',1127456187,3,'24.2.76.126','{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=\"post\" 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}'),(4823,196,1.51,'smarty','0','Finally added table for adjustments',1139606102,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{***{include_php file=\"shared_handle:company/wellnessConnectionList\"}***}\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}<a href=\"?wellnessConnection\">Click Here</a>{else}</h3></td>\r\n		{/if}\r\n	    <td valign=\"middle\"></td></tr>\r\n\r\n{**** Wellness Connection Special Surveys \r\n\r\n<tr>\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	</tr>\r\n\r\n\r\n\r\n\r\nEnd Wellness Connection Speacial Surveys *******}\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 Survey Taking 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>'),(4464,129,0.32,'smarty','0','updated link for \"continue shopping\"',1128896862,2,'24.2.76.126','{assign var=\"hideWidgets\" value=\"\"}\r\n{include_php file=\"shared_handle:cart\"}\r\n\r\n<h1 class=\"underline\">My Shopping Cart</h1>\r\n<p>Below is a list of your selected shopping cart products, you can update the quantities for each item, or continue on to the check out page.</p>\r\n<form name=\"cartUpdate\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<table width=\"525\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\r\n<tr>\r\n	<td class=\"underline2\"><b>Product</b></td>\r\n	<td class=\"underline2\" align=\"right\"><b>Price</b></td>\r\n	<td class=\"underline2\" align=\"right\"><b>Quantity</b></td>\r\n	<td class=\"underline2\" align=\"right\"><b>Subtotal</b></td>\r\n</tr>\r\n{foreach from=$cart.items key=\"productCode\" item=\"lineItem\" name=\"items\"}\r\n	{if $smarty.foreach.items.iteration eq $cart.items|@count}{assign var=\"underline\" value=\" class=\\\"underline2\\\"\"}{/if}\r\n<tr>\r\n	<td{$underline} nowrap=\"nowrap\">{$lineItem.title}</td>\r\n	<td{$underline} align=\"right\">${$lineItem.each|number_format:\"2\"}</td>\r\n	<td{$underline} align=\"right\"><input type=\"text\" name=\"qty[{$productCode}]\" size=\"2\" value=\"{$lineItem.quantity}\" /></td>\r\n	<td{$underline} align=\"right\">${$lineItem.subtotal|number_format:\"2\"}</td>\r\n</tr>\r\n{foreachelse}\r\n<tr>\r\n	<td colspan=\"4\" align=\"center\" class=\"underline2\">You have no items in your shopping cart.</td>\r\n</tr>\r\n{/foreach}\r\n<tr>\r\n	<td colspan=\"3\" align=\"left\"><b>Product(s) total:</b></td>\r\n	<td align=\"right\"><b>${$cart.total|number_format:\"2\"}</b></td>\r\n</tr>\r\n</table>\r\n\r\n<br />\r\n<div class=\"hBox\" style=\"text-align:right;\">\r\n	<a href=\"?pg=my_store\" class=\"button\">Continue Shopping</a>\r\n	{if $cart.items|@count gt 0}\r\n	<a href=\"javascript://\" onclick=\"document.cartUpdate.submit(); return false;\" class=\"button\">Update Quantities</a>\r\n	<a href=\"?pg=cart/checkout\" class=\"button\">Check Out Now</a>\r\n	{/if}\r\n</div>\r\n</form>'),(4465,129,0.33,'smarty','1','updated link for',1128896916,2,'24.2.76.126','{assign var=\"hideWidgets\" value=\"\"}\r\n{include_php file=\"shared_handle:cart\"}\r\n\r\n<h1 class=\"underline\">My Shopping Cart</h1>\r\n<p>Below is a list of your selected shopping cart products, you can update the quantities for each item, or continue on to the check out page.</p>\r\n<form name=\"cartUpdate\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<table width=\"525\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\r\n<tr>\r\n	<td class=\"underline2\"><b>Product</b></td>\r\n	<td class=\"underline2\" align=\"right\"><b>Price</b></td>\r\n	<td class=\"underline2\" align=\"right\"><b>Quantity</b></td>\r\n	<td class=\"underline2\" align=\"right\"><b>Subtotal</b></td>\r\n</tr>\r\n{foreach from=$cart.items key=\"productCode\" item=\"lineItem\" name=\"items\"}\r\n	{if $smarty.foreach.items.iteration eq $cart.items|@count}{assign var=\"underline\" value=\" class=\\\"underline2\\\"\"}{/if}\r\n<tr>\r\n	<td{$underline} nowrap=\"nowrap\">{$lineItem.title}</td>\r\n	<td{$underline} align=\"right\">${$lineItem.each|number_format:\"2\"}</td>\r\n	<td{$underline} align=\"right\"><input type=\"text\" name=\"qty[{$productCode}]\" size=\"2\" value=\"{$lineItem.quantity}\" /></td>\r\n	<td{$underline} align=\"right\">${$lineItem.subtotal|number_format:\"2\"}</td>\r\n</tr>\r\n{foreachelse}\r\n<tr>\r\n	<td colspan=\"4\" align=\"center\" class=\"underline2\">You have no items in your shopping cart.</td>\r\n</tr>\r\n{/foreach}\r\n<tr>\r\n	<td colspan=\"3\" align=\"left\"><b>Product(s) total:</b></td>\r\n	<td align=\"right\"><b>${$cart.total|number_format:\"2\"}</b></td>\r\n</tr>\r\n</table>\r\n\r\n<br />\r\n<div class=\"hBox\" style=\"text-align:right;\">\r\n	<a href=\"?pg=my_shop\" class=\"button\">Continue Shopping</a>\r\n	{if $cart.items|@count gt 0}\r\n	<a href=\"javascript://\" onclick=\"document.cartUpdate.submit(); return false;\" class=\"button\">Update Quantities</a>\r\n	<a href=\"?pg=cart/checkout\" class=\"button\">Check Out Now</a>\r\n	{/if}\r\n</div>\r\n</form>'),(5319,233,1.66,'smarty','0','Trying to get team captains showing.',1256619492,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 $competition.team_captains.$teamName eq $user->id OR $user->id|@in_array:$competition.teams.$teamName}CAPTAIN{/if}{if $isManager or $userId eq $user->id}<input type=\"checkbox\" name=\"changeTeam[players][{$competition.users.$userId}]\" />{/if}{$competition.users.$userId}</small></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 type=\"submit\" class=\"button\" value=\"Submit Changes\">\r\n		</form>\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*}'),(4565,178,0.97,'smarty','0','q',1130484815,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    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>'),(4567,178,0.99,'smarty','0','q',1130484922,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 [{$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>'),(4569,178,1.01,'smarty','0','q',1130485458,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  }\r\n\r\n  xClose(\'survey-save-alert\');\r\n  xClose(\'question-save-alert\');\r\n\r\n{/literal}</script>'),(4571,178,1.03,'smarty','0','q',1130485655,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>'),(4515,173,0.40,'smarty','0','added $skinFolder path, and fixed filename.',1130182782,16,'216.194.127.150','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/americanExpress.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/westechlogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/1800_Logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/byu.jpg\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/Edwards_global_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/myfamilylogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/pharmanexlogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/usana.gif\" vspace=\"10\">\r\n\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\">\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 steps-a-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex.<br />\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(4516,173,0.41,'smarty','0','added $skinFolder path, and fixed filename.',1130183033,16,'216.194.127.150','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/americanExpress.gif\" vspace=\"10\"></img>\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/westechlogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/1800_Logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/byu.jpg\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/Edwards_global_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/myfamilylogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/pharmanexlogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/usana.gif\" vspace=\"10\">\r\n\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\">\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 steps-a-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex.<br />\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(4517,173,0.42,'smarty','0','added $skinFolder path, and fixed filename.',1130183060,16,'216.194.127.150','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/americanExpress.gif\" vspace=\"10\"></img>\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/westechlogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/1800_Logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/byu.jpg\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/Edwards_global_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/myfamilylogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/pharmanexlogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}systems/v2_ehc/images/ehc/logos/usana.gif\" vspace=\"10\">\r\n\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\">\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 steps-a-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex.<br />\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(4518,173,0.43,'smarty','0','added $skinFolder path, and fixed filename.',1130183109,16,'216.194.127.150','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/americanExpress.gif\" vspace=\"10\"></img>\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/westechlogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/1800_Logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/byu.jpg\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/Edwards_global_logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/myfamilylogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/pharmanexlogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/usana.gif\" vspace=\"10\">\r\n\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\">\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 steps-a-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex.<br />\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(4519,173,0.44,'smarty','0','added $skinFolder path, and fixed filename.',1130183452,16,'216.194.127.150','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/americanExpress.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/westech_logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/1800_Logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/byu.jpg\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/Edwards_global_logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/myfamilylogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/pharmanexlogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/usana.gif\" vspace=\"10\">\r\n\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\">\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 steps-a-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex.<br />\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(4520,173,0.45,'smarty','0','added $skinFolder path, and fixed filename.',1130183709,16,'216.194.127.150','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/americanExpress.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/westech_logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/1800_Logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/byu_small.jpg\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/Edwards_global_logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/myfamilylogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/pharmanexlogo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"/systems/v2_ehc/images/ehc/logos/usana.gif\" vspace=\"10\">\r\n\r\n\r\n<p>What eHealthCompete is doing with some of our valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\" vspace=\"10\">\r\n<p>MyFamily.com has chosen\r\neHealthCompete to be their\r\nfirst wellness offering to their\r\nemployees. Over a 12 month\r\nperiod, beginning in January\r\n2005, MyFamily.com will implement\r\n4 custom wellness campaigns created\r\nby eHealthCompete – including a\r\nteam weight loss campaign, 10,000 steps-a-\r\nday walking campaign, and a 5-a-day\r\nnutrition campaign.</p>\r\n\r\n<p>MyFamily.com is offering not only campaigns\r\nbut an enticing incentive program\r\nthrough eHealthCompete. Every employee\r\nis eligible for a year end cash bonus\r\nif they are 90% active in the incentive\r\nprogram over the course of the year. Survey\r\nresults have shown steady increases in\r\nhealthy behavior since the incentive program\r\nbegan.</p>\r\n\r\n<p>Participation rates in their wellness program\r\nstarted with an remarkable 45% of\r\ntheir corporate employees. Over the last 5\r\nmonths participation has climbed to 69%\r\nof all corporate employees.</p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/nuskinLogo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/bigPlanet_logo.gif\" vspace=\"10\">\r\n<img src=\"{$skinFolder}images/pharmanexlogo.gif\" vspace=\"10\">\r\n<p>NU SKIN ENTERPRISES and their subsidiaries\r\nBig Planet and Pharmenex.<br />\r\nTo help stop the growth of waist lines over\r\nthe holidays, Nu Skin Enterprises contracted\r\nwith eHealthCompete to create a\r\n“Holiday Weight Loss Challenge.”\r\nThrough this individual campaign Nu\r\nSkin, Big Planet and Pharmenex employees\r\nreceived weekly newsletters for the\r\neHealtCompete staff regarding weight\r\nloss/maintenance and tips on how to compete\r\nsuccessfully.</p>\r\n\r\n<p>At the end of the challenge\r\nthe top 10 winners had an average\r\nweight loss of 8.4% of their body weight\r\nwith the top 3 employees losing 13.46%,\r\n13.41% and 12.34% respectively. In addition\r\nthere were 31,000 minutes exercised\r\nduring the 82 days of competition and over\r\n500 miles covered by the group.</p>\r\n\r\n<p>Nu Skin Enterprises as followed up their\r\nholiday challenge by creating four campaigns\r\nin 2005 including “Shape up for\r\nSummer” team and individual\r\nchallenges in exercise minutes\r\nand % of body weight lost.\r\nParticipation rates in these\r\ncampaigns have seen an 82%\r\nincrease in a 4 month period.</p>\r\n\r\n<p><i>“I loved being able to easily track my\r\nprogress in weight loss and in exercise.\r\nIt was fun to see my name move up on\r\nthe leader’s board. I could hardly wait\r\nfor each Monday to come so I could\r\nrecord my new lower weight. I was able\r\nto continue with my goals using my\r\npersonal page after the competition and\r\nwith the jump start the competition gave\r\nme, I have lost 51 pounds.”\r\n-Janice Walker, Nu Skin Enterprises</i></p>\r\n<p></p>\r\n\r\n\r\n<img src=\"{$skinFolder}images/GoldsGym_Logo.jpg\" height=\"100\" width=\"100\" vspace=\"10\">\r\n<div>Golds Gym of Utah<p>\r\nGolds Gym of Utah has partnered with eHealthCompete in order to offer an entire wellness program to their corporate clients.  Through the services of eHealthCompete and the state-of-the-art facilities of Golds Gym, the ultimate team of wellness has been formed.\r\n</p>\r\n<img src=\"{$skinFolder}images/appleprogram_logo.jpg\" vspace=\"10\">\r\n<p>The Apple Program is a unique disease management firm that offers personal health coaches and a web-based goal creation and tracking program for their clients.  Through their partnership with eHealthCompete the Apple Program has private labeled the wellness services of eHealthCompete.  Now they can provide a full service disease management and wellness program but still focus their resources on their core competency: disease management, while eHealthCompete spends its resources on their core competency: wellness.</p>\r\n\r\n'),(4573,178,1.05,'smarty','0','q',1130486343,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;\" {/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>'),(4575,232,0.24,'smarty','1','Page created.',1130536965,16,'216.194.127.150','{if $smarty.session.company.preferences.hide_resources eq \"yes\"}{include file=\"file:layouts/hiddenPageRedirector.tpl\"}{/if}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n\r\n<h1> Resources </h1>\r\n\r\n<div>\r\n\r\nBelow are trusted medical resources to help you learn about typical medical questions.  You can use these resources to help you be prepared for your doctor visits, or to learn more about symptoms and diagnosises.\r\n\r\n</div>\r\n\r\n<blockquote>\r\n<ul>\r\n	<li><a href=\"http://my.webmd.com/webmd_today/home/default\" target=_blank>WebMD</a><br /></li>\r\n	<li><a href=\"http://www.healthatoz.com/healthatoz/Atoz/default.jsp\" target=_blank>Health A to Z</a><br /></li>\r\n	<li><a href=\"http://www.ahrq.gov\" target=_blank>Agency for Health Care Research and Quality</a><br /></li>\r\n	<li><a href=\"http://www.eatright.org\" target=_blank>Eat Right</a><br /></li>\r\n	<li><a href=\"http://www.health.nih.gov\" target=_blank>National Institute of Health</a><br /></li>\r\n	<li><a href=\"http://www.5aday.gov\" target=_blank>5 to 9 a day!</a><br /></li>\r\n</ul>\r\n</blockquote>'),(5325,233,1.72,'smarty','0','Trying to get team captains showing.',1256620309,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 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*}'),(4525,178,0.57,'smarty','0','u',1130291260,3,'67.172.226.76','{* redirect href=\"?pg=management/tools&sub=manage_surveys\" *}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{* include_php file=\"shared_handle:company/survey_wizard\" *}\r\n\r\n<h1>Survey Wizard</h1>\r\n\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\">- SELECT SURVEY TO UPDATE -</option> \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  <img id=\"survey-icon\" class=\"sIco icoJumper\" src=\"blank.gif\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" /><br />\r\n  <small><a href=\"javascript:xOpen(\'icon-change-div\');\">change</a></small>\r\n  </td><td valign=\"top\">\r\n<div id=\"icon-change-div\" style=\"display:none;\">\r\n  <h3>Select an Icon</h3>\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  <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>'),(4526,178,0.58,'smarty','0','getting closer.',1130291330,3,'67.172.226.76','{* redirect href=\"?pg=management/tools&sub=manage_surveys\" *}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n{* include_php file=\"shared_handle:company/survey_wizard\" *}\r\n\r\n<h1>Survey Wizard</h1>\r\n\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\">- SELECT SURVEY TO UPDATE -</option> \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>'),(4527,178,0.59,'smarty','0','getting closer.',1130291461,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\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\">- SELECT SURVEY TO UPDATE -</option> \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>'),(4528,178,0.60,'smarty','0','getting closer.',1130291488,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</i></p>\r\n\r\n<select name=\"survey[id]\" onchange=\"\">\r\n  <option value=\"\">- SELECT SURVEY TO UPDATE -</option> \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>'),