(2949,105,1.07,'php','0','fixed some spelling',1104857588,16,'128.187.0.164','<?php\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  chaeck back often for enhanced goal managment features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to selelct the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"	\r\n		\r\n)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don’t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n?>\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n');
INSERT INTO `_page_history` VALUES (2950,105,1.08,'php','0','fixed some spelling again',1104857669,16,'128.187.0.164','<?php\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to selelct the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"	\r\n		\r\n)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don’t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n?>\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(2951,105,1.09,'php','0','fixed some spelling again and again',1104857737,16,'128.187.0.164','<?php\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to select the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"	\r\n		\r\n)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don’t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n?>\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(2952,184,0.37,'smarty','0','fixed reposting of selected values.',1105044198,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n{include_php file=\"shared_handle:company/survey\"}\r\n\r\n<h2 class=\"withBG\">{$survey.surveyName|default:\"Unnamed Survey\"}</h2>\r\n<div style=\"margin-left:20px;\"><small>\r\n	May be taken: <i>{$survey.frequency}</i><br />\r\n	Logged in as: <i>{$user->firstName} {$user->lastName} ({$user->username})</i><br />	\r\n</small></div>\r\n\r\n<form name=\"surveyForm\" action=\"index.php\" method=\"post\">\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=\"id\" value=\"{$smarty.request.id}\" />\r\n\r\n<ol id=\"surveyQuestionList\">\r\n	{foreach name=\"questions\" from=$survey.questions item=\"question\"}\r\n	<li>{$question.question}{assign var=\"qid\" value=$question.id}\r\n	<dl>{assign var=\"i\" value=$smarty.foreach.questions.iteration}\r\n		{if $question.A != \"\"}<dt><input id=\"q{$i}A\" type=\"radio\" name=\"q[{$qid}]\" value=\"A\" {if $smarty.post.q.$qid eq \"A\"}checked=\"checked\" {/if}/> <a href=\"javascript://\" onclick=\"document.getElementById(\'q{$i}A\').checked = true;\">{$question.A}</a></dt>{/if}\r\n		{if $question.B != \"\"}<dt><input id=\"q{$i}B\" type=\"radio\" name=\"q[{$qid}]\" value=\"B\" {if $smarty.post.q.$qid eq \"B\"}checked=\"checked\" {/if}/> <a href=\"javascript://\" onclick=\"document.getElementById(\'q{$i}B\').checked = true;\">{$question.B}</a></dt>{/if}\r\n		{if $question.C != \"\"}<dt><input id=\"q{$i}C\" type=\"radio\" name=\"q[{$qid}]\" value=\"C\" {if $smarty.post.q.$qid eq \"C\"}checked=\"checked\" {/if}/> <a href=\"javascript://\" onclick=\"document.getElementById(\'q{$i}C\').checked = true;\">{$question.C}</a></dt>{/if}\r\n		{if $question.D != \"\"}<dt><input id=\"q{$i}D\" type=\"radio\" name=\"q[{$qid}]\" value=\"D\" {if $smarty.post.q.$qid eq \"D\"}checked=\"checked\" {/if}/> <a href=\"javascript://\" onclick=\"document.getElementById(\'q{$i}D\').checked = true;\">{$question.D}</a></dt>{/if}\r\n		{if $question.E != \"\"}<dt><input id=\"q{$i}E\" type=\"radio\" name=\"q[{$qid}]\" value=\"E\" {if $smarty.post.q.$qid eq \"E\"}checked=\"checked\" {/if}/> <a href=\"javascript://\" onclick=\"document.getElementById(\'q{$i}E\').checked = true;\">{$question.E}</a></dt>{/if}\r\n	</dl></li>\r\n	{/foreach}\r\n</ol>\r\n\r\n<div class=\"underline\"></div>\r\n<div style=\"text-align:center;margin-top:10px;\">{if $survey.dateAvailable eq \"now\"}<input type=\"submit\" name=\"surveyAction\" value=\"Submit Responses\" />{else}<input type=\"button\" onclick=\"location.replace(\'index.php?pg=surveyHistory\');\" value=\"{if $survey.frequency eq \"Once\"}No Longer Available (One time survey){else}Not available until {$survey.dateAvailable|date_format2:\"m/d/y\"}{/if}\" />{/if}</div>\r\n</form>\r\n'),(2953,98,1.86,'smarty','0','Made participation points area not show up if the company isn\'t using it.',1105044426,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"layouts/myhome_layout2.tpl\"}\r\n{include_php file=\"shared_handle:acceptRejectRequests\"} \r\n{include_php file=\"shared_handle:myHome\"}\r\n\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"hideWLWLinks\" value=\"true\"}\r\n{assign var=\"hideWidgets\" value=\"true\"}\r\n\r\n{* getProfile is included by getStats *}\r\n{* include_php file=\"shared_handle:getStats\" *}\r\n\r\n{* Now getting only Profile because getStats does TONS of unneccesary processing *}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n\r\n{if $smarty.request.debug}\r\n	{display var=$competitions}\r\n{/if}\r\n\r\n<h1 class=\"underline\">My Home - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n<br />\r\n\r\n{$user->firstName}, this is your personal Wellness &quot;Home&quot;.\r\nFrom this page you can manage the competitions you are in, and update your wellness profile. \r\nClick on the \'Update Profile\' button to change your Motto, and other information about yourself, or \'Account Settings\' to change your password.<br />\r\n<br />\r\n<script language=\"javascript\">{literal}\r\nfunction goNewGraph() {\r\n	var obj = document.getElementById(\'graphDropdown\');\r\n	var url;\r\n\r\n	for (var x = 0; x < obj.options.length; x++) {\r\n		if (obj.options[x].selected)\r\n			url = obj.options[x].value;\r\n	}\r\n\r\n	graphwindow.location.replace(url);\r\n\r\n	obj.selectedIndex = 0;\r\n}{/literal}\r\n</script>\r\n\r\n<table border=\"0\">\r\n<tr>\r\n	<td 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}</span><br />\r\n			<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight}</span><br />\r\n			<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet}\'{$userProfile.heightInches}&quot;</span><br />\r\n			<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI}</span><br />\r\n			<span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight}</span><br />\r\n		<br />\r\n                {* <form name=\"notUsed\" style=\"margin:0px;\">\r\n		<select id=\"graphDropdown\" onchange=\"goNewGraph();\">\r\n			<option value=\"\">(Change Graph)</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&totalChange=1\">Change in Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0\" target=\"graphwindow\">Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</option>\r\n		</select>\r\n		</form> *}\r\n		<h2 class=\"withBG\">Links</h2>\r\n		<small>\r\n		&nbsp;&middot; <a href=\"?pg=tips\">Weight Loss Tips</a><br /> \r\n		&nbsp;&middot; <a href=\"?pg=calculators\">Calculators</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=recipes\">Recipes</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=nutrition\">Nutrition Data</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=ptinfo\">Customized Fitness Plan</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=dietitianinfo\">Personal Nutrition Coach</a><br />\r\n		</small>\r\n                </div>\r\n               	</td>\r\n	<td align=\"center\">\r\n		<div style=\"margin:0px 10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&type=weight&fillPrevious=1&precision=0&totalChange=0&userIds={$userProfile.id}\" frameborder=\"0\" width=\"425\" height=\"230\" scrollbars=\"no\"></iframe></div>\r\n		<small>\r\n			<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&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=0\" 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</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</td>\r\n	<td valign=\"top\" width=\"100%\" style=\"padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<h2><i>\"{$userProfile.personalSaying|default:\"Your personal motto goes here.\"|replace:\'\"\':\'\'}\"</i></h2>\r\n		</td>\r\n</tr>\r\n</table>\r\n<br />\r\n{if $smarty.request.hideComps neq \"1\"}\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n{* ********************************* COMPETITIONS I AM IN ********************************** *}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'inComps\', \'\', \'showHide\');\"><img id=\"inComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Am In</h2>\r\nHere are the competitions you have signed up to participate in. If you have an ID of a competition you would like to join, enter it below.<br />\r\n<div id=\"inComps\" style=\"display:block;\">	\r\n	<div style=\"margin:10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\"><span>&nbsp;<b>ID</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Title</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Type</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Style</b></span></td>\r\n		{* <td class=\"underline2\"><span>&nbsp;<b>Rank</b></span></td> *}\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Time Remaining</b></span></td> *}\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Ends</b></span></td>\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Prize</b></span></td> *}\r\n	</tr>\r\n	{* Set up the warning period... 7 days from now (604800 = 7 days in seconds) *}\r\n	{math assign=\"endsSoon\" equation=\"x + y\" x=$smarty.now y=\"604800\"}\r\n	{foreach from=$competitions item=\"comp\"}\r\n	<tr>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.title|truncate:35:\"...\"}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{$comp.type|niceText}</small> &nbsp;</span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.style eq \"Group-vs-Group\"}Team{else}Individual{/if}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.rank ne \"N/A\"}{$comp.rank}/{$comp.rankOutOf}{else}N/A{/if}</small> &nbsp;</span></td> *}\r\n		{* <td nowrap><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.timeLeft}</small> &nbsp;</span></td> *}\r\n		<td nowrap=\"nowrap\"><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.endDate|date_format2:\"D n/j/y\"}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\" align=\"right\"><span><small>&nbsp;{if not $comp.potAmount and $comp.potDescription}(Special){else}{math assign=\"fontSizeFactor\" equation=\"x / y\" x=$comp.potAmount y=\"100\"}{math assign=\"fontSize\" equation=\"x + y\" x=\"11\" y=$fontSizeFactor|number_format:\"0\"}<span style=\"font-size:{$fontSize}px;\">${$comp.potAmount|number_format:\"0\"}</span>{/if}</small> &nbsp;</span></td> *}\r\n	</tr>\r\n	{foreachelse}\r\n	<tr>\r\n		<td colspan=\"6\"><span><small>You have not joined any competitions.</small></span></td>\r\n	</tr>\r\n	{/foreach}\r\n	</table>\r\n	</div>\r\n	<span style=\"margin-left:65px;\"><small>(NOTE: <b>Bold Date</b> = Ended, <span style=\"color:#C00;\"><b>Red Date</b></span> = Ends Soon)</small></span>\r\n\r\n	<div style=\"text-align:right;\">\r\n	<form name=\"joinCompForm\" method=\"post\" style=\"margin:4px;\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"competition/join\" />\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n		<b>Competition ID#</b> <input type=\"text\" class=\"textInput\" name=\"cid\"> <a href=\"javascript:document.joinCompForm.submit();\" class=\"button\">Join</a><br />\r\n	</form>\r\n	-<i>or</i>- see a list of all <a href=\"?pg=availableCompetitions\">Available Competitions</a>!\r\n	</div>\r\n</div>\r\n</td><td valign=\"top\" style=\"margin-left:10px;\">\r\n{* ********************************* COMPETITIONS I HAVE STARTED ********************************** *}\r\n{if $user->inGroupName(\'coordinators\')}\r\n<form name=\"requestsForm\" action=\"index.php\" method=\"post\" 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=\"acceptReject\" value=\"\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myComps\', \'\', \'showHide\');\"><img id=\"myComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Have Started</h2>\r\n\r\n<div id=\"myComps\" style=\"display:block;\">\r\n{if $myCompetitions|@count gt 0}\r\n	<div style=\"margin:0px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>ID</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Title</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Type</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>People wanting to join</b> &nbsp;</span></td>\r\n	</tr>\r\n	{foreach from=$myCompetitions item=\"comp\"}\r\n	<tr>\r\n		<td valign=\"top\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a></small></span></td>\r\n		<td valign=\"top\" nowrap=\"nowrap\" style=\"overflow:hidden;\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.title}</a></small></span></td>\r\n		<td valign=\"top\" nowrap=\"nowrap\">&nbsp;<span><small>{$comp.type}</small></td>\r\n		<td valign=\"top\" style=\"border-left:1px solid #000;\"><span>{if $comp.requests|@count}{assign var=\"isRequests\" value=\"true\"}{/if}{foreach from=$comp.requests item=\"request\"}<div class=\"hangingIndent\"><input type=\"checkbox\" name=\"request[{$comp.id}][]\" value=\"{$request.id}\"><small>({$request.dateAdded|date_format2:\"n/j/y\"}) {$request.name} &lt;{mailto address=$request.email encode=\"javascript\"}&gt;: &quot;<i>{$request.comment|strip_tags}</i>&quot;</small></div>{foreachelse}&nbsp;None right now.{/foreach}</span></td>\r\n	</tr>\r\n	{/foreach}\r\n	{if $isRequests}\r\n	<tr>\r\n		<td colspan=\"4\" align=\"center\">\r\n			<span><br /><a href=\"javascript://\" onclick=\"acceptReject.value=\'accept\';requestsForm.submit();return false;\" class=\"button\">Accept Selected</a>\r\n			<a href=\"javascript://\" onclick=\"acceptReject.value=\'reject\';requestsForm.submit();return false;\" class=\"button\">Reject Selected</a><small><br /><br /></small></span></td>\r\n	</tr>\r\n	{/if}\r\n	</table>\r\n	</div>\r\n{else}\r\n	<div class=\"underline2\">&nbsp;</div>\r\n	<small>&nbsp; &nbsp; You have not created any competitions.</small>\r\n{/if}\r\n{/if}\r\n</div>\r\n<br />\r\n</form>\r\n\r\n{* ********************************* INCENTIVES PROGRAM ********************************** *}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myIncentives\', \'\', \'showHide\');\"><img id=\"myIncentives_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	My Incentives Program</h2>\r\n\r\n<div id=\"myIncentives\" style=\"display:block;\">\r\n        <div style=\"margin:0px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	\r\n	{include_php file=\"shared_handle:company/participationPoints\"}\r\n\r\n	{if $scores|@count gt 0}\r\n	<h3>Participation Points</h3>\r\n        <table id=\"surveyContainer\" width=\"100%\">\r\n           <thead>\r\n               <tr><td width=\"100%\"><u> Category </u></td><td><u> Points </u></td><td nowrap><u> Total </u></td></tr>\r\n           </thead>\r\n           <tbody>\r\n           {foreach from=$scores item=\"score\" key=\"category\" name=\"loopScores\"}<tr><td nowrap>\r\n		<small>{$category|niceText}</small></td><td align=\"right\"><small>{$score}</small></td>\r\n		{if $smarty.foreach.loopScores.first}<td rowspan=\"999\" align=\"center\"><em>{$participationPointsEarned|default:0}</em></td>{/if}</tr>\r\n           {foreachelse}\r\n		None found.</td><td colspan=\"2\">&nbsp;</td></tr>\r\n           {/foreach}\r\n           </tbody>\r\n        </table>\r\n	<div class=\"underline\"></div>\r\n	<br />\r\n	{/if}\r\n\r\n	<h3>Survey Points</h3>\r\n        <table id=\"surveyContainer\" width=\"100%\">\r\n           {include_php file=\"shared_handle:company/surveyList\"}\r\n           <thead>\r\n               <tr><td width=\"100%\"><u> Survey Name </u></td><td><u> Available </u></td><td nowrap><u> Total </u></td></tr>\r\n           </thead>\r\n           <tbody>\r\n           {foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n		{if $item.dateAvailable gt 0}\r\n		<small>{$item.surveyName}</small></td><td align=\"center\"><small>{if $item.frequency eq \"Once\"}Never{else}{$item.dateAvailable|date_format2:\"m/d/y\"}{/if}</small></td>\r\n		{else}\r\n		<small><a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">{$item.surveyName}</a></small></td><td align=\"center\"><small>Now</small></td>\r\n		{/if}{if $smarty.foreach.loopSurveys.first}<td rowspan=\"999\" align=\"center\"><em>{$surveyPointsEarned|default:0}</em></td>{/if}</tr>\r\n                {foreachelse}\r\n		None found.</td><td colspan=\"2\">&nbsp;</td></tr>\r\n               {/foreach}\r\n           </tbody>\r\n        </table>\r\n	<div class=\"underline\"></div>\r\n	<span><small><a href=\"javascript://\" onclick=\"viewSurveys();\">View My Survey History</a></small></span>\r\n	\r\n	<br /><br />\r\n	<div align=\"right\"><b>Your total points: </b><span style=\"font-size:18px;font-weight:bold;border:1px solid gray;padding:3px;\">{$surveyPointsEarned+$participationPointsEarned}</span></div>\r\n\r\n        </div>\r\n</div>\r\n</td></tr></table>\r\n{/if}'),(2965,138,0.34,'smarty','0','Updated like WLW to initially show image instead of graph.',1106073597,2,'67.166.75.78','{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</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|default:\"weight\"}\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{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:\"&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:\"&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:\"&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 $type}\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{else}\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{/if}\r\n\r\n</body></html>'),(2966,98,1.92,'smarty','0','Made default graph the select image.',1106073790,2,'67.166.75.78','{assign var=\"pgLayout\" value=\"layouts/myhome_layout2.tpl\"}\r\n{include_php file=\"shared_handle:acceptRejectRequests\"} \r\n{include_php file=\"shared_handle:myHome\"}\r\n\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"hideWLWLinks\" value=\"true\"}\r\n{assign var=\"hideWidgets\" value=\"true\"}\r\n\r\n{* getProfile is included by getStats *}\r\n{* include_php file=\"shared_handle:getStats\" *}\r\n\r\n{* Now getting only Profile because getStats does TONS of unneccesary processing *}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n\r\n{if $smarty.request.debug}\r\n	{display var=$competitions}\r\n{/if}\r\n\r\n<h1 class=\"underline\">My Home - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n<br />\r\n\r\n{$user->firstName}, this is your personal Wellness &quot;Home&quot;.\r\nFrom this page you can manage the competitions you are in, and update your wellness profile. \r\nClick on the \'Update Profile\' button to change your Motto, and other information about yourself, or \'Account Settings\' to change your password.<br />\r\n<br />\r\n<script language=\"javascript\">{literal}\r\nfunction goNewGraph() {\r\n	var obj = document.getElementById(\'graphDropdown\');\r\n	var url;\r\n\r\n	for (var x = 0; x < obj.options.length; x++) {\r\n		if (obj.options[x].selected)\r\n			url = obj.options[x].value;\r\n	}\r\n\r\n	graphwindow.location.replace(url);\r\n\r\n	obj.selectedIndex = 0;\r\n}{/literal}\r\n</script>\r\n\r\n<table border=\"0\">\r\n<tr>\r\n	<td 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}</span><br />\r\n			<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight}</span><br />\r\n			<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet}\'{$userProfile.heightInches}&quot;</span><br />\r\n			<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI}</span><br />\r\n			<span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight}</span><br />\r\n		<br />\r\n                {* <form name=\"notUsed\" style=\"margin:0px;\">\r\n		<select id=\"graphDropdown\" onchange=\"goNewGraph();\">\r\n			<option value=\"\">(Change Graph)</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&totalChange=1\">Change in Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0\" target=\"graphwindow\">Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</option>\r\n		</select>\r\n		</form> *}\r\n		<h2 class=\"withBG\">Links</h2>\r\n		<small>\r\n		&nbsp;&middot; <a href=\"?pg=tips\">Weight Loss Tips</a><br /> \r\n		&nbsp;&middot; <a href=\"?pg=calculators\">Calculators</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=recipes\">Recipes</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=nutrition\">Nutrition Data</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=ptinfo\">Customized Fitness Plan</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=dietitianinfo\">Personal Nutrition Coach</a><br />\r\n		</small>\r\n                </div>\r\n               	</td>\r\n	<td align=\"center\">\r\n		<div style=\"margin:0px 10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small{* &type=weight&fillPrevious=1&precision=1&totalChange=0&userIds={$userProfile.id} *}\" frameborder=\"0\" width=\"425\" height=\"230\" scrollbars=\"no\"></iframe></div>\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</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</td>\r\n	<td valign=\"top\" width=\"100%\" style=\"padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<h2><i>\"{$userProfile.personalSaying|default:\"Your personal motto goes here.\"|replace:\'\"\':\'\'}\"</i></h2>\r\n		</td>\r\n</tr>\r\n</table>\r\n<br />\r\n{if $smarty.request.hideComps neq \"1\"}\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n{* ********************************* COMPETITIONS I AM IN ********************************** *}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'inComps\', \'\', \'showHide\');\"><img id=\"inComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Am In</h2>\r\nHere are the competitions you have signed up to participate in. If you have an ID of a competition you would like to join, enter it below.<br />\r\n<div id=\"inComps\" style=\"display:block;\">	\r\n	<div style=\"margin:10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\"><span>&nbsp;<b>ID</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Title</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Type</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Style</b></span></td>\r\n		{* <td class=\"underline2\"><span>&nbsp;<b>Rank</b></span></td> *}\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Time Remaining</b></span></td> *}\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Ends</b></span></td>\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Prize</b></span></td> *}\r\n	</tr>\r\n	{* Set up the warning period... 7 days from now (604800 = 7 days in seconds) *}\r\n	{math assign=\"endsSoon\" equation=\"x + y\" x=$smarty.now y=\"604800\"}\r\n	{foreach from=$competitions item=\"comp\"}\r\n	<tr>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.title|truncate:35:\"...\"}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{$comp.type|niceText}</small> &nbsp;</span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.style eq \"Group-vs-Group\"}Team{else}Individual{/if}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.rank ne \"N/A\"}{$comp.rank}/{$comp.rankOutOf}{else}N/A{/if}</small> &nbsp;</span></td> *}\r\n		{* <td nowrap><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.timeLeft}</small> &nbsp;</span></td> *}\r\n		<td nowrap=\"nowrap\"><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.endDate|date_format2:\"D n/j/y\"}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\" align=\"right\"><span><small>&nbsp;{if not $comp.potAmount and $comp.potDescription}(Special){else}{math assign=\"fontSizeFactor\" equation=\"x / y\" x=$comp.potAmount y=\"100\"}{math assign=\"fontSize\" equation=\"x + y\" x=\"11\" y=$fontSizeFactor|number_format:\"0\"}<span style=\"font-size:{$fontSize}px;\">${$comp.potAmount|number_format:\"0\"}</span>{/if}</small> &nbsp;</span></td> *}\r\n	</tr>\r\n	{foreachelse}\r\n	<tr>\r\n		<td colspan=\"6\"><span><small>You have not joined any competitions.</small></span></td>\r\n	</tr>\r\n	{/foreach}\r\n	</table>\r\n	</div>\r\n	<span style=\"margin-left:65px;\"><small>(NOTE: <b>Bold Date</b> = Ended, <span style=\"color:#C00;\"><b>Red Date</b></span> = Ends Soon)</small></span>\r\n\r\n	<div style=\"text-align:right;\">\r\n	<form name=\"joinCompForm\" method=\"post\" style=\"margin:4px;\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"competition/join\" />\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n		<b>Competition ID#</b> <input type=\"text\" class=\"textInput\" name=\"cid\"> <a href=\"javascript:document.joinCompForm.submit();\" class=\"button\">Join</a><br />\r\n	</form>\r\n	-<i>or</i>- see a list of all <a href=\"?pg=availableCompetitions\">Available Competitions</a>!\r\n	</div>\r\n</div>\r\n</td><td valign=\"top\" style=\"margin-left:10px;\">\r\n{* ********************************* COMPETITIONS I HAVE STARTED ********************************** *}\r\n{if $user->inGroupName(\'coordinators\')}\r\n<form name=\"requestsForm\" action=\"index.php\" method=\"post\" 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=\"acceptReject\" value=\"\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myComps\', \'\', \'showHide\');\"><img id=\"myComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Have Started</h2>\r\n\r\n<div id=\"myComps\" style=\"display:block;\">\r\n{if $myCompetitions|@count gt 0}\r\n	<div style=\"margin:0px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>ID</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Title</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Type</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>People wanting to join</b> &nbsp;</span></td>\r\n	</tr>\r\n	{foreach from=$myCompetitions item=\"comp\"}\r\n	<tr>\r\n		<td valign=\"top\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a></small></span></td>\r\n		<td valign=\"top\" nowrap=\"nowrap\" style=\"overflow:hidden;\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.title}</a></small></span></td>\r\n		<td valign=\"top\" nowrap=\"nowrap\">&nbsp;<span><small>{$comp.type}</small></td>\r\n		<td valign=\"top\" style=\"border-left:1px solid #000;\"><span>{if $comp.requests|@count}{assign var=\"isRequests\" value=\"true\"}{/if}{foreach from=$comp.requests item=\"request\"}<div class=\"hangingIndent\"><input type=\"checkbox\" name=\"request[{$comp.id}][]\" value=\"{$request.id}\"><small>({$request.dateAdded|date_format2:\"n/j/y\"}) {$request.name} &lt;{mailto address=$request.email encode=\"javascript\"}&gt;: &quot;<i>{$request.comment|strip_tags}</i>&quot;</small></div>{foreachelse}&nbsp;None right now.{/foreach}</span></td>\r\n	</tr>\r\n	{/foreach}\r\n	{if $isRequests}\r\n	<tr>\r\n		<td colspan=\"4\" align=\"center\">\r\n			<span><br /><a href=\"javascript://\" onclick=\"acceptReject.value=\'accept\';requestsForm.submit();return false;\" class=\"button\">Accept Selected</a>\r\n			<a href=\"javascript://\" onclick=\"acceptReject.value=\'reject\';requestsForm.submit();return false;\" class=\"button\">Reject Selected</a><small><br /><br /></small></span></td>\r\n	</tr>\r\n	{/if}\r\n	</table>\r\n	</div>\r\n{else}\r\n	<div class=\"underline2\">&nbsp;</div>\r\n	<small>&nbsp; &nbsp; You have not created any competitions.</small>\r\n{/if}\r\n{/if}\r\n</div>\r\n<br />\r\n</form>\r\n\r\n{* ********************************* INCENTIVES PROGRAM ********************************** *}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myIncentives\', \'\', \'showHide\');\"><img id=\"myIncentives_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	My Incentives Program</h2>\r\n\r\n<div id=\"myIncentives\" style=\"display:block;\">\r\n        <div style=\"margin:0px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	\r\n	{include_php file=\"shared_handle:company/participationPoints\"}\r\n\r\n	{if $scores|@count gt 0}\r\n	<h3>Participation Points</h3>\r\n        <table id=\"surveyContainer\" width=\"100%\">\r\n           <thead>\r\n               <tr><td width=\"100%\"><u> Category </u></td><td><u> Points </u></td><td nowrap><u> Total </u></td></tr>\r\n           </thead>\r\n           <tbody>\r\n           {foreach from=$scores item=\"score\" key=\"category\" name=\"loopScores\"}<tr><td nowrap>\r\n		<small>{$category|niceText}</small></td><td align=\"right\"><small>{$score}</small></td>\r\n		{if $smarty.foreach.loopScores.first}<td rowspan=\"999\" align=\"center\"><em>{$participationPointsEarned|default:0}</em></td>{/if}</tr>\r\n           {foreachelse}\r\n		None found.</td><td colspan=\"2\">&nbsp;</td></tr>\r\n           {/foreach}\r\n           </tbody>\r\n        </table>\r\n	<div class=\"underline\"></div>\r\n	<br />\r\n	{/if}\r\n\r\n	<h3>Survey Points</h3>\r\n        <table id=\"surveyContainer\" width=\"100%\">\r\n           {include_php file=\"shared_handle:company/surveyList\"}\r\n           <thead>\r\n               <tr><td width=\"100%\"><u> Survey Name </u></td><td><u> Available </u></td><td nowrap><u> Total </u></td></tr>\r\n           </thead>\r\n           <tbody>\r\n           {foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n		{if $item.dateAvailable gt 0}\r\n		<small>{$item.surveyName}</small></td><td align=\"center\"><small>{if $item.frequency eq \"Once\"}Taken{elseif (($item.dateAvailable - $smarty.now) < 43000)}{$item.dateAvailable|date_format2:\"g:i A\"}{else}{$item.dateAvailable|date_format2:\"m/d/y\"}{/if}</small></td>\r\n		{else}\r\n		<small><a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">{$item.surveyName}</a></small></td><td align=\"center\"><small>Now</small></td>\r\n		{/if}{if $smarty.foreach.loopSurveys.first}<td rowspan=\"999\" align=\"center\"><em>{$surveyPointsEarned|default:0}</em></td>{/if}</tr>\r\n                {foreachelse}\r\n		None found.</td><td colspan=\"2\">&nbsp;</td></tr>\r\n               {/foreach}\r\n           </tbody>\r\n        </table>\r\n	<div class=\"underline\"></div>\r\n	<span><small><a href=\"javascript://\" onclick=\"viewSurveys();\">View My Survey History</a></small></span>\r\n	\r\n	<br /><br />\r\n	<div align=\"right\"><b>Your total points: </b><span style=\"font-size:18px;font-weight:bold;border:1px solid gray;padding:3px;\">{$surveyPointsEarned+$participationPointsEarned}</span></div>\r\n\r\n        </div>\r\n</div>\r\n</td></tr></table>\r\n{/if}'),(2431,1,2.83,'smarty','0','Switched to Flash animation',1099931976,3,'24.10.224.224','{assign var=\"hideTopNav\" value=\"1\"} \r\n{swf src=\"`$skinFolder`flash/weightloss.swf\" width=\"690\" height=\"390\"}\r\n\r\n<div id=\"homeNavigator\" class=\"hBox\" style=\"margin:5px 6px;text-align:right;margin-right:0px;\">\r\n	<a href=\"?pg=howitworks\" class=\"link\">How It All Works</a> | \r\n	{if $user->isLoggedIn()}<a href=\"?pg=myhome\" class=\"link\">Go to My Home</a>{else}<a href=\"?pg=signup/begin\" class=\"link\">Sign Up Now</a>{/if}</div>\r\n\r\n'),(2435,143,0.58,'smarty','0','Added Tooltips',1099933523,3,'24.10.224.224','{assign var=\"pgLayout\" value=\"none\"}{include_php file=\"shared_handle:getStats\"}<html>\r\n<head>\r\n	<link rel=\"stylesheet\" href=\"{$skinFolder}/styles/base.css\" />\r\n	<style>{literal}\r\n	.verticalText {\r\n		writing-mode: tb-rl;\r\n		filter: flipv fliph;\r\n	}\r\n	.tch {\r\n		height:40px;\r\n		border-right:1px solid black;\r\n		border-bottom:1px solid black;\r\n		background-color:#EEE;\r\n	}\r\n	.tc {\r\n		height:30px;\r\n		border-right:1px dashed #CCC;\r\n		border-bottom:1px dashed #CCC;\r\n		background-color:#FFF;\r\n		text-align:center;\r\n	}\r\n	\r\n	.tipGrp1 {\r\n	  cursor:default;\r\n	}\r\n\r\n	.tipGrp4s {\r\n	  position:absolute; visibility:hidden; overflow:hidden;\r\n	  color:#008; background:#FFE; border:1px solid #CCC;\r\n	  margin:0; padding:2px;\r\n	  width:80px; height:auto;\r\n	}\r\n	{/literal}</style>\r\n\r\n<script language=\"javascript\" src=\"./js/cross-browser/x/x_load.js\"></script>\r\n<script language=\"javascript\">{literal}\r\n	var xDir = \'./js/cross-browser/x/\';\r\n	var hiZ = 2;\r\n	\r\n	xInclude(xDir+\'x_core.js\',\r\n		 xDir+\'x_event.js\',\r\n		 xDir+\'x_dom.js\',\r\n		 xDir+\'x_tip.js\');\r\n			 \r\n	window.onload = function () {\r\n		  new xTooltipGroup(\'tipGrp1\', \'tipGrp1s\', \'right\', 4, 0);\r\n		  new xTooltipGroup(\'tipGrp2\', \'tipGrp2s\', \'top\', 0, -2);\r\n		  new xTooltipGroup(\'tipGrp3\', \'tipGrp3s\', \'mouse\', 20, -10);\r\n		  new xTooltipGroup(\'tipGrp4\', \'tipGrp4s\', \'mouse\', 20, -10);\r\n	}\r\n{/literal}</script>\r\n<script language=\"javascript\" src=\"\"></script>\r\n\r\n</head>\r\n<body style=\"margin:0px;background-image:none;\">\r\n{* display var=$userStats *}\r\n{* display var=$compData *}\r\n<table width=\"100%\" height=\"280\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"left\">\r\n<tr>\r\n	{if $user->id eq $userProfile.id OR $acm->isDomainAdmin()}\r\n		{foreach name=\"headingLoop\" from=$userStats.weeks item=\"week\" key=\"num\"}\r\n		<td height=\"40\" nowrap=\"nowrap\" align=\"center\" class=\"tch\"><div class=\"\">&nbsp;<a href=\"?pg=myprofile/update&start={$week.weekOfTimestamp}&userId={$userProfile.id}\'\" target=\"profileUpdateFrame\"><em>Week {$num}</em></a>&nbsp;<br /><small>{$week.weekOf}&nbsp;</small></div></td>\r\n		{/foreach}\r\n	{else}\r\n		{foreach name=\"headingLoop\" from=$userStats.weeks item=\"week\" key=\"num\"}\r\n		<td height=\"40\" nowrap=\"nowrap\" align=\"center\" class=\"tch\"><div class=\"\"><small>&nbsp;<b>Week {$num}</b>&nbsp;<br />{$week.weekOf}&nbsp;</small></div></td>\r\n		{/foreach}\r\n	{/if}\r\n</tr>\r\n<tr>\r\n	{foreach from=$userStats.weeks item=\"week\"}\r\n	<td height=\"30\" valign=\"middle\" align=\"right\" class=\"tc\"><div class=\"tipGrp1\" title=\"Weight\">{$week.weight}</div></td>\r\n	{/foreach}\r\n</tr>\r\n<tr>\r\n	{foreach from=$userStats.weeks item=\"week\"}\r\n	<td height=\"30\" valign=\"middle\" align=\"right\" class=\"tc\"><div class=\'tipGrp1\' title=\'Total Lost\'>{$week.totalLost|default:\"0\"}</div></td>\r\n	{/foreach}\r\n</tr>\r\n<tr>\r\n	{foreach from=$userStats.weeks item=\"week\"}\r\n	<td height=\"30\" valign=\"middle\" align=\"right\" class=\"tc\"><div class=\'tipGrp1\' title=\'BMI\'>{$week.bmi|default:\"0\"}</div></td>\r\n	{/foreach}\r\n</tr>\r\n<tr>\r\n	{foreach from=$userStats.weeks item=\"week\"}\r\n	<td height=\"30\" valign=\"middle\" align=\"right\" class=\"tc\"><div class=\'tipGrp1\' title=\'Calories\'>{$week.calories|default:\"0\"}</div></td>\r\n	{/foreach}\r\n</tr>\r\n<tr>\r\n	{foreach from=$userStats.weeks item=\"week\"}\r\n	<td height=\"30\" valign=\"middle\" align=\"right\" class=\"tc\"><div class=\'tipGrp1\' title=\'Carbs\'>{$week.carbs|default:\"0\"}</div></td>\r\n	{/foreach}\r\n</tr>\r\n<tr>\r\n	{foreach from=$userStats.weeks item=\"week\"}\r\n	<td height=\"30\" valign=\"middle\" align=\"right\" class=\"tc\"><div class=\"tipGrp1\" title=\"Fat\">{$week.fat|default:\"0\"}</div></td>\r\n	{/foreach}\r\n</tr>\r\n<tr>\r\n	{foreach from=$userStats.weeks item=\"week\"}\r\n	<td height=\"30\" valign=\"middle\" align=\"right\" class=\"tc\"><div class=\"tipGrp1\" title=\"Minutes Exercise>{$week.minutesExercise|default:\"0\"}</div></td>\r\n	{/foreach}\r\n</tr>\r\n<tr>\r\n	{foreach from=$userStats.weeks item=\"week\"}\r\n	<td height=\"30\" valign=\"middle\" align=\"right\" class=\"tc\"><div class=\"tipGrp1\" title=\"Distance Exercise\">{$week.distanceExercised|default:\"0\"}</div></td>\r\n	{/foreach}\r\n</tr>\r\n</table><a name=\"recent\"></a>\r\n</body>\r\n</html>\r\n'),(2850,98,1.76,'smarty','0','Including surveyList handler.',1104245820,3,'24.10.217.227','{assign var=\"pgLayout\" value=\"layouts/myhome_layout2.tpl\"}\r\n{include_php file=\"shared_handle:acceptRejectRequests\"} \r\n{include_php file=\"shared_handle:myHome\"}\r\n\r\n{assign var=\"hideUserBox\" value=\"false\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"hideWLWLinks\" value=\"true\"}\r\n{assign var=\"hideWidgets\" value=\"true\"}\r\n\r\n{* getProfile is included by getStats *}\r\n{* include_php file=\"shared_handle:getStats\" *}\r\n\r\n{* Now getting only Profile because getStats does TONS of unneccesary processing *}\r\n{include_php file=\"shared_handle:getProfile\"}\r\n\r\n{if $smarty.request.debug}\r\n	{display var=$competitions}\r\n{/if}\r\n\r\n<h1 class=\"underline\">My Home - {$userProfile.firstName} {$userProfile.lastName} ({$userProfile.username})</h1>\r\n<br />\r\n\r\n{$user->firstName}, this is your personal Wellness &quot;Home&quot;.\r\nFrom this page you can manage the competitions you are in, and update your wellness profile. \r\nClick on the \'Update Profile\' button to change your Motto, and other information about yourself, or \'Account Settings\' to change your password.<br />\r\n<br />\r\n<script language=\"javascript\">{literal}\r\nfunction goNewGraph() {\r\n	var obj = document.getElementById(\'graphDropdown\');\r\n	var url;\r\n\r\n	for (var x = 0; x < obj.options.length; x++) {\r\n		if (obj.options[x].selected)\r\n			url = obj.options[x].value;\r\n	}\r\n\r\n	graphwindow.location.replace(url);\r\n\r\n	obj.selectedIndex = 0;\r\n}{/literal}\r\n</script>\r\n\r\n<table border=\"0\">\r\n<tr>\r\n	<td 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}</span><br />\r\n			<span class=\"cellHeadLarge\">Start Weight:</span><span class=\"cellSmall\">{$userProfile.initialWeight}</span><br />\r\n			<span class=\"cellHeadLarge\">Height:</span><span class=\"cellSmall\">{$userProfile.heightFeet}\'{$userProfile.heightInches}&quot;</span><br />\r\n			<span class=\"cellHeadLarge\">Start BMI:</span><span class=\"cellSmall\">{$userProfile.startBMI}</span><br />\r\n			<span class=\"cellHeadLarge\">Goal Weight:</span><span class=\"cellSmall\">{$userProfile.goalWeight}</span><br />\r\n		<br />\r\n                {* <form name=\"notUsed\" style=\"margin:0px;\">\r\n		<select id=\"graphDropdown\" onchange=\"goNewGraph();\">\r\n			<option value=\"\">(Change Graph)</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&totalChange=1\">Change in Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0\" target=\"graphwindow\">Weight</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=fat&fillPrevious=0&precision=1\" target=\"graphwindow\">Fat Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=calories&fillPrevious=0&precision=1\" target=\"graphwindow\">Calorie Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=carbs&fillPrevious=0&precision=1\" target=\"graphwindow\">Carb Intake</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=minutesExercise&fillPrevious=0&precision=1\" target=\"graphwindow\">Exercise</option>\r\n			<option value=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=distanceExercised&fillPrevious=0&precision=1\" target=\"graphwindow\">Distance Exercised</option>\r\n		</select>\r\n		</form> *}\r\n		<h2 class=\"withBG\">Links</h2>\r\n		<small>\r\n		&nbsp;&middot; <a href=\"?pg=tips\">Weight Loss Tips</a><br /> \r\n		&nbsp;&middot; <a href=\"?pg=calculators\">Calculators</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=recipes\">Recipes</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=nutrition\">Nutrition Data</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=ptinfo\">Customized Fitness Plan</a><br />\r\n		&nbsp;&middot; <a href=\"?pg=dietitianinfo\">Personal Nutrition Coach</a><br />\r\n		</small>\r\n                </div>\r\n               	</td>\r\n	<td align=\"center\">\r\n		<div style=\"margin:0px 10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<iframe name=\"graphwindow\" src=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&type=weight&fillPrevious=1&precision=0&totalChange=0&userIds={$userProfile.id}\" frameborder=\"0\" width=\"425\" height=\"230\" scrollbars=\"no\"></iframe></div>\r\n		<small>\r\n			<a href=\"?pg=flashgraph-frame&compId={$compData.id}&format=small&userIds={$userProfile.id}&type=weight&fillPrevious=1&precision=0&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=0\" 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</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</td>\r\n	<td valign=\"top\" width=\"100%\" style=\"padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n		<h2><i>\"{$userProfile.personalSaying|default:\"Your personal motto goes here.\"|replace:\'\"\':\'\'}\"</i></h2>\r\n		</td>\r\n</tr>\r\n</table>\r\n<br />\r\n{if $smarty.request.hideComps neq \"1\"}\r\n<table width=\"100%\"><tr><td valign=\"top\">\r\n{* ********************************* COMPETITIONS I AM IN ********************************** *}\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'inComps\', \'\', \'showHide\');\"><img id=\"inComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Am In</h2>\r\nHere are the competitions you have signed up to participate in. If you have an ID of a competition you would like to join, enter it below.<br />\r\n<div id=\"inComps\" style=\"display:block;\">	\r\n	<div style=\"margin:10px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\"><span>&nbsp;<b>ID</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Title</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Type</b></span></td>\r\n		<td class=\"underline2\"><span>&nbsp;<b>Style</b></span></td>\r\n		{* <td class=\"underline2\"><span>&nbsp;<b>Rank</b></span></td> *}\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Time Remaining</b></span></td> *}\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Ends</b></span></td>\r\n		{* <td class=\"underline2\" nowrap><span>&nbsp;<b>Prize</b></span></td> *}\r\n	</tr>\r\n	{* Set up the warning period... 7 days from now (604800 = 7 days in seconds) *}\r\n	{math assign=\"endsSoon\" equation=\"x + y\" x=$smarty.now y=\"604800\"}\r\n	{foreach from=$competitions item=\"comp\"}\r\n	<tr>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;<a href=\"?pg=competition&cid={$comp.id}\">{$comp.title|truncate:35:\"...\"}</a> &nbsp;</small></span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{$comp.type|niceText}</small> &nbsp;</span></td>\r\n		<td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.style eq \"Group-vs-Group\"}Team{else}Individual{/if}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\"><span><small>&nbsp;{if $comp.rank ne \"N/A\"}{$comp.rank}/{$comp.rankOutOf}{else}N/A{/if}</small> &nbsp;</span></td> *}\r\n		{* <td nowrap><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.timeLeft}</small> &nbsp;</span></td> *}\r\n		<td nowrap=\"nowrap\"><span><small{if $comp.endDate lt $smarty.now} style=\"font-weight:bold;\"{elseif $comp.endDate lt $endsSoon} style=\"color:#C00;font-weight:bold;\"{/if}>&nbsp;{$comp.endDate|date_format2:\"D n/j/y\"}</small> &nbsp;</span></td>\r\n		{* <td nowrap=\"nowrap\" align=\"right\"><span><small>&nbsp;{if not $comp.potAmount and $comp.potDescription}(Special){else}{math assign=\"fontSizeFactor\" equation=\"x / y\" x=$comp.potAmount y=\"100\"}{math assign=\"fontSize\" equation=\"x + y\" x=\"11\" y=$fontSizeFactor|number_format:\"0\"}<span style=\"font-size:{$fontSize}px;\">${$comp.potAmount|number_format:\"0\"}</span>{/if}</small> &nbsp;</span></td> *}\r\n	</tr>\r\n	{foreachelse}\r\n	<tr>\r\n		<td colspan=\"6\"><span><small>You have not joined any competitions.</small></span></td>\r\n	</tr>\r\n	{/foreach}\r\n	</table>\r\n	</div>\r\n	<span style=\"margin-left:65px;\"><small>(NOTE: <b>Bold Date</b> = Ended, <span style=\"color:#C00;\"><b>Red Date</b></span> = Ends Soon)</small></span>\r\n\r\n	<div style=\"text-align:right;\">\r\n	<form name=\"joinCompForm\" method=\"post\" style=\"margin:4px;\">\r\n		<input type=\"hidden\" name=\"pg\" value=\"competition/join\" />\r\n		<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n		<b>Competition ID#</b> <input type=\"text\" class=\"textInput\" name=\"cid\"> <a href=\"javascript:document.joinCompForm.submit();\" class=\"button\">Join</a><br />\r\n	</form>\r\n	</div>\r\n</div>\r\n</td><td valign=\"top\" style=\"margin-left:10px;\">\r\n{* ********************************* COMPETITIONS I HAVE STARTED ********************************** *}\r\n{if $user->inGroupName(\'coordinators\')}\r\n<form name=\"requestsForm\" action=\"index.php\" method=\"post\" 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=\"acceptReject\" value=\"\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myComps\', \'\', \'showHide\');\"><img id=\"myComps_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	Competitions I Have Started</h2>\r\n\r\n<div id=\"myComps\" style=\"display:block;\">\r\n{if $myCompetitions|@count gt 0}\r\n	<div style=\"margin:0px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n	<table cellspacing=\"0\" cellpadding=\"1\" align=\"center\">\r\n	<tr>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>ID</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Title</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>Type</b> &nbsp;</span></td>\r\n		<td class=\"underline2\" nowrap><span>&nbsp;<b>People wanting to join</b> &nbsp;</span></td>\r\n	</tr>\r\n	{foreach from=$myCompetitions item=\"comp\"}\r\n	<tr>\r\n		<td valign=\"top\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.id}</a></small></span></td>\r\n		<td valign=\"top\" nowrap=\"nowrap\" style=\"overflow:hidden;\"><span>&nbsp;<small><a href=\"?pg=competition&cid={$comp.id}\">{$comp.title}</a></small></span></td>\r\n		<td valign=\"top\" nowrap=\"nowrap\">&nbsp;<span><small>{$comp.type}</small></td>\r\n		<td valign=\"top\" style=\"border-left:1px solid #000;\"><span>{if $comp.requests|@count}{assign var=\"isRequests\" value=\"true\"}{/if}{foreach from=$comp.requests item=\"request\"}<div class=\"hangingIndent\"><input type=\"checkbox\" name=\"request[{$comp.id}][]\" value=\"{$request.id}\"><small>({$request.dateAdded|date_format2:\"n/j/y\"}) {$request.name} &lt;{mailto address=$request.email encode=\"javascript\"}&gt;: &quot;<i>{$request.comment|strip_tags}</i>&quot;</small></div>{foreachelse}&nbsp;None right now.{/foreach}</span></td>\r\n	</tr>\r\n	{/foreach}\r\n	{if $isRequests}\r\n	<tr>\r\n		<td colspan=\"4\" align=\"center\">\r\n			<span><br /><a href=\"javascript://\" onclick=\"acceptReject.value=\'accept\';requestsForm.submit();return false;\" class=\"button\">Accept Selected</a>\r\n			<a href=\"javascript://\" onclick=\"acceptReject.value=\'reject\';requestsForm.submit();return false;\" class=\"button\">Reject Selected</a><small><br /><br /></small></span></td>\r\n	</tr>\r\n	{/if}\r\n	</table>\r\n	</div>\r\n{else}\r\n	<div class=\"underline2\">&nbsp;</div>\r\n	<small>&nbsp; &nbsp; You have not created any competitions.</small>\r\n{/if}\r\n{/if}\r\n</div>\r\n<br />\r\n</form>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'myIncentives\', \'\', \'showHide\');\"><img id=\"myIncentives_img\" src=\"./img/blank.gif\" class=\"showHide_on\" alt=\"show/hide\" border=\"0\" /></a></div> \r\n	My Incentives Program</h2>\r\n\r\n<div id=\"myIncentives\" style=\"display:block;\">\r\n        <div style=\"margin:0px;padding:5px;background-color:#FFF;border:#999 1px solid;\">\r\n        <table id=\"surveyContainer\" width=\"100%\">\r\n           {include_php file=\"shared_handle:company/surveyList\"}\r\n           <thead>\r\n               <tr><td width=\"100%\"><u>Survey Name</u></td><td><u>Available</u></td><td nowrap><u>Total Points</u></td></tr>\r\n           </thead>\r\n           <tbody>\r\n           {foreach from=$surveys item=item name=\"loopSurveys\"}<tr><td nowrap>\r\n		{if $item.dateAvailable gt 0}\r\n		<small>{$item.surveyName}</small></td><td align=\"center\"><small>{$item.dateAvailable|date_format2:\"m/d/y\"}</small></td>\r\n		{else}\r\n		<small><a href=\"javascript://\" onclick=\"openSurvey({$item.id});\">{$item.surveyName}</a></small></td><td align=\"center\"><small>Now</small></td>\r\n		{/if}{if $smarty.foreach.loopSurveys.first}<td rowspan=\"999\" align=\"center\"><em>999</em></td>{/if}</tr>\r\n                {foreachelse}\r\n		None found.</td><td colspan=\"2\">&nbsp;</td></tr>\r\n               {/foreach}\r\n           </tbody>\r\n        </table>\r\n        </div>\r\n</div>\r\n</td></tr></table>\r\n{/if}'),(2572,173,0.16,'smarty','0','added $skinFolder path, and fixed filename.',1101938436,16,'128.187.0.164','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>Some of eHealthCompete\'s valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\">\r\n<img src=\"{$skinFolder}images/byulogo.gif\">\r\n<img src=\"{$skinFolder}images/nuskinlogo.gif\">\r\n<img src=\"{$skinFolder}images/bigplanetlogo.gif\">\r\n<img src=\"{$skinFolder}images/pharmenexlogo.gif\">'),(2573,173,0.17,'smarty','0','added $skinFolder path, and fixed filename.',1101938633,16,'128.187.0.164','<h1 class=\"withBG\">Clients</h1>\r\n\r\n<p>Some of eHealthCompete\'s valued Clients</p>\r\n\r\n<img src=\"{$skinFolder}images/myfamilylogo.gif\">\r\n<!--\r\n<img src=\"{$skinFolder}images/byulogo.gif\">\r\n<img src=\"{$skinFolder}images/nuskinlogo.gif\">\r\n<img src=\"{$skinFolder}images/bigplanetlogo.gif\">\r\n<img src=\"{$skinFolder}images/pharmenexlogo.gif\">\r\n-->'),(2871,187,0.20,'smarty','0','Page created.',1104270870,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"file:./layouts/lite.tpl\"}\r\n<h2 class=\"withBG\">My Survey History</h2>\r\n\r\n{select_query return=\"array\" assign=\"aSurveys\"}\r\nst.surveyId, st.dateTaken, st.pointsEarned, s.surveyName \r\nFROM surveys_taken st\r\nLEFT JOIN surveys s ON (s.id = st.surveyId)\r\nWHERE userId = {$user->id} \r\nORDER BY dateTaken\r\n{/select_query}\r\n\r\n<table width=\"100%\">\r\n<thead>\r\n	<tr>\r\n		<td nowrap=\"nowrap\"><small><b><u>Survey Name</u></b></small></td>\r\n		<td nowrap=\"nowrap\"><small><b><u>Date Taken</u></b></small></td>\r\n		<td nowrap=\"nowrap\"><small><b><u>Points Earned</u></b></small></td>\r\n		<td><small><b><u>Action</u></b></small></td>\r\n	</tr>\r\n</thead>\r\n{foreach from=$aSurveys item=item name=survey}\r\n	<tr>\r\n		<td nowrap=\"nowrap\"><small>{$item.surveyName}</small></td>\r\n		<td><small>{$item.dateTaken|date_format2:\"m/d/y\"}</small></td>\r\n		<td><small>{$item.pointsEarned}</small></td>\r\n		<td><small><a href=\"index.php?pg=surveyReview&takenId={$item.surveyId}\">Review</a></small></td>\r\n	</tr>\r\n{/foreach}\r\n</table>\r\n\r\n<div style=\"text-align:center;\"><input type=\"button\" onclick=\"window.close();\" value=\"Close this Window\" /></div>\r\n'),(2872,188,0.13,'smarty','0','Page created.',1104270931,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"layouts/lite.tpl\"}\r\n{include_php file=\"shared_handle:company/surveyReview\"}\r\n<h2 class=\"withBG\">Reviewing: {$survey.surveyName|default:\"Undefined\"}</h2>\r\n\r\nRESULTS\r\n\r\n<div style=\"text-align:center;\"><input type=\"button\" onclick=\"location.replace(\'index.php?pg=surveyHistory\')\" value=\"Return to Survey History\" /></div>\r\n'),(2873,188,0.14,'smarty','0','Page created.',1104271502,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"layouts/lite.tpl\"}\r\n{include_php file=\"shared_handle:company/surveyReview\"}\r\n<h2 class=\"withBG\">Reviewing: {$survey.surveyName|default:\"Undefined\"}</h2>\r\n\r\nRESULTS\r\n\r\n<br />\r\n<div style=\"text-align:center;\"><input type=\"button\" onclick=\"location.replace(\'index.php?pg=surveyHistory\')\" value=\"Return to Survey History\" /></div>\r\n'),(1842,117,0.27,'smarty','0','debugging',1088035502,3,'67.166.74.140','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n{include_php file=\"shared_handle:newcomp.review\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Review</h1>\r\n\r\n	{toc_prev assign=\"prev\"}\r\n	{if not $competitionErrors}\r\n		{toc_next assign=\"next\"}\r\n	{/if}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div>\r\n	<br />\r\n	You are almost done! Before sending off your invitations,\r\n	please review each item below to make sure everything is correct and then click \'Next\'.\r\n</div>\r\n\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'parameters\', \'hideReviewParameters\', \'showHide\');\"><img id=\"parameters_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewParameters}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Competition Parameters:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewParameters\" name=\"newcomp[hideReviewParameters]\" value=\"{$newcomp.hideReviewParameters|default:\"0\"}\" />\r\n\r\n<div id=\"parameters\" style=\"margin:15px;display:{if $newcomp.hideReviewParameters eq 1}none{else}block{/if};\">\r\n	<table style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td align=\"right\"><div>Comptition Title:</div></td>\r\n		<td><div><b>{$newcomp.title}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Type:</div></td>\r\n		<td><div><b>{$newcomp.type|niceText}, {$newcomp.style}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Term:</div></td>\r\n		<td><div><b>{$newcomp.startDate|date_format2:\"M j, Y\"}</b> to <b>{$newcomp.endDate|date_format2:\"M j, Y\"}</b> ({math equation=\"(b - a) / 86400\" a=$newcomp.startDate|default:\"0\" b=$newcomp.endDate|default:\"0\" assign=\"numDays\"}{$numDays|number_format:\"0\"} days)</div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Jack Pot:</div></td>\r\n		<td><div>{if $newcomp.individualPotAmount}<b>${$newcomp.individualPotAmount|number_format:\"2\"}</b> {if $newcomp.potMethod eq \"Per-competitor Donations\"}(each) {/if}by {/if}<b>{$newcomp.potMethod}</b></div></td>\r\n	</tr>\r\n{if $newcomp.potDescription}\r\n	<tr>\r\n		<td align=\"right\"><div>Jack Pot Description:</div></td>\r\n		<td><div><b>{$newcomp.potDescription}</b></div></td>\r\n	</tr>\r\n{/if}\r\n	<tr>\r\n		<td align=\"right\"><div>Scoring:</div></td>\r\n		<td><div>Based on <b>{$newcomp.scoringMethod}</b> or, in the event of a tie, <b>{$newcomp.tieBreakerMethod}</b></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/start\">Change/Update Your Competition Parameters Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\', \'hideReviewLetter\', \'showHide\');\"><img id=\"letter_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewLetter !== \"0\"}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Invitation Letter:</h2>\r\n\r\n<input type=\"hidden\" id=\"hideReviewLetter\" name=\"newcomp[hideReviewLetter]\" value=\"{if $newcomp.hideReviewLetter !== \"0\"}1{else}0{/if}\" />\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:{if $newcomp.hideReviewLetter !== \"0\"}none{else}block{/if};margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/create-invitation\">Change/Update Your Invitation Letter Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'invitations\', \'hideReviewInvitations\', \'showHide\');\"><img id=\"invitations_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewInvitations}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Who You\'re Inviting:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewInvitations\" name=\"newcomp[hideReviewInvitations]\" value=\"{$newcomp.hideReviewInvitations|default:\"0\"}\" />\r\n\r\n<div id=\"invitations\" style=\"margin:15px;display:{if $newcomp.hideReviewInvitations eq \"1\"}none{else}block{/if};\">\r\n	<table cellpadding=\"3\" style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td><b>Name</b></td>\r\n		<td><b>E-mail Address</b></td>\r\n		<td><b>Relation</b></td>\r\n	</tr>\r\n	{$newcomp.invite.name|@count}\r\n	{section name=\"x\" loop=$newcomp.invite.name|@count}{$x}:{$smarty.section.x.iteration}\r\n		{if not ($newcomp.invite.name[x] or $newcomp.invite.email[x] or $newcomp.invite.relation[x])}{php}continue;{/php}{/if}\r\n	<tr>\r\n		<td>{$newcomp.invite.name[x]}</td>\r\n		<td>{$newcomp.invite.email[x]}</td>\r\n		<td>{$newcomp.invite.relation[x]}</td>\r\n	</tr>\r\n	{/section}\r\n{display var=$newcomp.invite}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/send-invitation#invitations\">Change/Update Your Invitations</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n'),(1843,117,0.28,'smarty','0','should work right now.',1088035745,3,'67.166.74.140','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n{include_php file=\"shared_handle:newcomp.review\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Review</h1>\r\n\r\n	{toc_prev assign=\"prev\"}\r\n	{if not $competitionErrors}\r\n		{toc_next assign=\"next\"}\r\n	{/if}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div>\r\n	<br />\r\n	You are almost done! Before sending off your invitations,\r\n	please review each item below to make sure everything is correct and then click \'Next\'.\r\n</div>\r\n\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'parameters\', \'hideReviewParameters\', \'showHide\');\"><img id=\"parameters_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewParameters}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Competition Parameters:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewParameters\" name=\"newcomp[hideReviewParameters]\" value=\"{$newcomp.hideReviewParameters|default:\"0\"}\" />\r\n\r\n<div id=\"parameters\" style=\"margin:15px;display:{if $newcomp.hideReviewParameters eq 1}none{else}block{/if};\">\r\n	<table style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td align=\"right\"><div>Comptition Title:</div></td>\r\n		<td><div><b>{$newcomp.title}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Type:</div></td>\r\n		<td><div><b>{$newcomp.type|niceText}, {$newcomp.style}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Term:</div></td>\r\n		<td><div><b>{$newcomp.startDate|date_format2:\"M j, Y\"}</b> to <b>{$newcomp.endDate|date_format2:\"M j, Y\"}</b> ({math equation=\"(b - a) / 86400\" a=$newcomp.startDate|default:\"0\" b=$newcomp.endDate|default:\"0\" assign=\"numDays\"}{$numDays|number_format:\"0\"} days)</div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Jack Pot:</div></td>\r\n		<td><div>{if $newcomp.individualPotAmount}<b>${$newcomp.individualPotAmount|number_format:\"2\"}</b> {if $newcomp.potMethod eq \"Per-competitor Donations\"}(each) {/if}by {/if}<b>{$newcomp.potMethod}</b></div></td>\r\n	</tr>\r\n{if $newcomp.potDescription}\r\n	<tr>\r\n		<td align=\"right\"><div>Jack Pot Description:</div></td>\r\n		<td><div><b>{$newcomp.potDescription}</b></div></td>\r\n	</tr>\r\n{/if}\r\n	<tr>\r\n		<td align=\"right\"><div>Scoring:</div></td>\r\n		<td><div>Based on <b>{$newcomp.scoringMethod}</b> or, in the event of a tie, <b>{$newcomp.tieBreakerMethod}</b></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/start\">Change/Update Your Competition Parameters Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\', \'hideReviewLetter\', \'showHide\');\"><img id=\"letter_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewLetter !== \"0\"}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Invitation Letter:</h2>\r\n\r\n<input type=\"hidden\" id=\"hideReviewLetter\" name=\"newcomp[hideReviewLetter]\" value=\"{if $newcomp.hideReviewLetter !== \"0\"}1{else}0{/if}\" />\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:{if $newcomp.hideReviewLetter !== \"0\"}none{else}block{/if};margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/create-invitation\">Change/Update Your Invitation Letter Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'invitations\', \'hideReviewInvitations\', \'showHide\');\"><img id=\"invitations_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewInvitations}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Who You\'re Inviting:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewInvitations\" name=\"newcomp[hideReviewInvitations]\" value=\"{$newcomp.hideReviewInvitations|default:\"0\"}\" />\r\n\r\n<div id=\"invitations\" style=\"margin:15px;display:{if $newcomp.hideReviewInvitations eq \"1\"}none{else}block{/if};\">\r\n	<table cellpadding=\"3\" style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td><b>Name</b></td>\r\n		<td><b>E-mail Address</b></td>\r\n		<td><b>Relation</b></td>\r\n	</tr>\r\n	{$newcomp.invite.name|@count}\r\n	{section name=\"invites\" loop=$newcomp.invite.name|@count}{assign var=\"x\" value=$smarty.section.invites.iteration}\r\n		{if not ($newcomp.invite.name.$x or $newcomp.invite.email.$x or $newcomp.invite.relation.$x)}{php}continue;{/php}{/if}\r\n	<tr>\r\n		<td>{$newcomp.invite.name.$x}</td>\r\n		<td>{$newcomp.invite.email.$x}</td>\r\n		<td>{$newcomp.invite.relation.$x}</td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/send-invitation#invitations\">Change/Update Your Invitations</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n'),(1940,91,0.75,'smarty','0','moved intro text into a paragraph tag',1088747709,16,'64.85.237.174','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{* display var=$newcomp *}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 1</h1>\r\n<p>In this first step you will select the competition arena, all the detials of your competition, and the type of invitation letter you want to send. Then click \'Next\'</p>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectComp\',\'hideSelectComp\', \'showHide\');\"><img id=\"selectComp_img\" src=\"./img/blank.gif\" width=\"48\" height=\"17\" class=\"showHide_{if $newcomp.hideSelectComp eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Select a Competition Arena:</h2>\r\n<input type=\"hidden\" id=\"hideSelectComp\" name=\"newcomp[hideSelectComp]\" value=\"{$newcomp.hideSelectComp|default:0}\" />\r\n<div id=\"selectComp\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectComp eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div id=\"corporate\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Corporate</h2>\r\n				Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n			</div>\r\n					\r\n			<div id=\"friends\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Family/Friends</h2>\r\n				\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			</div>\r\n				\r\n			<div id=\"partner\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Partner/Spouse</h2>\r\n				Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			</div>\r\n				\r\n			<div id=\"group\" style=\"display:{if $newcomp.type eq \"group\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Group/Club</h2>\r\n				Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"compRadios\">\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"corporateRadio\" value=\"corporate\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'corporateRadio\').checked=\'true\';selectType();return false;\">Corporate</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"friendsRadio\" value=\"friends\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendsRadio\').checked=\'true\';selectType();return false;\">Family / Friends</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"partnerRadio\" value=\"partner\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'partnerRadio\').checked=\'true\';selectType();return false;\">Partner / Spouse</a><!-- <br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"groupRadio\" value=\"group\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'groupRadio\').checked=\'true\';selectType();return false;\">Group / Club</a> -->\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n{assign var=\"includeX\" value=\"true\"}\r\n\r\n{if $newcomp.startDate}\r\n	{assign var=\"startDate\" value=$newcomp.startDate}\r\n{else}\r\n	{assign var=\"startDate\" value=$smarty.now}\r\n{/if}\r\n{if $newcomp.endDate}\r\n	{assign var=\"endDate\" value=$newcomp.endDate}\r\n{else}\r\n	{assign var=\"endDate\" value=$smarty.now|math:\"x+5184000\"}  {* Now + 2 Months *}\r\n{/if}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectParams\',\'hideSelectParams\', \'showHide\');\"><img id=\"selectParams_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectParams eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Competition Details:</h2>\r\n<input type=\"hidden\" id=\"hideSelectParams\" name=\"newcomp[hideSelectParams]\" value=\"{$newcomp.hideSelectParams|default:0}\" />\r\n<div id=\"selectParams\" style=\"margin:10px; display:{if $newcomp.hideSelectParams eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Title:</div></td>\r\n		<td><input type=\"text\" name=\"newcomp[title]\" class=\"textInput\" size=\"22\" maxlength=\"32\" style=\"width:220px;\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Give your competition a title.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Start Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar0\" style=\"float:left; display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n				<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar0\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>End Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar1\" style=\"float:left; display:none; border:#999999 1px solid; width:100px;\" align=\"center\">\r\n				<iframe name=\"frameCalendar2\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=1&year={$endDate|date_format2:\"Y\"}&month={$endDate|date_format2:\"m\"}&day={$endDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[endDateViewable]\" value=\"{if not $newcomp.endDate}Click a Date ^{else}{$newcomp.endDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar1\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[endDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Type:</div></td>\r\n		<td><select name=\"newcomp[style]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Everyone-vs-Everyone\">Everyone vs. Everyone</option>\r\n			<option value=\"Group-vs-Group\">Team vs. Team</option>\r\n			<option value=\"One-on-One\">One on One</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Award Method:</div></td>\r\n		<td><select name=\"newcomp[potMethod]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Per-competitor Donations\">Each competitor Donates</option>\r\n			<option value=\"Individual Charity\">I will supply the prize</option>\r\n			<option value=\"Company Charity\">My Company will supply the prize</option>\r\n			<option value=\"Other-None\">Other-None</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>The Award can be pooled together by everyone, or you can supply it all yourself by selecting \"I will supply the prize\".</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Contribution Amount:</div></td>\r\n		<td valign=\"middle\"><span style=\"position:relative; top:-5px;\">$</span><input type=\"text\" name=\"newcomp[individualPotAmount]\" class=\"textInput\" size=\"4\" maxlength=\"4\" style=\"width:30px;\" /><span style=\"position:relative; top:-5px;\">.00</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Enter the amount that each competitor will need to agree to pay to the winner, or if you are supplying it all yourself, enter that amount! (This amount is not collected by WeightLossWars, it is only displayed to provide motivation)</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Description:</div></td>\r\n		<td valign=\"middle\"><input type=\"text\" name=\"newcomp[potDescription]\" class=\"textInput\" size=\"22\" maxlength=\"255\" style=\"width:220px;\"  /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>(optional) Enter a brief description of the Award.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>The Judging Method:</div></td>\r\n		<td><select name=\"newcomp[scoringMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage of Body Weight Lost</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Tie-Breaker Method:</span></td>\r\n		<td><select name=\"newcomp[tieBreakerMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\"{if not $newcomp.tieBreakerMethod} selected{/if}>Percentage Weight Lost</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined, in the event of a tie.</small></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectInvite\', \'hideSelectInvite\', \'showHide\');\"><img id=\"selectInvite_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectInvite eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Choose an Invitation Style:</h2>\r\n<input type=\"hidden\" id=\"hideSelectInvite\" name=\"newcomp[hideSelectInvite]\" value=\"{$newcomp.hideSelectInvite|default:0}\" />	\r\n<div id=\"selectInvite\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectInvite eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div>\r\n			Select the type of invitation you want to send. You can smack talk them to get their blood boiling, send them a motivating challenge, or a friendly, inspiring invitation.</div>\r\n				\r\n		<div id=\"smack\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">SMACK!</h2>\r\n				<b>example:</b><br /> &quot;Hey Blubber Butt,I challenge you to the battle of all battles...&quot;</div>\r\n			</div>\r\n					\r\n			<div id=\"challenge\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Challenge</h2>\r\n				<b>example:</b><br /> &quot;I\'m putting up $100 that says I can take you down in a 6-week weight-loss competition...&quot;</div>\r\n			</div>\r\n				\r\n			<div id=\"friendly\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Friendly</h2>\r\n				<b>example:</b><br /> &quot;A healthy weight loss challenge is what we all need to lose these extra pounds...&quot;</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"inviteRadios\">\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"smackRadio\" value=\"smack\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'smackRadio\').checked=\'true\';selectInvite();return false;\">SMACK!</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"challengeRadio\" value=\"challenge\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'challengeRadio\').checked=\'true\';selectInvite();return false;\">Challenge</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"friendlyRadio\" value=\"friendly\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendlyRadio\').checked=\'true\';selectInvite();return false;\">Friendly</a>\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" align=\"right\" style=\"margin:0px;\">\r\n	<a href=\"javascript:document.compStartForm.submit();\"><img src=\"{$skinFolder}images/btn_next.gif\" border=\"0\" /></a></div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n\r\n	<script language=\"JavaScript\">{literal}\r\n	function selectType() {\r\n		var type;\r\n		var types = Array(\'corporate\',\'friends\',\'partner\',\'group\');\r\n		var elems = document.getElementsByName(\'newcomp[type]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'friends\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function selectInvite() {\r\n		var type;\r\n		var types = Array(\'smack\',\'challenge\',\'friendly\');\r\n		var elems = document.getElementsByName(\'newcomp[invitationType]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'smack\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function updateScoringMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[scoringMethod]\') ? \'newcomp[tieBreakerMethod]\' : \'newcomp[scoringMethod]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		other.selectedIndex = (obj.selectedIndex == 0) ? 1 : 0;\r\n	}\r\n	\r\n	{/literal}\r\n</script>'),(1941,116,0.49,'smarty','0','added content',1088748165,16,'64.85.237.174','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'makeInvite\', \'hideMakeInvite\', \'showHide\');\"><img id=\"makeInvite_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideMakeInvite eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Create Your Invitation Letter:</h2>\r\n	<input type=\"hidden\" id=\"hideMakeInvite\" name=\"newcomp[hideMakeInvite]\" value=\"{$newcomp.hideMakeInvite|default:\"0\"}\">\r\n<div>	\r\n	In this step you will create an email letter to invite your competitors into your Weight Loss War!<br /><br />\r\n	Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n	<b>\'Create My Own\'</b> below and write your own challenge invitation!  <p>When your email is sent, WeightLossWars will add a link \r\n	at the bottom of your letter that your friends can click to enter your competition. When you are finished with your letter click <b>\'Next\'</b>.</div>\r\n\r\n<div id=\"makeInvite\" style=\"display:{if $newcomp.hideMakeInvite eq 1}none{else}block{/if};\">	\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n		\r\n	<br />\r\n	\r\n	<table>\r\n	<tr>\r\n		<td valign=\"top\"><div>\r\n			<h2 class=\"withBG\">Examples:</h2>\r\n			<div style=\"margin:0px 10px 0px 10px;\">\r\n				{foreach from=$examples key=\"key\" item=\"example\"}\r\n					<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n				{foreachelse}\r\n					Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n				{/foreach}\r\n			</div>\r\n		</div></td>\r\n		<td>\r\n			<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n			<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"500\">\r\n			<tr>\r\n				<td><div>\r\n					{if $madlibs|@count}\r\n						<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n							<option value=\"\">(Select a MadLib)</option>\r\n						{foreach from=$madlibs item=\"madlib\"}\r\n							<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n						{/foreach}\r\n						</select>\r\n					{else}\r\n						No Madlibs Available!\r\n					{/if}\r\n					<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n				</div></td>\r\n			</tr>\r\n			<tr>\r\n				<td align=\"left\">\r\n					<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n						{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n							<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n						{/foreach}\r\n						</div>\r\n	\r\n					<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n						<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" style=\"width:480px;\" class=\"textarea\"></textarea></div>\r\n				</td>\r\n			</tr>\r\n			</table>\r\n		</td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n<br />\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<script language=\"JavaScript\">\r\n	\r\n	var examples = Array();\r\n	{foreach from=$examples key=\"key\" item=\"example\"}\r\n	examples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n	{/foreach}\r\n	\r\n	{literal}\r\n	\r\n	function toggleType(type) {\r\n		if (type == \'customLetter\') {\r\n			document.getElementById(\'customLetter\').style.display = \'block\';\r\n			document.getElementById(\'madlib\').style.display = \'none\';\r\n			document.getElementById(\'letterType\').value = \'customLetter\';\r\n			var madlibsElm = document.getElementById(\'madlibsElement\');\r\n			if (madlibsElm) {\r\n				madlibsElm.selectedIndex = 0;\r\n			}\r\n		} else {\r\n			document.getElementById(\'customLetter\').style.display = \'none\';\r\n			document.getElementById(\'madlib\').style.display = \'block\';\r\n			document.getElementById(\'letterType\').value = \'madlib\';\r\n		}\r\n	}\r\n	\r\n	function setExample(key) {\r\n		toggleType(\'customLetter\');\r\n		var ta = document.getElementById(\'customLetterElement\');\r\n	\r\n		if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n			ta.value = examples[key];\r\n		}\r\n	}\r\n	\r\n	function setMadlib(key) {\r\n		var obj;\r\n		key--;\r\n		toggleType(\'madlib\');	\r\n		for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n			obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n		}\r\n	}\r\n	{/literal}\r\n</script>'),(4344,105,1.27,'php','0','tried to get the new layout on this page but couldn\'t',1127166389,3,'216.194.127.150','<?php\r\n\r\nglobal $SPADE;\r\n\r\nif ($SPADE[\'user\']->isLoggedIn()) {\r\n	$SPADE[\'template\']->assign (\'pgLayout\', \'layouts/withLeftNav.tpl\');\r\n}\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Competition Questions\",\r\n		\"anchor\" => \"comp\",\r\n		\"questions\" => array(\r\n			\"How is the scoring calculated?\",\r\n			\"My weight loss is incorrect! Why?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"This depends on what the scoring method is.<br /><br />If the scoring method is based on a totals-type category, where the winner has the largest (or smallest) sum of one category (such as minutes or distance exercise), then the totals are simply calculated on all entries you placed between (or on) the start date and the end date of the competition.<br /><br />If the competition is based on weight (weight lost or percentage weight lost), the site uses the earliest weight entry for you on or after the start date of the competition. This number is subracted by the weight entry nearest, but not after the competition end date to calculate your weight lost for the competition.<br /><br />The site does not use any weight entries before the start date of the competition as your start weight because it will not assume that your weight was consistent between that time and the start of the competition.<br /><br />We recommend weighing yourself on the starting date of the competition (or as soon as possible after it begins) and making that entry in your weight loss journal.\",\r\n			\"There are many possible reasons for this, but the most common is covered above in \\\"How is the scoring calculated?\\\".<br /><br />It is also possible that you have entered incorrect data, or incorrectly calculated what you think your loss should be; please be careful to make sure your weight loss is indeed incorrectly calculated in a competition before contacting us for help.<br /><br />Another reason your weight loss might not seem correct is that the competition calculation has been cached and has not been updated since you saved entries in your weight loss journal. Please note the \\\"as of MM/DD/YYYY HH:MM A\\\" time at the top of your leader board. Some competitions are only updated manually when the competition creator or a site administrator requests a calculation update. If your competition is considerably out of date, try contacting the creator of the competition, or <a href=\\\"?pg=contact\\\">contact us</a> and let us know.\"\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to select the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"\r\n		)\r\n	),\r\n	\"3\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don\'t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney failure.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, not taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n/*// If you want to make the [0] section active, delete this block!\r\nif (!$SPADE[\'acm\']->isDomainAdmin()) {\r\n	$FAQ[0] = $FAQ[1];\r\n	$FAQ[1] = $FAQ[2];\r\n	$FAQ[2] = $FAQ[3];\r\n	unset($FAQ[3]);\r\n}\r\n//Delete through this line*/\r\n\r\nif ($_SESSION[\'company\'][\'preferences\'][\'hide_competitions\'] == \'yes\') {\r\n	unset ($FAQ[0]);\r\n}\r\n\r\nif ($_SESSION[\'company\'][\'preferences\'][\'hide_home\'] == \'yes\') {\r\n	unset ($FAQ[1]);\r\n}\r\n\r\nif ($_SESSION[\'company\'][\'preferences\'][\'hide_incentives\'] == \'yes\') {\r\n	unset ($FAQ[2]);\r\n}\r\n\r\n?>\r\n\r\n\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { \r\n		if ($x == 0 && $_SESSION[\'company\'][\'preferences\'][\'hide_competitions\'] == \'yes\') continue;\r\n		if ($x == 1 && $_SESSION[\'company\'][\'preferences\'][\'hide_home\'] == \'yes\') continue;\r\n		if ($x == 2 && $_SESSION[\'company\'][\'preferences\'][\'hide_incentives\'] == \'yes\') continue;\r\n	?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { \r\n		if ($x == 0 && $_SESSION[\'company\'][\'preferences\'][\'hide_competitions\'] == \'yes\') continue;\r\n		if ($x == 1 && $_SESSION[\'company\'][\'preferences\'][\'hide_home\'] == \'yes\') continue;\r\n		if ($x == 2 && $_SESSION[\'company\'][\'preferences\'][\'hide_incentives\'] == \'yes\') continue;\r\n	?>\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(2325,91,0.78,'smarty','0','Second draft; added new scoring methods - testing new javascript function.',1098162391,2,'63.164.145.198','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{* display var=$newcomp *}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 1</h1>\r\n<p>In this first step you will select the competition arena, all the detials of your competition, and the type of invitation letter you want to send. Then click \'Next\'</p>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectComp\',\'hideSelectComp\', \'showHide\');\"><img id=\"selectComp_img\" src=\"./img/blank.gif\" width=\"48\" height=\"17\" class=\"showHide_{if $newcomp.hideSelectComp eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Select a Competition Arena:</h2>\r\n<input type=\"hidden\" id=\"hideSelectComp\" name=\"newcomp[hideSelectComp]\" value=\"{$newcomp.hideSelectComp|default:0}\" />\r\n<div id=\"selectComp\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectComp eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div id=\"corporate\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Corporate</h2>\r\n				Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n			</div>\r\n					\r\n			<div id=\"friends\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Family/Friends</h2>\r\n				\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			</div>\r\n				\r\n			<div id=\"partner\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Partner/Spouse</h2>\r\n				Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			</div>\r\n				\r\n			<div id=\"group\" style=\"display:{if $newcomp.type eq \"group\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Group/Club</h2>\r\n				Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"compRadios\">\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"corporateRadio\" value=\"corporate\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'corporateRadio\').checked=\'true\';selectType();return false;\">Corporate</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"friendsRadio\" value=\"friends\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendsRadio\').checked=\'true\';selectType();return false;\">Family / Friends</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"partnerRadio\" value=\"partner\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'partnerRadio\').checked=\'true\';selectType();return false;\">Partner / Spouse</a><!-- <br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"groupRadio\" value=\"group\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'groupRadio\').checked=\'true\';selectType();return false;\">Group / Club</a> -->\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n{assign var=\"includeX\" value=\"true\"}\r\n\r\n{if $newcomp.startDate}\r\n	{assign var=\"startDate\" value=$newcomp.startDate}\r\n{else}\r\n	{assign var=\"startDate\" value=$smarty.now}\r\n{/if}\r\n{if $newcomp.endDate}\r\n	{assign var=\"endDate\" value=$newcomp.endDate}\r\n{else}\r\n	{assign var=\"endDate\" value=$smarty.now|math:\"x+5184000\"}  {* Now + 2 Months *}\r\n{/if}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectParams\',\'hideSelectParams\', \'showHide\');\"><img id=\"selectParams_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectParams eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Competition Details:</h2>\r\n<input type=\"hidden\" id=\"hideSelectParams\" name=\"newcomp[hideSelectParams]\" value=\"{$newcomp.hideSelectParams|default:0}\" />\r\n<div id=\"selectParams\" style=\"margin:10px; display:{if $newcomp.hideSelectParams eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Title:</div></td>\r\n		<td><input type=\"text\" name=\"newcomp[title]\" class=\"textInput\" size=\"22\" maxlength=\"32\" style=\"width:220px;\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Give your competition a title.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Start Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar0\" style=\"float:left; display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n				<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar0\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>End Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar1\" style=\"float:left; display:none; border:#999999 1px solid; width:100px;\" align=\"center\">\r\n				<iframe name=\"frameCalendar2\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=1&year={$endDate|date_format2:\"Y\"}&month={$endDate|date_format2:\"m\"}&day={$endDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[endDateViewable]\" value=\"{if not $newcomp.endDate}Click a Date ^{else}{$newcomp.endDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar1\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[endDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Type:</div></td>\r\n		<td><select name=\"newcomp[style]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Everyone-vs-Everyone\">Belly to Belly</option>\r\n			<option value=\"Group-vs-Group\">Team vs. Team</option>\r\n			<option value=\"One-on-One\">One on One</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Award Method:</div></td>\r\n		<td><select name=\"newcomp[potMethod]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Per-competitor Donations\">Each competitor Donates</option>\r\n			<option value=\"Individual Charity\">I will supply the prize</option>\r\n			<option value=\"Company Charity\">My Company will supply the prize</option>\r\n			<option value=\"Other-None\">Other-None</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>The Award can be pooled together by everyone, or you can supply it all yourself by selecting \"I will supply the prize\".</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Contribution Amount:</div></td>\r\n		<td valign=\"middle\"><span style=\"position:relative; top:-5px;\">$</span><input type=\"text\" name=\"newcomp[individualPotAmount]\" class=\"textInput\" size=\"4\" maxlength=\"4\" style=\"width:30px;\" /><span style=\"position:relative; top:-5px;\">.00</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Enter the amount that each competitor will need to agree to pay to the winner, or if you are supplying it all yourself, enter that amount! (This amount is not collected by WeightLossWars, it is only displayed to provide motivation)</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Description:</div></td>\r\n		<td valign=\"middle\"><input type=\"text\" name=\"newcomp[potDescription]\" class=\"textInput\" size=\"22\" maxlength=\"255\" style=\"width:220px;\"  /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>(optional) Enter a brief description of the Award.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>The Judging Method:</div></td>\r\n		<td><select name=\"newcomp[scoringMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage of Body Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Tie-Breaker Method:</span></td>\r\n		<td><select name=\"newcomp[tieBreakerMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\"{if not $newcomp.tieBreakerMethod} selected{/if}>Percentage Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined, in the event of a tie.</small></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectInvite\', \'hideSelectInvite\', \'showHide\');\"><img id=\"selectInvite_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectInvite eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Choose an Invitation Style:</h2>\r\n<input type=\"hidden\" id=\"hideSelectInvite\" name=\"newcomp[hideSelectInvite]\" value=\"{$newcomp.hideSelectInvite|default:0}\" />	\r\n<div id=\"selectInvite\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectInvite eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div>\r\n			Select the type of invitation you want to send. You can smack talk them to get their blood boiling, send them a motivating challenge, or a friendly, inspiring invitation.</div>\r\n				\r\n		<div id=\"smack\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">SMACK!</h2>\r\n				<b>example:</b><br /> &quot;Hey Blubber Butt,I challenge you to the battle of all battles...&quot;</div>\r\n			</div>\r\n					\r\n			<div id=\"challenge\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Challenge</h2>\r\n				<b>example:</b><br /> &quot;I\'m putting up $100 that says I can take you down in a 6-week weight-loss competition...&quot;</div>\r\n			</div>\r\n				\r\n			<div id=\"friendly\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Friendly</h2>\r\n				<b>example:</b><br /> &quot;A healthy weight loss challenge is what we all need to lose these extra pounds...&quot;</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"inviteRadios\">\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"smackRadio\" value=\"smack\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'smackRadio\').checked=\'true\';selectInvite();return false;\">SMACK!</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"challengeRadio\" value=\"challenge\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'challengeRadio\').checked=\'true\';selectInvite();return false;\">Challenge</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"friendlyRadio\" value=\"friendly\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendlyRadio\').checked=\'true\';selectInvite();return false;\">Friendly</a>\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" align=\"right\" style=\"margin:0px;\">\r\n	<a href=\"javascript:document.compStartForm.submit();\"><img src=\"{$skinFolder}images/btn_next.gif\" border=\"0\" /></a></div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n\r\n	<script language=\"JavaScript\">{literal}\r\n	function selectType() {\r\n		var type;\r\n		var types = Array(\'corporate\',\'friends\',\'partner\',\'group\');\r\n		var elems = document.getElementsByName(\'newcomp[type]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'friends\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function selectInvite() {\r\n		var type;\r\n		var types = Array(\'smack\',\'challenge\',\'friendly\');\r\n		var elems = document.getElementsByName(\'newcomp[invitationType]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'smack\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function updateScoringMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[scoringMethod]\') ? \'newcomp[tieBreakerMethod]\' : \'newcomp[scoringMethod]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		if (obj.selectedIndex == other.selectedIndex) {\r\n			if (obj.selectedIndex == 0) {\r\n				other.selectedIndex = 1;\r\n			} else {\r\n				other.selectedIndex = 0;\r\n			}\r\n		}		\r\n	}\r\n	\r\n	{/literal}\r\n</script>'),(2340,1,2.76,'smarty','0','Fixing previous fix :)',1098289082,16,'128.187.254.17','{if $user->isLoggedIn()}\r\n 	{content_guide name=\"loggedInWelcome\" title=\"Welcome, If User Is Logged In\" cols=\"100\" rows=\"15\"}<h2>Welcome <em>{$user->firstName}</em>,</h2>\r\n<br />\r\nClick on <b>\'My Home\'</b> to monitor and record your weight loss progress from your personal home page.\r\n<br /><br />\r\n\r\n<b>Are you ready to Compete?</b> Now that you\'re a member you can put your weight loss efforts to the test by creating a competition below.\r\nSelect an Arena below to start a weight loss competition and discover just how much fun losing weight can be.\r\n<br />	\r\n<div class=\"pixel underline\">&nbsp;</div>\r\n<br />	{/content_guide}\r\n\r\n{else} \r\n\r\n	{content_guide name=\"loggedOutWelcome\" title=\"Welcome, If User is NOT Logged In\" cols=\"100\" rows=\"15\"}<h1>Create Your Own Challenge</h1>\r\n<div class=\"pixel underline\">&nbsp;</div>\r\n\r\n\r\nCreate a weight loss or exercise competition against your family or friends.  Find out if you have what it takes to be the bigger loser!<br /><br />\r\n<div align=\"right\"><a href=\"?pg=newcomp/start\" class=\"button\">Start your competition.</a></div>\r\n<br />\r\n\r\n\r\n<h2 class=\"withBG\">START a competition below!</h2>\r\nSelect an Arena below to create a <u>Weight Loss War!</u> and discover just how much fun losing weight can be.<br />\r\n<br />	{/content_guide}\r\n{/if}\r\n\r\n<form name=\"compTypeForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"newcomp/start\">\r\n<input type=\"hidden\" name=\"noExpire\" value=\"true\">\r\n<input type=\"hidden\" name=\"newcomp[type]\" id=\"newcompType\" value=\"\">\r\n\r\n<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>\r\n\r\n		<div id=\"chunk_1\" class=\"chunk\">\r\n			<h2 class=\"withBG\">Corporate</h2>\r\n			<a href=\"javascript://\" onclick=\"document.getElementById(\'newcompType\').value=\'corporate\';compTypeForm.submit();return false;\">\r\n			<img src=\"{$skinFolder}images/icon_money_sm.gif\" width=\"100\" height=\"100\" class=\"icon\" style=\"border:0px;\" /><br />\r\n			<img src=\"{$skinFolder}images/btn_clickHere.gif\" border=\"0\" alt=\"Click here\"/></a><br />\r\n			Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n		\r\n		<div id=\"chunk_2\" class=\"chunk\">\r\n			<h2 class=\"withBG\">Family/Friends</h2>\r\n			<a href=\"javascript://\" onclick=\"document.getElementById(\'newcompType\').value=\'friends\';compTypeForm.submit();return false;\">\r\n			<img src=\"{$skinFolder}images/icon_family_sm.gif\" width=\"100\" height=\"100\" class=\"icon\" style=\"border:0px;\"  /><br />\r\n			<img src=\"{$skinFolder}images/btn_clickHere.gif\" border=\"0\" alt=\"Click here\"/></a><br />\r\n			\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			\r\n		<div id=\"chunk_3\" class=\"chunk\">\r\n			<h2 class=\"withBG\">Partner/Spouse</h2>\r\n			<a href=\"javascript://\" onclick=\"document.getElementById(\'newcompType\').value=\'partner\';compTypeForm.submit();return false;\">\r\n			<img src=\"{$skinFolder}images/icon_weights_sm.gif\" width=\"100\" height=\"100\" class=\"icon\" style=\"border:0px;\"  /><br />\r\n			<img src=\"{$skinFolder}images/btn_clickHere.gif\" border=\"0\" alt=\"Click here\"/></a><br />\r\n			 Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			\r\n		{* <div id=\"chunk_4\" class=\"chunk\">\r\n			<h2 class=\"withBG\">Group/Club</h2>\r\n			<a href=\"javascript://\" onclick=\"document.getElementById(\'newcompType\').value=\'group\';compTypeForm.submit();return false;\">\r\n			<img src=\"{$skinFolder}images/icon_alert_sm.gif\" width=\"100\" height=\"100\" class=\"icon\" style=\"border:0px;\"  /><br />\r\n			<img src=\"{$skinFolder}images/btn_clickHere.gif\" border=\"0\" alt=\"Click here\"/></a><br />\r\n			 Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n		*}\r\n\r\n</td></tr>\r\n<tr><td>\r\n		<div id=\"homeNavigator\" class=\"hBox\" style=\"margin:5px 6px;text-align:right;margin-right:0px;\">\r\n			<a href=\"?pg=howitworks\" class=\"link\">How It All Works</a> | \r\n			{if $user->isLoggedIn()}<a href=\"?pg=myhome\" class=\"link\">Go to My Home</a>{else}<a href=\"?pg=signup/begin\" class=\"link\">Sign Up Now</a>{/if}</div>\r\n\r\n</td></tr></table>\r\n\r\n</form>'),(2329,1,2.74,'smarty','0','Fixing previous fix :)',1098253431,16,'128.187.244.239','{if $user->isLoggedIn()}\r\n 	{content_guide name=\"loggedInWelcome\" title=\"Welcome, If User Is Logged In\" cols=\"100\" rows=\"15\"}<h2>Welcome <em>{$user->firstName}</em>,</h2>\r\n<br />\r\nClick on <b>\'My Home\'</b> to monitor and record your weight loss progress from your personal home page.\r\n<br /><br />\r\n\r\n<b>Are you ready to Compete?</b> Now that you\'re a member you can put your weight loss efforts to the test by creating a competition below.\r\nSelect an Arena below to start a weight loss competition and discover just how much fun losing weight can be.\r\n<br />	\r\n<div class=\"pixel underline\">&nbsp;</div>\r\n<br />	{/content_guide}\r\n\r\n{else} \r\n\r\n	{content_guide name=\"loggedOutWelcome\" title=\"Welcome, If User is NOT Logged In\" cols=\"100\" rows=\"15\"}<h1>Need Motivation?</h1>\r\n<div class=\"pixel underline\">&nbsp;</div>\r\n\r\n\r\nCreate a weight loss or exercise competition against your family or friends.  Find out if you have what it takes to be the bigger loser!<br /><br />\r\n<div align=\"right\"><a href=\"?pg=newcomp/start\" class=\"button\">Start your competition.</a></div>\r\n<br />\r\n\r\n\r\n<h2 class=\"withBG\">START a competition below!</h2>\r\nSelect an Arena below to create a <u>Weight Loss War!</u> and discover just how much fun losing weight can be.<br />\r\n<br />	{/content_guide}\r\n{/if}\r\n\r\n<form name=\"compTypeForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"newcomp/start\">\r\n<input type=\"hidden\" name=\"noExpire\" value=\"true\">\r\n<input type=\"hidden\" name=\"newcomp[type]\" id=\"newcompType\" value=\"\">\r\n\r\n<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>\r\n\r\n		<div id=\"chunk_1\" class=\"chunk\">\r\n			<h2 class=\"withBG\">Corporate</h2>\r\n			<a href=\"javascript://\" onclick=\"document.getElementById(\'newcompType\').value=\'corporate\';compTypeForm.submit();return false;\">\r\n			<img src=\"{$skinFolder}images/icon_money_sm.gif\" width=\"100\" height=\"100\" class=\"icon\" style=\"border:0px;\" /><br />\r\n			<img src=\"{$skinFolder}images/btn_clickHere.gif\" border=\"0\" alt=\"Click here\"/></a><br />\r\n			Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n		\r\n		<div id=\"chunk_2\" class=\"chunk\">\r\n			<h2 class=\"withBG\">Family/Friends</h2>\r\n			<a href=\"javascript://\" onclick=\"document.getElementById(\'newcompType\').value=\'friends\';compTypeForm.submit();return false;\">\r\n			<img src=\"{$skinFolder}images/icon_family_sm.gif\" width=\"100\" height=\"100\" class=\"icon\" style=\"border:0px;\"  /><br />\r\n			<img src=\"{$skinFolder}images/btn_clickHere.gif\" border=\"0\" alt=\"Click here\"/></a><br />\r\n			\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			\r\n		<div id=\"chunk_3\" class=\"chunk\">\r\n			<h2 class=\"withBG\">Partner/Spouse</h2>\r\n			<a href=\"javascript://\" onclick=\"document.getElementById(\'newcompType\').value=\'partner\';compTypeForm.submit();return false;\">\r\n			<img src=\"{$skinFolder}images/icon_weights_sm.gif\" width=\"100\" height=\"100\" class=\"icon\" style=\"border:0px;\"  /><br />\r\n			<img src=\"{$skinFolder}images/btn_clickHere.gif\" border=\"0\" alt=\"Click here\"/></a><br />\r\n			 Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			\r\n		{* <div id=\"chunk_4\" class=\"chunk\">\r\n			<h2 class=\"withBG\">Group/Club</h2>\r\n			<a href=\"javascript://\" onclick=\"document.getElementById(\'newcompType\').value=\'group\';compTypeForm.submit();return false;\">\r\n			<img src=\"{$skinFolder}images/icon_alert_sm.gif\" width=\"100\" height=\"100\" class=\"icon\" style=\"border:0px;\"  /><br />\r\n			<img src=\"{$skinFolder}images/btn_clickHere.gif\" border=\"0\" alt=\"Click here\"/></a><br />\r\n			 Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n		*}\r\n\r\n</td></tr>\r\n<tr><td>\r\n		<div id=\"homeNavigator\" class=\"hBox\" style=\"margin:5px 6px;text-align:right;margin-right:0px;\">\r\n			<a href=\"?pg=howitworks\" class=\"link\">How It All Works</a> | \r\n			{if $user->isLoggedIn()}<a href=\"?pg=myhome\" class=\"link\">Go to My Home</a>{else}<a href=\"?pg=signup/begin\" class=\"link\">Sign Up Now</a>{/if}</div>\r\n\r\n</td></tr></table>\r\n\r\n</form>'),(2351,166,0.12,'php','1','Page created.',1098291932,3,'24.10.224.224','<?php echo stripslashes($_POST[\'mailBody\']); exit(); ?>'),(2378,165,0.41,'smarty','0','Page created.',1098318577,3,'24.10.224.224','{if $smarty.request.fromEmail neq \"\"}{include_php file=\"shared_handle:multiMail\"}{/if}\r\n{assign var=\"hideWidgets\" value=\"true\"}\r\n\r\n{select_query assign=\"aGroups\" return=\"array\"}\r\n	name, description from _groups\r\n{/select_query}\r\n \r\n<h1 class=\"underline\">Broadcast an Email</h1>\r\n<br />\r\n\r\n<form name=\"emailForm\" method=\"post\" action=\"index.php\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"sendEmail\"> \r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div style=\"width:900px;\">{assign var=\"userName\" value=\"`$user->firstName` `$user->lastName`\"}\r\n<b>From Name:&nbsp;</b><input type=\"text\" name=\"fromName\" value=\"{$smarty.request.fromName|stripslashes|default:$userName}\" /> &nbsp; \r\n<b>From Email:&nbsp;</b><input type=\"text\" name=\"fromEmail\" value=\"{$smarty.request.fromEmail|default:$user->email}\" /><br />\r\n<b>Subject Line:&nbsp;</b><input type=\"text\" name=\"mailSubject\" value=\"{$smarty.request.mailSubject|stripslashes}\" style=\"width:200px;\" /><br /><br />\r\n\r\n<b>Select the Email Groups:</b> <small>(hold <b>CTRL</b> key)</small><br />\r\n<select name=\"toGroups[]\" multiple>{foreach from=$aGroups item=\"row\"}\r\n	<option value=\"{$row.name}\">{$row.name} - {$row.description}</option>{/foreach}\r\n</select><br />\r\n<small><em>* Will not send message to addresses in the OPT-OUT database table.</em></small><br /><br />\r\n\r\n<b>Enter Additional Email Addresses: <small>(comma delimited)</small></b>\r\n<textarea style=\"width:900px;display:block;\" name=\"toAddresses\"></textarea>\r\n<small><em>* These addresses are not checked against the OPT-OUT database table.</em></small><br />\r\n\r\n<b>Enter Plain Text Message Body:</b>\r\n<textarea style=\"width:900px;display:block;height:200px;\" name=\"plainText\">{$smarty.request.plainText|stripslashes}</textarea><br />\r\n\r\n<b>Enter/Paste HTML Message Body:</b>\r\n<textarea style=\"width:900px;display:block;height:200px;\" name=\"mailBody\">{$smarty.request.mailBody|stripslashes}</textarea><br />\r\n\r\n<div style=\"text-align:right;\"><input type=\"button\" value=\"Preview HTML\" onclick=\"previewHTML()\"><input type=\"submit\" name=\"submit\" value=\"Send Now\" /></div>\r\n</div>\r\n\r\n</form>\r\n\r\n<form name=\"previewForm\" method=\"post\" action=\"index.php\">\r\n<input type=\"hidden\" name=\"pg\" value=\"multiEmail/preview\">\r\n<input type=\"hidden\" name=\"mailBody\" value=\"\">\r\n</form>\r\n\r\n<script language=\"javascript\">{literal}\r\nfunction previewHTML() {\r\n	dF = document.previewForm;\r\n	dF.mailBody.value = document.emailForm.mailBody.value;	\r\n\r\n	webPreview = parent.window.open(\"index.php?pg=multiEmail/preview\", \"webPreview\", \"fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=no,width=640,height=480,left=10,top=10\");\r\n	dF.target = \'webPreview\';\r\n	dF.submit();\r\n	webPreview.focus();\r\n}\r\n{/literal}</script>'),(2469,91,0.80,'smarty','0','Adding weekly winners category selection',1100648548,2,'144.35.86.125','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{* display var=$newcomp *}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 1</h1>\r\n<p>In this first step you will select the competition arena, all the detials of your competition, and the type of invitation letter you want to send. Then click \'Next\'</p>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectComp\',\'hideSelectComp\', \'showHide\');\"><img id=\"selectComp_img\" src=\"./img/blank.gif\" width=\"48\" height=\"17\" class=\"showHide_{if $newcomp.hideSelectComp eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Select a Competition Arena:</h2>\r\n<input type=\"hidden\" id=\"hideSelectComp\" name=\"newcomp[hideSelectComp]\" value=\"{$newcomp.hideSelectComp|default:0}\" />\r\n<div id=\"selectComp\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectComp eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div id=\"corporate\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Corporate</h2>\r\n				Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n			</div>\r\n					\r\n			<div id=\"friends\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Family/Friends</h2>\r\n				\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			</div>\r\n				\r\n			<div id=\"partner\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Partner/Spouse</h2>\r\n				Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			</div>\r\n				\r\n			<div id=\"group\" style=\"display:{if $newcomp.type eq \"group\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Group/Club</h2>\r\n				Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"compRadios\">\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"corporateRadio\" value=\"corporate\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'corporateRadio\').checked=\'true\';selectType();return false;\">Corporate</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"friendsRadio\" value=\"friends\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendsRadio\').checked=\'true\';selectType();return false;\">Family / Friends</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"partnerRadio\" value=\"partner\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'partnerRadio\').checked=\'true\';selectType();return false;\">Partner / Spouse</a><!-- <br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"groupRadio\" value=\"group\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'groupRadio\').checked=\'true\';selectType();return false;\">Group / Club</a> -->\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n{assign var=\"includeX\" value=\"true\"}\r\n\r\n{if $newcomp.startDate}\r\n	{assign var=\"startDate\" value=$newcomp.startDate}\r\n{else}\r\n	{assign var=\"startDate\" value=$smarty.now}\r\n{/if}\r\n{if $newcomp.endDate}\r\n	{assign var=\"endDate\" value=$newcomp.endDate}\r\n{else}\r\n	{assign var=\"endDate\" value=$smarty.now|math:\"x+5184000\"}  {* Now + 2 Months *}\r\n{/if}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectParams\',\'hideSelectParams\', \'showHide\');\"><img id=\"selectParams_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectParams eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Competition Details:</h2>\r\n<input type=\"hidden\" id=\"hideSelectParams\" name=\"newcomp[hideSelectParams]\" value=\"{$newcomp.hideSelectParams|default:0}\" />\r\n<div id=\"selectParams\" style=\"margin:10px; display:{if $newcomp.hideSelectParams eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Title:</div></td>\r\n		<td><input type=\"text\" name=\"newcomp[title]\" class=\"textInput\" size=\"22\" maxlength=\"32\" style=\"width:220px;\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Give your competition a title.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Start Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar0\" style=\"float:left; display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n				<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar0\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>End Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar1\" style=\"float:left; display:none; border:#999999 1px solid; width:100px;\" align=\"center\">\r\n				<iframe name=\"frameCalendar2\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=1&year={$endDate|date_format2:\"Y\"}&month={$endDate|date_format2:\"m\"}&day={$endDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[endDateViewable]\" value=\"{if not $newcomp.endDate}Click a Date ^{else}{$newcomp.endDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar1\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[endDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Type:</div></td>\r\n		<td><select name=\"newcomp[style]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Everyone-vs-Everyone\">Belly to Belly</option>\r\n			<option value=\"Group-vs-Group\">Team vs. Team</option>\r\n			<option value=\"One-on-One\">One on One</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Award Method:</div></td>\r\n		<td><select name=\"newcomp[potMethod]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Per-competitor Donations\">Each competitor Donates</option>\r\n			<option value=\"Individual Charity\">I will supply the prize</option>\r\n			<option value=\"Company Charity\">My Company will supply the prize</option>\r\n			<option value=\"Other-None\">Other-None</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>The Award can be pooled together by everyone, or you can supply it all yourself by selecting \"I will supply the prize\".</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Contribution Amount:</div></td>\r\n		<td valign=\"middle\"><span style=\"position:relative; top:-5px;\">$</span><input type=\"text\" name=\"newcomp[individualPotAmount]\" class=\"textInput\" size=\"4\" maxlength=\"4\" style=\"width:30px;\" /><span style=\"position:relative; top:-5px;\">.00</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Enter the amount that each competitor will need to agree to pay to the winner, or if you are supplying it all yourself, enter that amount! (This amount is not collected by WeightLossWars, it is only displayed to provide motivation)</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Description:</div></td>\r\n		<td valign=\"middle\"><input type=\"text\" name=\"newcomp[potDescription]\" class=\"textInput\" size=\"22\" maxlength=\"255\" style=\"width:220px;\"  /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>(optional) Enter a brief description of the Award.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>The Judging Method:</div></td>\r\n		<td><select name=\"newcomp[scoringMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage of Body Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Tie-Breaker Method:</span></td>\r\n		<td><select name=\"newcomp[tieBreakerMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\"{if not $newcomp.tieBreakerMethod} selected{/if}>Percentage Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined, in the event of a tie.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Weekly Winners Method 1:</div></td>\r\n		<td><select name=\"newcomp[weeklyWinnersMethod1]\" size=\"1\" onchange=\"updateWeeklyWinnersMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"\">-- None --</option>\r\n			<option value=\"Weight Lost\"{if not $newcomp.weeklyWinnersMethod1} selected{/if}>Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage of Body Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Weekly winners will be displayed, based on this stat.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Weekly Winners Method 2:</span></td>\r\n		<td><select name=\"newcomp[weeklyWinnersMethod2]\" size=\"1\" onchange=\"updateWeeklyWinnersMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"\">-- None --</option>\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage Weight Lost</option>\r\n			<option value=\"Minutes Exercise\"{if not $newcomp.weeklyWinnersMethod2} selected{/if}>Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Additional weekly winners category.</small></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectInvite\', \'hideSelectInvite\', \'showHide\');\"><img id=\"selectInvite_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectInvite eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Choose an Invitation Style:</h2>\r\n<input type=\"hidden\" id=\"hideSelectInvite\" name=\"newcomp[hideSelectInvite]\" value=\"{$newcomp.hideSelectInvite|default:0}\" />	\r\n<div id=\"selectInvite\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectInvite eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div>\r\n			Select the type of invitation you want to send. You can smack talk them to get their blood boiling, send them a motivating challenge, or a friendly, inspiring invitation.</div>\r\n				\r\n		<div id=\"smack\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">SMACK!</h2>\r\n				<b>example:</b><br /> &quot;Hey Blubber Butt,I challenge you to the battle of all battles...&quot;</div>\r\n			</div>\r\n					\r\n			<div id=\"challenge\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Challenge</h2>\r\n				<b>example:</b><br /> &quot;I\'m putting up $100 that says I can take you down in a 6-week weight-loss competition...&quot;</div>\r\n			</div>\r\n				\r\n			<div id=\"friendly\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Friendly</h2>\r\n				<b>example:</b><br /> &quot;A healthy weight loss challenge is what we all need to lose these extra pounds...&quot;</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"inviteRadios\">\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"smackRadio\" value=\"smack\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'smackRadio\').checked=\'true\';selectInvite();return false;\">SMACK!</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"challengeRadio\" value=\"challenge\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'challengeRadio\').checked=\'true\';selectInvite();return false;\">Challenge</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"friendlyRadio\" value=\"friendly\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendlyRadio\').checked=\'true\';selectInvite();return false;\">Friendly</a>\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" align=\"right\" style=\"margin:0px;\">\r\n	<a href=\"javascript:document.compStartForm.submit();\"><img src=\"{$skinFolder}images/btn_next.gif\" border=\"0\" /></a></div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n\r\n	<script language=\"JavaScript\">{literal}\r\n	function selectType() {\r\n		var type;\r\n		var types = Array(\'corporate\',\'friends\',\'partner\',\'group\');\r\n		var elems = document.getElementsByName(\'newcomp[type]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'friends\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function selectInvite() {\r\n		var type;\r\n		var types = Array(\'smack\',\'challenge\',\'friendly\');\r\n		var elems = document.getElementsByName(\'newcomp[invitationType]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'smack\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function updateScoringMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[scoringMethod]\') ? \'newcomp[tieBreakerMethod]\' : \'newcomp[scoringMethod]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		if (obj.selectedIndex == other.selectedIndex) {\r\n			if (obj.selectedIndex == 0) {\r\n				other.selectedIndex = 1;\r\n			} else {\r\n				other.selectedIndex = 0;\r\n			}\r\n		}		\r\n	}\r\n	\r\n	function updateWeeklyWinnersMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[weeklyWinnersMethod1]\') ? \'newcomp[weeklyWinnersMethod2]\' : \'newcomp[weeklyWinnersMethod1]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		if (obj.selectedIndex == other.selectedIndex) {\r\n			if (obj.selectedIndex == 0) {\r\n				other.selectedIndex = 1;\r\n			} else {\r\n				other.selectedIndex = 0;\r\n			}\r\n		}\r\n\r\n		if (name == \'newcomp[weeklyWinnersMethod2]\' && obj.selectedIndex > 0 && other.selectedIndex == 0) {\r\n			other.selectedIndex = obj.selectedIndex;\r\n			obj.selectedIndex = 0;\r\n		}		\r\n	}\r\n	\r\n	{/literal}\r\n</script>'),(2472,117,0.35,'smarty','0','Added display of weekly winners methods.',1100649037,2,'144.35.86.125','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n{include_php file=\"shared_handle:newcomp.review\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Review</h1>\r\n\r\n	{toc_prev assign=\"prev\"}\r\n	{if not $competitionErrors}\r\n		{toc_next assign=\"next\"}\r\n	{/if}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div>\r\n	<br />\r\n	You are almost done! Before sending off your invitations,\r\n	please review each item below to make sure everything is correct and then click \'Next\'.\r\n</div>\r\n\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'parameters\', \'hideReviewParameters\', \'showHide\');\"><img id=\"parameters_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewParameters}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Competition Details:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewParameters\" name=\"newcomp[hideReviewParameters]\" value=\"{$newcomp.hideReviewParameters|default:\"0\"}\" />\r\n\r\n<div id=\"parameters\" style=\"margin:15px;display:{if $newcomp.hideReviewParameters eq 1}none{else}block{/if};\">\r\n	<table style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td align=\"right\"><div>Comptition Title:</div></td>\r\n		<td><div><b>{$newcomp.title}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Type:</div></td>\r\n		<td><div><b>{$newcomp.type|niceText}, {$newcomp.style}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Term:</div></td>\r\n		<td><div><b>{$newcomp.startDate|date_format2:\"M j, Y\"}</b> to <b>{$newcomp.endDate|date_format2:\"M j, Y\"}</b> ({math equation=\"(b - a) / 86400\" a=$newcomp.startDate|default:\"0\" b=$newcomp.endDate|default:\"0\" assign=\"numDays\"}{$numDays|number_format:\"0\"} days)</div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Award:</div></td>\r\n		<td><div>{if $newcomp.individualPotAmount}<b>${$newcomp.individualPotAmount|number_format:\"2\"}</b> {if $newcomp.potMethod eq \"Per-competitor Donations\"}(each) {/if}by {/if}<b>{$newcomp.potMethod}</b></div></td>\r\n	</tr>\r\n{if $newcomp.potDescription}\r\n	<tr>\r\n		<td align=\"right\"><div>Award Description:</div></td>\r\n		<td><div><b>{$newcomp.potDescription}</b></div></td>\r\n	</tr>\r\n{/if}\r\n	<tr>\r\n		<td align=\"right\"><div>Scoring:</div></td>\r\n		<td><div>Based on <b>{$newcomp.scoringMethod}</b> or, in the event of a tie, <b>{$newcomp.tieBreakerMethod}</b></div></td>\r\n	</tr>\r\n{if $newcomp.weeklyWinnersMethod1}\r\n	<tr>\r\n		<td align=\"right\"><div>Weekly Winners:</div></td>\r\n		<td><div>Based on <b>{$newcomp.weeklyWinnersMethod1}</b>{if $newcomp.weeklyWinnersMethod2} and <b>{$newcomp.tieBreakerMethod}</b>{/if}</div></td>\r\n	</tr>\r\n{/if}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/start\">To change any of the above details click here</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\', \'hideReviewLetter\', \'showHide\');\"><img id=\"letter_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewLetter !== \"0\"}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Invitation Letter:</h2>\r\n\r\n<input type=\"hidden\" id=\"hideReviewLetter\" name=\"newcomp[hideReviewLetter]\" value=\"{if $newcomp.hideReviewLetter !== \"0\"}1{else}0{/if}\" />\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:{if $newcomp.hideReviewLetter !== \"0\"}none{else}block{/if};margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/create-invitation\">To change your Invitation Letter click here</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'invitations\', \'hideReviewInvitations\', \'showHide\');\"><img id=\"invitations_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewInvitations}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Who You\'re Inviting:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewInvitations\" name=\"newcomp[hideReviewInvitations]\" value=\"{$newcomp.hideReviewInvitations|default:\"0\"}\" />\r\n\r\n<div id=\"invitations\" style=\"margin:15px;display:{if $newcomp.hideReviewInvitations eq \"1\"}none{else}block{/if};\">\r\n	<table cellpadding=\"3\" style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td><b>Name</b></td>\r\n		<td><b>E-mail Address</b></td>\r\n		<td><b>Relation</b></td>\r\n	</tr>\r\n	{section name=\"invites\" loop=$newcomp.invite.name|@count}{assign var=\"x\" value=$smarty.section.invites.iteration}\r\n		{if not ($newcomp.invite.name.$x or $newcomp.invite.email.$x or $newcomp.invite.relation.$x)}{php}continue;{/php}{/if}\r\n	<tr>\r\n		<td>{$newcomp.invite.name.$x}</td>\r\n		<td>{$newcomp.invite.email.$x}</td>\r\n		<td>{$newcomp.invite.relation.$x}</td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/send-invitation#invitations\">To change who you are inviting click here</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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}<a href=\"?pg={$next.pageName}\"><img src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\"></a>{/if}	\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n'),(2473,117,0.36,'smarty','0','Added display of weekly winners methods.',1100649072,2,'144.35.86.125','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n{include_php file=\"shared_handle:newcomp.review\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Review</h1>\r\n\r\n	{toc_prev assign=\"prev\"}\r\n	{if not $competitionErrors}\r\n		{toc_next assign=\"next\"}\r\n	{/if}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div>\r\n	<br />\r\n	You are almost done! Before sending off your invitations,\r\n	please review each item below to make sure everything is correct and then click \'Next\'.\r\n</div>\r\n\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'parameters\', \'hideReviewParameters\', \'showHide\');\"><img id=\"parameters_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewParameters}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Competition Details:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewParameters\" name=\"newcomp[hideReviewParameters]\" value=\"{$newcomp.hideReviewParameters|default:\"0\"}\" />\r\n\r\n<div id=\"parameters\" style=\"margin:15px;display:{if $newcomp.hideReviewParameters eq 1}none{else}block{/if};\">\r\n	<table style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td align=\"right\"><div>Comptition Title:</div></td>\r\n		<td><div><b>{$newcomp.title}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Type:</div></td>\r\n		<td><div><b>{$newcomp.type|niceText}, {$newcomp.style}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Term:</div></td>\r\n		<td><div><b>{$newcomp.startDate|date_format2:\"M j, Y\"}</b> to <b>{$newcomp.endDate|date_format2:\"M j, Y\"}</b> ({math equation=\"(b - a) / 86400\" a=$newcomp.startDate|default:\"0\" b=$newcomp.endDate|default:\"0\" assign=\"numDays\"}{$numDays|number_format:\"0\"} days)</div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Award:</div></td>\r\n		<td><div>{if $newcomp.individualPotAmount}<b>${$newcomp.individualPotAmount|number_format:\"2\"}</b> {if $newcomp.potMethod eq \"Per-competitor Donations\"}(each) {/if}by {/if}<b>{$newcomp.potMethod}</b></div></td>\r\n	</tr>\r\n{if $newcomp.potDescription}\r\n	<tr>\r\n		<td align=\"right\"><div>Award Description:</div></td>\r\n		<td><div><b>{$newcomp.potDescription}</b></div></td>\r\n	</tr>\r\n{/if}\r\n	<tr>\r\n		<td align=\"right\"><div>Scoring:</div></td>\r\n		<td><div>Based on <b>{$newcomp.scoringMethod}</b> or, in the event of a tie, <b>{$newcomp.tieBreakerMethod}</b></div></td>\r\n	</tr>\r\n{if $newcomp.weeklyWinnersMethod1}\r\n	<tr>\r\n		<td align=\"right\"><div>Weekly Winners:</div></td>\r\n		<td><div>Based on <b>{$newcomp.weeklyWinnersMethod1}</b>{if $newcomp.weeklyWinnersMethod2} and <b>{$newcomp.weeklyWinnersMethod2}</b>{/if}</div></td>\r\n	</tr>\r\n{/if}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/start\">To change any of the above details click here</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\', \'hideReviewLetter\', \'showHide\');\"><img id=\"letter_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewLetter !== \"0\"}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Invitation Letter:</h2>\r\n\r\n<input type=\"hidden\" id=\"hideReviewLetter\" name=\"newcomp[hideReviewLetter]\" value=\"{if $newcomp.hideReviewLetter !== \"0\"}1{else}0{/if}\" />\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:{if $newcomp.hideReviewLetter !== \"0\"}none{else}block{/if};margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/create-invitation\">To change your Invitation Letter click here</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'invitations\', \'hideReviewInvitations\', \'showHide\');\"><img id=\"invitations_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewInvitations}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Who You\'re Inviting:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewInvitations\" name=\"newcomp[hideReviewInvitations]\" value=\"{$newcomp.hideReviewInvitations|default:\"0\"}\" />\r\n\r\n<div id=\"invitations\" style=\"margin:15px;display:{if $newcomp.hideReviewInvitations eq \"1\"}none{else}block{/if};\">\r\n	<table cellpadding=\"3\" style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td><b>Name</b></td>\r\n		<td><b>E-mail Address</b></td>\r\n		<td><b>Relation</b></td>\r\n	</tr>\r\n	{section name=\"invites\" loop=$newcomp.invite.name|@count}{assign var=\"x\" value=$smarty.section.invites.iteration}\r\n		{if not ($newcomp.invite.name.$x or $newcomp.invite.email.$x or $newcomp.invite.relation.$x)}{php}continue;{/php}{/if}\r\n	<tr>\r\n		<td>{$newcomp.invite.name.$x}</td>\r\n		<td>{$newcomp.invite.email.$x}</td>\r\n		<td>{$newcomp.invite.relation.$x}</td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/send-invitation#invitations\">To change who you are inviting click here</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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}<a href=\"?pg={$next.pageName}\"><img src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\"></a>{/if}	\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n'),(2474,117,0.37,'smarty','1','Underlined the categories in the competition summary.',1100649161,2,'144.35.86.125','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n{include_php file=\"shared_handle:newcomp.review\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Review</h1>\r\n\r\n	{toc_prev assign=\"prev\"}\r\n	{if not $competitionErrors}\r\n		{toc_next assign=\"next\"}\r\n	{/if}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div>\r\n	<br />\r\n	You are almost done! Before sending off your invitations,\r\n	please review each item below to make sure everything is correct and then click \'Next\'.\r\n</div>\r\n\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'parameters\', \'hideReviewParameters\', \'showHide\');\"><img id=\"parameters_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewParameters}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Competition Details:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewParameters\" name=\"newcomp[hideReviewParameters]\" value=\"{$newcomp.hideReviewParameters|default:\"0\"}\" />\r\n\r\n<div id=\"parameters\" style=\"margin:15px;display:{if $newcomp.hideReviewParameters eq 1}none{else}block{/if};\">\r\n	<table style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td align=\"right\"><div><u>Comptition Title</u>:</div></td>\r\n		<td><div><b>{$newcomp.title}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div><u>Type</u>:</div></td>\r\n		<td><div><b>{$newcomp.type|niceText}, {$newcomp.style}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div><u>Term</u>:</div></td>\r\n		<td><div><b>{$newcomp.startDate|date_format2:\"M j, Y\"}</b> to <b>{$newcomp.endDate|date_format2:\"M j, Y\"}</b> ({math equation=\"(b - a) / 86400\" a=$newcomp.startDate|default:\"0\" b=$newcomp.endDate|default:\"0\" assign=\"numDays\"}{$numDays|number_format:\"0\"} days)</div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div><u>Award</u>:</div></td>\r\n		<td><div>{if $newcomp.individualPotAmount}<b>${$newcomp.individualPotAmount|number_format:\"2\"}</b> {if $newcomp.potMethod eq \"Per-competitor Donations\"}(each) {/if}by {/if}<b>{$newcomp.potMethod}</b></div></td>\r\n	</tr>\r\n{if $newcomp.potDescription}\r\n	<tr>\r\n		<td align=\"right\"><div><u>Award Description</u>:</div></td>\r\n		<td><div><b>{$newcomp.potDescription}</b></div></td>\r\n	</tr>\r\n{/if}\r\n	<tr>\r\n		<td align=\"right\"><div><u>Scoring</u>:</div></td>\r\n		<td><div>Based on <b>{$newcomp.scoringMethod}</b> or, in the event of a tie, <b>{$newcomp.tieBreakerMethod}</b></div></td>\r\n	</tr>\r\n{if $newcomp.weeklyWinnersMethod1}\r\n	<tr>\r\n		<td align=\"right\"><div><u>Weekly Winners</u>:</div></td>\r\n		<td><div>Based on <b>{$newcomp.weeklyWinnersMethod1}</b>{if $newcomp.weeklyWinnersMethod2} and <b>{$newcomp.weeklyWinnersMethod2}</b>{/if}</div></td>\r\n	</tr>\r\n{/if}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/start\">To change any of the above details click here</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\', \'hideReviewLetter\', \'showHide\');\"><img id=\"letter_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewLetter !== \"0\"}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Invitation Letter:</h2>\r\n\r\n<input type=\"hidden\" id=\"hideReviewLetter\" name=\"newcomp[hideReviewLetter]\" value=\"{if $newcomp.hideReviewLetter !== \"0\"}1{else}0{/if}\" />\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:{if $newcomp.hideReviewLetter !== \"0\"}none{else}block{/if};margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/create-invitation\">To change your Invitation Letter click here</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'invitations\', \'hideReviewInvitations\', \'showHide\');\"><img id=\"invitations_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewInvitations}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Who You\'re Inviting:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewInvitations\" name=\"newcomp[hideReviewInvitations]\" value=\"{$newcomp.hideReviewInvitations|default:\"0\"}\" />\r\n\r\n<div id=\"invitations\" style=\"margin:15px;display:{if $newcomp.hideReviewInvitations eq \"1\"}none{else}block{/if};\">\r\n	<table cellpadding=\"3\" style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td><b>Name</b></td>\r\n		<td><b>E-mail Address</b></td>\r\n		<td><b>Relation</b></td>\r\n	</tr>\r\n	{section name=\"invites\" loop=$newcomp.invite.name|@count}{assign var=\"x\" value=$smarty.section.invites.iteration}\r\n		{if not ($newcomp.invite.name.$x or $newcomp.invite.email.$x or $newcomp.invite.relation.$x)}{php}continue;{/php}{/if}\r\n	<tr>\r\n		<td>{$newcomp.invite.name.$x}</td>\r\n		<td>{$newcomp.invite.email.$x}</td>\r\n		<td>{$newcomp.invite.relation.$x}</td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/send-invitation#invitations\">To change who you are inviting click here</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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}<a href=\"?pg={$next.pageName}\"><img src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\"></a>{/if}	\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n'),(2783,91,0.85,'smarty','1','Adding weekly winners category selection',1103588950,2,'67.166.75.78','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{* display var=$newcomp *}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 1</h1>\r\n<p>In this first step you will select the competition arena, all the detials of your competition, and the type of invitation letter you want to send. Then click \'Next\'</p>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectComp\',\'hideSelectComp\', \'showHide\');\"><img id=\"selectComp_img\" src=\"./img/blank.gif\" width=\"48\" height=\"17\" class=\"showHide_{if $newcomp.hideSelectComp eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Select a Competition Arena:</h2>\r\n<input type=\"hidden\" id=\"hideSelectComp\" name=\"newcomp[hideSelectComp]\" value=\"{$newcomp.hideSelectComp|default:0}\" />\r\n<div id=\"selectComp\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectComp eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div id=\"corporate\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Corporate</h2>\r\n				Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n			</div>\r\n					\r\n			<div id=\"friends\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Family/Friends</h2>\r\n				\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			</div>\r\n				\r\n			<div id=\"partner\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Partner/Spouse</h2>\r\n				Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			</div>\r\n				\r\n			<div id=\"group\" style=\"display:{if $newcomp.type eq \"group\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Group/Club</h2>\r\n				Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"compRadios\">\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"corporateRadio\" value=\"corporate\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'corporateRadio\').checked=\'true\';selectType();return false;\">Corporate</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"friendsRadio\" value=\"friends\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendsRadio\').checked=\'true\';selectType();return false;\">Family / Friends</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"partnerRadio\" value=\"partner\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'partnerRadio\').checked=\'true\';selectType();return false;\">Partner / Spouse</a><!-- <br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"groupRadio\" value=\"group\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'groupRadio\').checked=\'true\';selectType();return false;\">Group / Club</a> -->\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n{assign var=\"includeX\" value=\"true\"}\r\n\r\n{if $newcomp.startDate}\r\n	{assign var=\"startDate\" value=$newcomp.startDate}\r\n{else}\r\n	{assign var=\"startDate\" value=$smarty.now}\r\n{/if}\r\n{if $newcomp.endDate}\r\n	{assign var=\"endDate\" value=$newcomp.endDate}\r\n{else}\r\n	{assign var=\"endDate\" value=$smarty.now|math:\"x+5184000\"}  {* Now + 2 Months *}\r\n{/if}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectParams\',\'hideSelectParams\', \'showHide\');\"><img id=\"selectParams_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectParams eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Competition Details:</h2>\r\n<input type=\"hidden\" id=\"hideSelectParams\" name=\"newcomp[hideSelectParams]\" value=\"{$newcomp.hideSelectParams|default:0}\" />\r\n<div id=\"selectParams\" style=\"margin:10px; display:{if $newcomp.hideSelectParams eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Title:</div></td>\r\n		<td><input type=\"text\" name=\"newcomp[title]\" class=\"textInput\" size=\"22\" maxlength=\"32\" style=\"width:220px;\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Give your competition a title.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Start Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar0\" style=\"float:left; display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n				<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&parentForm=compStartForm&targetName=newcomp[startDate]&targetViewableName=newcomp[startDateViewable]&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar0\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>End Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar1\" style=\"float:left; display:none; border:#999999 1px solid; width:100px;\" align=\"center\">\r\n				<iframe name=\"frameCalendar2\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=1&year={$endDate|date_format2:\"Y\"}&month={$endDate|date_format2:\"m\"}&day={$endDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[endDateViewable]\" value=\"{if not $newcomp.endDate}Click a Date ^{else}{$newcomp.endDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar1\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[endDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Type:</div></td>\r\n		<td><select name=\"newcomp[style]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Everyone-vs-Everyone\">Belly to Belly</option>\r\n			<option value=\"Group-vs-Group\">Team vs. Team</option>\r\n			<option value=\"One-on-One\">One on One</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Award Method:</div></td>\r\n		<td><select name=\"newcomp[potMethod]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Per-competitor Donations\">Each competitor Donates</option>\r\n			<option value=\"Individual Charity\">I will supply the prize</option>\r\n			<option value=\"Company Charity\">My Company will supply the prize</option>\r\n			<option value=\"Other-None\">Other-None</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>The Award can be pooled together by everyone, or you can supply it all yourself by selecting \"I will supply the prize\".</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Contribution Amount:</div></td>\r\n		<td valign=\"middle\"><span style=\"position:relative; top:-5px;\">$</span><input type=\"text\" name=\"newcomp[individualPotAmount]\" class=\"textInput\" size=\"4\" maxlength=\"4\" style=\"width:30px;\" /><span style=\"position:relative; top:-5px;\">.00</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Enter the amount that each competitor will need to agree to pay to the winner, or if you are supplying it all yourself, enter that amount! (This amount is not collected by WeightLossWars, it is only displayed to provide motivation)</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Award Description:</div></td>\r\n		<td valign=\"middle\"><input type=\"text\" name=\"newcomp[potDescription]\" class=\"textInput\" size=\"22\" maxlength=\"255\" style=\"width:220px;\"  /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>(optional) Enter a brief description of the Award.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>The Judging Method:</div></td>\r\n		<td><select name=\"newcomp[scoringMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage of Body Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Tie-Breaker Method:</span></td>\r\n		<td><select name=\"newcomp[tieBreakerMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\"{if not $newcomp.tieBreakerMethod} selected{/if}>Percentage Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>This is how the winner is determined, in the event of a tie.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Weekly Winners Method 1:</div></td>\r\n		<td><select name=\"newcomp[weeklyWinnersMethod1]\" size=\"1\" onchange=\"updateWeeklyWinnersMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"\">-- None --</option>\r\n			<option value=\"Weight Lost\"{if not $newcomp.weeklyWinnersMethod1} selected{/if}>Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage of Body Weight Lost</option>\r\n			<option value=\"Minutes Exercise\">Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Weekly winners will be displayed, based on this stat.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Weekly Winners Method 2:</span></td>\r\n		<td><select name=\"newcomp[weeklyWinnersMethod2]\" size=\"1\" onchange=\"updateWeeklyWinnersMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"\">-- None --</option>\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage Weight Lost</option>\r\n			<option value=\"Minutes Exercise\"{if not $newcomp.weeklyWinnersMethod2} selected{/if}>Minutes Exercise</option>\r\n			<option value=\"Distance Exercised\">Distance Exercised</option>\r\n			<option value=\"Weight Gained\">Weight Gained</option></select></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Additional weekly winners category.</small></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectInvite\', \'hideSelectInvite\', \'showHide\');\"><img id=\"selectInvite_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideSelectInvite eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Choose an Invitation Style:</h2>\r\n<input type=\"hidden\" id=\"hideSelectInvite\" name=\"newcomp[hideSelectInvite]\" value=\"{$newcomp.hideSelectInvite|default:0}\" />	\r\n<div id=\"selectInvite\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectInvite eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div>\r\n			Select the type of invitation you want to send. You can smack talk them to get their blood boiling, send them a motivating challenge, or a friendly, inspiring invitation.</div>\r\n				\r\n		<div id=\"smack\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">SMACK!</h2>\r\n				<b>example:</b><br /> &quot;Hey Blubber Butt,I challenge you to the battle of all battles...&quot;</div>\r\n			</div>\r\n					\r\n			<div id=\"challenge\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Challenge</h2>\r\n				<b>example:</b><br /> &quot;I\'m putting up $100 that says I can take you down in a 6-week weight-loss competition...&quot;</div>\r\n			</div>\r\n				\r\n			<div id=\"friendly\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Friendly</h2>\r\n				<b>example:</b><br /> &quot;A healthy weight loss challenge is what we all need to lose these extra pounds...&quot;</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"inviteRadios\">\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"smackRadio\" value=\"smack\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'smackRadio\').checked=\'true\';selectInvite();return false;\">SMACK!</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"challengeRadio\" value=\"challenge\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'challengeRadio\').checked=\'true\';selectInvite();return false;\">Challenge</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"friendlyRadio\" value=\"friendly\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendlyRadio\').checked=\'true\';selectInvite();return false;\">Friendly</a>\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" align=\"right\" style=\"margin:0px;\">\r\n	<a href=\"javascript:document.compStartForm.submit();\"><img src=\"{$skinFolder}images/btn_next.gif\" border=\"0\" /></a></div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n\r\n	<script language=\"JavaScript\">{literal}\r\n	function selectType() {\r\n		var type;\r\n		var types = Array(\'corporate\',\'friends\',\'partner\',\'group\');\r\n		var elems = document.getElementsByName(\'newcomp[type]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'friends\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function selectInvite() {\r\n		var type;\r\n		var types = Array(\'smack\',\'challenge\',\'friendly\');\r\n		var elems = document.getElementsByName(\'newcomp[invitationType]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'smack\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function updateScoringMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[scoringMethod]\') ? \'newcomp[tieBreakerMethod]\' : \'newcomp[scoringMethod]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		if (obj.selectedIndex == other.selectedIndex) {\r\n			if (obj.selectedIndex == 0) {\r\n				other.selectedIndex = 1;\r\n			} else {\r\n				other.selectedIndex = 0;\r\n			}\r\n		}		\r\n	}\r\n	\r\n	function updateWeeklyWinnersMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[weeklyWinnersMethod1]\') ? \'newcomp[weeklyWinnersMethod2]\' : \'newcomp[weeklyWinnersMethod1]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		if (obj.selectedIndex == other.selectedIndex) {\r\n			if (obj.selectedIndex > 0) {\r\n				other.selectedIndex--;\r\n			}/* else {\r\n				other.selectedIndex = 0;\r\n			}*/\r\n		}\r\n\r\n		if (name == \'newcomp[weeklyWinnersMethod2]\' && obj.selectedIndex > 0 && other.selectedIndex == 0) {\r\n			other.selectedIndex = obj.selectedIndex;\r\n			obj.selectedIndex = 0;\r\n		} else if (name == \'newcomp[weeklyWinnersMethod1]\' && obj.selectedIndex == 0 && other.selectedIndex > 0) {\r\n			obj.selectedIndex = other.selectedIndex;\r\n			other.selectedIndex = 0;\r\n		}\r\n	}\r\n	\r\n	{/literal}\r\n</script>'),(969,116,0.34,'smarty','0','more.',1084846359,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<h1 class=\"underline\">Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">Create Your Invitation Letter:</h2><br />\r\nIn this step you will create an email letter to invite your competitors into your Weight Loss War!  \r\n<p />Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n<i>Create My Own</i> below and write your own challenge invitation!  Then click <i>Next</i> below.\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n\r\n<script language=\"JavaScript\">\r\n\r\nvar examples = Array();\r\n{foreach from=$examples key=\"key\" item=\"example\"}\r\nexamples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n{/foreach}\r\n\r\n{literal}\r\n\r\nfunction toggleType(type) {\r\n	if (type == \'customLetter\') {\r\n		document.getElementById(\'customLetter\').style.display = \'block\';\r\n		document.getElementById(\'madlib\').style.display = \'none\';\r\n		document.getElementById(\'letterType\').value = \'customLetter\';\r\n		document.getElementById(\'madlibsElement\').selectedIndex = 0;\r\n	} else {\r\n		document.getElementById(\'customLetter\').style.display = \'none\';\r\n		document.getElementById(\'madlib\').style.display = \'block\';\r\n		document.getElementById(\'letterType\').value = \'madlib\';\r\n	}\r\n}\r\n\r\nfunction setExample(key) {\r\n	toggleType(\'customLetter\');\r\n	var ta = document.getElementById(\'customLetterElement\');\r\n\r\n	if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n		ta.value = examples[key];\r\n	}\r\n}\r\n\r\nfunction setMadlib(key) {\r\n	var obj;\r\n	key--;\r\n	toggleType(\'madlib\');	\r\n	for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n		obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n	}\r\n}\r\n{/literal}\r\n\r\n</script>\r\n\r\n\r\n<table align=\"center\">\r\n<tr>\r\n	<td valign=\"top\"><div><br />\r\n		<u>Examples:</u>\r\n		<div style=\"margin:0px 10px 0px 10px;\">\r\n			{foreach from=$examples key=\"key\" item=\"example\"}\r\n				<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n			{foreachelse}\r\n				Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n			{/foreach}\r\n		</div>\r\n	</div></td>\r\n	<td align=\"center\">\r\n		<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n		<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"350\">\r\n		<tr>\r\n			<td><div>\r\n				<!-- <a href=\"javascript://\" onclick=\"toggleType(\'madlib\');\">Use a MadLib!</a> -->\r\n\r\n				{if $madlibs|@count}\r\n					<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n						<option value=\"\">(Select a MadLib)</option>\r\n					{foreach from=$madlibs item=\"madlib\"}\r\n						<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n					{/foreach}\r\n					</select>\r\n				{else}\r\n					No Madlibs Available!\r\n				{/if}\r\n				<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n			</div></td>\r\n		</tr>\r\n		<tr>\r\n			<td align=\"left\">\r\n				<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n					{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n						<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n					{/foreach}\r\n					</div>\r\n\r\n				<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n					<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" class=\"textarea\"></textarea></div>\r\n			</td>\r\n		</tr>\r\n		</table>\r\n	</td>\r\n	<td>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n<div class=\"hBox\" align=\"right\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>'),(970,116,0.35,'smarty','0','widened text area..',1084847126,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<h1 class=\"underline\">Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">Create Your Invitation Letter:</h2><br />\r\nIn this step you will create an email letter to invite your competitors into your Weight Loss War!  \r\n<p />Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n<i>Create My Own</i> below and write your own challenge invitation!  Then click <i>Next</i> below.\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n\r\n<script language=\"JavaScript\">\r\n\r\nvar examples = Array();\r\n{foreach from=$examples key=\"key\" item=\"example\"}\r\nexamples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n{/foreach}\r\n\r\n{literal}\r\n\r\nfunction toggleType(type) {\r\n	if (type == \'customLetter\') {\r\n		document.getElementById(\'customLetter\').style.display = \'block\';\r\n		document.getElementById(\'madlib\').style.display = \'none\';\r\n		document.getElementById(\'letterType\').value = \'customLetter\';\r\n		document.getElementById(\'madlibsElement\').selectedIndex = 0;\r\n	} else {\r\n		document.getElementById(\'customLetter\').style.display = \'none\';\r\n		document.getElementById(\'madlib\').style.display = \'block\';\r\n		document.getElementById(\'letterType\').value = \'madlib\';\r\n	}\r\n}\r\n\r\nfunction setExample(key) {\r\n	toggleType(\'customLetter\');\r\n	var ta = document.getElementById(\'customLetterElement\');\r\n\r\n	if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n		ta.value = examples[key];\r\n	}\r\n}\r\n\r\nfunction setMadlib(key) {\r\n	var obj;\r\n	key--;\r\n	toggleType(\'madlib\');	\r\n	for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n		obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n	}\r\n}\r\n{/literal}\r\n\r\n</script>\r\n\r\n<br />\r\n\r\n<table>\r\n<tr>\r\n	<td valign=\"top\"><div><br />\r\n		<u>Examples:</u>\r\n		<div style=\"margin:0px 10px 0px 10px;\">\r\n			{foreach from=$examples key=\"key\" item=\"example\"}\r\n				<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n			{foreachelse}\r\n				Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n			{/foreach}\r\n		</div>\r\n	</div></td>\r\n	<td>\r\n		<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n		<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"500\">\r\n		<tr>\r\n			<td><div>\r\n				{if $madlibs|@count}\r\n					<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n						<option value=\"\">(Select a MadLib)</option>\r\n					{foreach from=$madlibs item=\"madlib\"}\r\n						<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n					{/foreach}\r\n					</select>\r\n				{else}\r\n					No Madlibs Available!\r\n				{/if}\r\n				<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n			</div></td>\r\n		</tr>\r\n		<tr>\r\n			<td align=\"left\">\r\n				<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n					{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n						<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n					{/foreach}\r\n					</div>\r\n\r\n				<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n					<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" style=\"width:480px;\" class=\"textarea\"></textarea></div>\r\n			</td>\r\n		</tr>\r\n		</table>\r\n	</td>\r\n	<td>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n<div class=\"hBox\" align=\"right\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>'),(971,116,0.36,'smarty','0','moved some JS',1084849112,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<h1 class=\"underline\">Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'makeInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Create Your Invitation Letter:</h2>\r\n	\r\n	<div id=\"makeInvite\" style=\"display:block;\">\r\n	In this step you will create an email letter to invite your competitors into your Weight Loss War!<br /><br />\r\n	Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n	<i>Create My Own</i> below and write your own challenge invitation!  Then click <i>Next</i> below.\r\n	\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n	\r\n	<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n	<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n	<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n	\r\n	<script language=\"JavaScript\">\r\n	\r\n	var examples = Array();\r\n	{foreach from=$examples key=\"key\" item=\"example\"}\r\n	examples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n	{/foreach}\r\n	\r\n	{literal}\r\n	\r\n	function toggleType(type) {\r\n		if (type == \'customLetter\') {\r\n			document.getElementById(\'customLetter\').style.display = \'block\';\r\n			document.getElementById(\'madlib\').style.display = \'none\';\r\n			document.getElementById(\'letterType\').value = \'customLetter\';\r\n			document.getElementById(\'madlibsElement\').selectedIndex = 0;\r\n		} else {\r\n			document.getElementById(\'customLetter\').style.display = \'none\';\r\n			document.getElementById(\'madlib\').style.display = \'block\';\r\n			document.getElementById(\'letterType\').value = \'madlib\';\r\n		}\r\n	}\r\n	\r\n	function setExample(key) {\r\n		toggleType(\'customLetter\');\r\n		var ta = document.getElementById(\'customLetterElement\');\r\n	\r\n		if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n			ta.value = examples[key];\r\n		}\r\n	}\r\n	\r\n	function setMadlib(key) {\r\n		var obj;\r\n		key--;\r\n		toggleType(\'madlib\');	\r\n		for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n			obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n		}\r\n	}\r\n	{/literal}\r\n	\r\n	</script>\r\n	\r\n	<br />\r\n	\r\n	<table>\r\n	<tr>\r\n		<td valign=\"top\"><div>\r\n			<h2 class=\"underline\">Examples:</h2>\r\n			<div style=\"margin:0px 10px 0px 10px;\">\r\n				{foreach from=$examples key=\"key\" item=\"example\"}\r\n					<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n				{foreachelse}\r\n					Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n				{/foreach}\r\n			</div>\r\n		</div></td>\r\n		<td>\r\n			<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n			<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"500\">\r\n			<tr>\r\n				<td><div>\r\n					{if $madlibs|@count}\r\n						<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n							<option value=\"\">(Select a MadLib)</option>\r\n						{foreach from=$madlibs item=\"madlib\"}\r\n							<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n						{/foreach}\r\n						</select>\r\n					{else}\r\n						No Madlibs Available!\r\n					{/if}\r\n					<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n				</div></td>\r\n			</tr>\r\n			<tr>\r\n				<td align=\"left\">\r\n					<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n						{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n							<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n						{/foreach}\r\n						</div>\r\n	\r\n					<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n						<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" style=\"width:480px;\" class=\"textarea\"></textarea></div>\r\n				</td>\r\n			</tr>\r\n			</table>\r\n		</td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}'),(972,116,0.37,'smarty','0','moved some JS',1084849699,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<h1 class=\"underline\">Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'makeInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Create Your Invitation Letter:</h2>\r\n	\r\n	<div id=\"makeInvite\" style=\"display:block;\">\r\n	In this step you will create an email letter to invite your competitors into your Weight Loss War!<br /><br />\r\n	Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n	<i>Create My Own</i> below and write your own challenge invitation!  Then click <i>Next</i> below.\r\n	\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n	\r\n	<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n	<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n	<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n	\r\n	<script language=\"JavaScript\">\r\n	\r\n	var examples = Array();\r\n	{foreach from=$examples key=\"key\" item=\"example\"}\r\n	examples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n	{/foreach}\r\n	\r\n	{literal}\r\n	\r\n	function toggleType(type) {\r\n		if (type == \'customLetter\') {\r\n			document.getElementById(\'customLetter\').style.display = \'block\';\r\n			document.getElementById(\'madlib\').style.display = \'none\';\r\n			document.getElementById(\'letterType\').value = \'customLetter\';\r\n			document.getElementById(\'madlibsElement\').selectedIndex = 0;\r\n		} else {\r\n			document.getElementById(\'customLetter\').style.display = \'none\';\r\n			document.getElementById(\'madlib\').style.display = \'block\';\r\n			document.getElementById(\'letterType\').value = \'madlib\';\r\n		}\r\n	}\r\n	\r\n	function setExample(key) {\r\n		toggleType(\'customLetter\');\r\n		var ta = document.getElementById(\'customLetterElement\');\r\n	\r\n		if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n			ta.value = examples[key];\r\n		}\r\n	}\r\n	\r\n	function setMadlib(key) {\r\n		var obj;\r\n		key--;\r\n		toggleType(\'madlib\');	\r\n		for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n			obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n		}\r\n	}\r\n	{/literal}\r\n	\r\n	</script>\r\n	\r\n	<br />\r\n	\r\n	<table>\r\n	<tr>\r\n		<td valign=\"top\"><div>\r\n			<h2 class=\"withBG\">Examples:</h2>\r\n			<div style=\"margin:0px 10px 0px 10px;\">\r\n				{foreach from=$examples key=\"key\" item=\"example\"}\r\n					<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n				{foreachelse}\r\n					Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n				{/foreach}\r\n			</div>\r\n		</div></td>\r\n		<td>\r\n			<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n			<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"500\">\r\n			<tr>\r\n				<td><div>\r\n					{if $madlibs|@count}\r\n						<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n							<option value=\"\">(Select a MadLib)</option>\r\n						{foreach from=$madlibs item=\"madlib\"}\r\n							<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n						{/foreach}\r\n						</select>\r\n					{else}\r\n						No Madlibs Available!\r\n					{/if}\r\n					<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n				</div></td>\r\n			</tr>\r\n			<tr>\r\n				<td align=\"left\">\r\n					<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n						{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n							<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n						{/foreach}\r\n						</div>\r\n	\r\n					<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n						<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" style=\"width:480px;\" class=\"textarea\"></textarea></div>\r\n				</td>\r\n			</tr>\r\n			</table>\r\n		</td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}'),(973,91,0.50,'smarty','0','added hidden values to keep track of hidden elements.',1084851063,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1>Create a Competition: Step 1</h1>\r\n<div class=\"pixel underline\">&nbsp;</div>\r\n<br />\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectComp\',\'hideSelectComp\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Selected Competition Type:</h2>\r\n<input type=\"hidden\" id=\"hideSelectComp\" name=\"newcomp[hide][selectComp]\" value=\"{$newcomp.hide.selectComp|default:0}\" />\r\n<div id=\"selectComp\" style=\"margin:10px;\" style=\"display:{if $newcomp.hide.selectComp eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div id=\"corporate\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Corporate</h2>\r\n				Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n			</div>\r\n					\r\n			<div id=\"friends\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Family/Friends</h2>\r\n				\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			</div>\r\n				\r\n			<div id=\"partner\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Partner/Spouse</h2>\r\n				Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			</div>\r\n				\r\n			<div id=\"group\" style=\"display:{if $newcomp.type eq \"group\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Group/Club</h2>\r\n				Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"compRadios\">\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"corporateRadio\" value=\"corporate\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'corporateRadio\').checked=\'true\';selectType();return false;\">Corporate</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"friendsRadio\" value=\"friends\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendsRadio\').checked=\'true\';selectType();return false;\">Family / Friends</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"partnerRadio\" value=\"partner\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'partnerRadio\').checked=\'true\';selectType();return false;\">Partner / Spouse</a><!-- <br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"groupRadio\" value=\"group\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'groupRadio\').checked=\'true\';selectType();return false;\">Group / Club</a> -->\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n{assign var=\"includeX\" value=\"true\"}\r\n\r\n{if $newcomp.startDate}\r\n	{assign var=\"startDate\" value=$newcomp.startDate}\r\n{else}\r\n	{assign var=\"startDate\" value=$smarty.now}\r\n{/if}\r\n{if $newcomp.endDate}\r\n	{assign var=\"endDate\" value=$newcomp.endDate}\r\n{else}\r\n	{assign var=\"endDate\" value=$smarty.now|math:\"x+5184000\"}  {* Now + 2 Months *}\r\n{/if}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectParams\',\'hideSelectParams\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Competition Parameters:</h2>\r\n<input type=\"hidden\" id=\"hideSelectParams\" name=\"newcomp[hide][selectParams]\" value=\"{$newcomp.hide.selectParams|default:0}\" />\r\n<div id=\"selectParams\" style=\"margin:10px; display:{if $newcomp.hide.selectParams eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td align=\"right\" valign=\"top\"><div>Competition Name:</div></td>\r\n		<td><input type=\"text\" name=\"newcomp[name]\" class=\"textInput\" size=\"22\" maxlength=\"32\" style=\"width:220px;\" /><br />\r\n			<small>Any old thing you want to reference this competition by.</small></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"top\"><div>Start Date:</div></td>\r\n		<td><input type=\"text\" class=\"textInput\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar0\');\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" /></a>\r\n			<div id=\"fCalendar0\" style=\"display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n				<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"top\"><div>End Date:</div></td>\r\n		<td><input type=\"text\" class=\"textInput\" disabled=\"disabled\" name=\"newcomp[endDateViewable]\" value=\"{if not $newcomp.endDate}Click a Date ^{else}{$newcomp.endDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar1\');\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" /></a>\r\n			<div id=\"fCalendar1\" style=\"float:left; display:none; border:#999999 1px solid; width:100px;\" align=\"center\">\r\n				<iframe name=\"frameCalendar2\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=1&year={$endDate|date_format2:\"Y\"}&month={$endDate|date_format2:\"m\"}&day={$endDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"hidden\" name=\"newcomp[endDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	\r\n	<tr>\r\n		<td align=\"right\"><div>Competition Style:</div></td>\r\n		<td><select name=\"newcomp[style]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Everyone-vs-Everyone\">Everyone vs. Everyone</option>\r\n			<option value=\"Group-vs-Group\">Team vs. Team</option>\r\n			<option value=\"One-on-One\">One on One</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"top\"><div>Jackpot Method:</div></td>\r\n		<td><select name=\"newcomp[potMethod]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Per-competitor Donations\">Per-competitor Donations</option>\r\n			<option value=\"Individual Charity\">Individual Charity</option>\r\n			<option value=\"Company Charity\">Company Charity</option></select><br />\r\n			<small>Where the \"Jackpot\" money comes from.</small></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"top\" nowrap><div>Jackpot Contribution:</div></td>\r\n		<td><span>$<input type=\"text\" name=\"newcomp[individualPotAmount]\" class=\"textInput\" size=\"4\" maxlength=\"4\" style=\"width:30px;\" />.00<br />\r\n			<small>Each individual must enter this much into the jackpot to join,<br />\r\n			 including you, when the competition is created.</small></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"top\"><div>Scoring Method:</div></td>\r\n		<td><select name=\"newcomp[scoringMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage Weight Lost</option></select><br />\r\n			<small>How the winner is determined.</small>\r\n			</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"top\"><span>Tie-Breaker Method:</span></td>\r\n		<td><select name=\"newcomp[tieBreakerMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\"{if not $newcomp.tieBreakerMethod} selected{/if}>Percentage Weight Lost</option></select><br />\r\n			<small>How the winner is determined, in the event of a tie.</small>\r\n			</td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectInvite\', \'hideSelectInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Choose an Invitation Style:</h2>\r\n<input type=\"hidden\" id=\"hideSelectInvite\" name=\"newcomp[hide][selectInvite]\" value=\"{$newcomp.hide.selectInvite|default:0}\" />	\r\n<div id=\"selectInvite\" style=\"margin:10px;\" style=\"display:block;\">\r\n	<table>\r\n	<tr>\r\n		<td><div>\r\n			Select the type of invitation you want to send out to your first group of contacts.</div>\r\n				\r\n		<div id=\"smack\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">SMACK!</h2>\r\n				<b>example:</b><br /> &quot;I challenge you to the battle of all battles, you stinky monkey!&quot;</div>\r\n			</div>\r\n					\r\n			<div id=\"challenge\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Challenge</h2>\r\n				<b>example:</b><br /> &quot;I\'m putting up $20 to take you down in a 6-week weight-loss competition!&quot;</div>\r\n			</div>\r\n				\r\n			<div id=\"friendly\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Friendly</h2>\r\n				<b>example:</b><br /> &quot;I bet that I can lose more body fat that you.&quot;</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"inviteRadios\">\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"smackRadio\" value=\"smack\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'smackRadio\').checked=\'true\';selectInvite();return false;\">SMACK!</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"challengeRadio\" value=\"challenge\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'challengeRadio\').checked=\'true\';selectInvite();return false;\">Challenge</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"friendlyRadio\" value=\"friendly\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendlyRadio\').checked=\'true\';selectInvite();return false;\">Friendly</a>\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" align=\"right\" style=\"margin:0px;\">\r\n	<a href=\"javascript:document.compStartForm.submit();\"><img src=\"{$skinFolder}images/btn_next.gif\" border=\"0\" /></a></div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n\r\n	<script language=\"JavaScript\">{literal}\r\n	function selectType() {\r\n		var type;\r\n		var types = Array(\'corporate\',\'friends\',\'partner\',\'group\');\r\n		var elems = document.getElementsByName(\'newcomp[type]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'friends\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function selectInvite() {\r\n		var type;\r\n		var types = Array(\'smack\',\'challenge\',\'friendly\');\r\n		var elems = document.getElementsByName(\'newcomp[invitationType]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'smack\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function updateScoringMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[scoringMethod]\') ? \'newcomp[tieBreakerMethod]\' : \'newcomp[scoringMethod]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		other.selectedIndex = (obj.selectedIndex == 0) ? 1 : 0;\r\n	}\r\n	\r\n	{/literal}\r\n</script>'),(977,119,0.19,'smarty','0','alignments..',1084851652,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">Send Your Invitation Letter:</h2>\r\n<div>Enter the contact information for as many friends as you would like to send your invitation to.</div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<table align=\"center\">\r\n<tr>\r\n	<td valign=\"top\"><div>\r\n		<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"350\">\r\n		<tr>\r\n			<td><div>\r\n				<h2 class=\"withBG\">Your Letter</h2>\r\n			</div></td>\r\n		</tr>\r\n		<tr>\r\n			<td align=\"left\">\r\n				<div id=\"letter\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;\">\r\n					{eval var=$invitationLetter|nl2br}\r\n					</div>\r\n			</td>\r\n		</tr>\r\n		</table>\r\n	</div></td>\r\n	<td valign=\"top\">\r\n		<table>\r\n		<tr>\r\n			<td><div>&nbsp;</div></td>\r\n			<td><div>Name</div></td>\r\n			<td><div>E-Mail</div></td>\r\n			<td><div>Relation</div></td>\r\n		</tr> \r\n		{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n		<tr>\r\n			<td><div>Competitor {$smarty.section.contactLoop.iteration}</div></td>\r\n			<td><div><input type=\"text\" size=\"18\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n			<td><div><input type=\"text\" size=\"25\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n			<td><div><input type=\"text\" size=\"15\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		</tr>\r\n		{/section}\r\n		</table>\r\n	</td>\r\n	<td>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(978,119,0.20,'smarty','0','headings and ..',1084851806,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">Send Your Invitation Letter:</h2>\r\n<div>Enter the contact information for as many friends as you would like to send your invitation to.</div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<table align=\"center\">\r\n<tr>\r\n	<td valign=\"top\"><div>\r\n		<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"350\">\r\n		<tr>\r\n			<td><div>\r\n				<h2 class=\"withBG\">Your Letter</h2>\r\n			</div></td>\r\n		</tr>\r\n		<tr>\r\n			<td align=\"left\">\r\n				<div id=\"letter\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;\">\r\n					{eval var=$invitationLetter|nl2br}\r\n					</div>\r\n			</td>\r\n		</tr>\r\n		</table>\r\n	</div></td>\r\n	<td valign=\"top\">\r\n		<table>\r\n		<tr>\r\n			<td><div>&nbsp;</div></td>\r\n			<td><h2 class=\"withBG\">Name</h2></td>\r\n			<td><h2 class=\"withBG\">E-Mail</h2></td>\r\n			<td><h2 class=\"withBG\">Relation</h2></td>\r\n		</tr> \r\n		{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n		<tr>\r\n			<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n			<td><div><input type=\"text\" size=\"18\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n			<td><div><input type=\"text\" size=\"25\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n			<td><div><input type=\"text\" size=\"15\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		</tr>\r\n		{/section}\r\n		</table>\r\n	</td>\r\n	<td>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(979,119,0.21,'smarty','0','added spacing.',1084851884,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">Send Your Invitation Letter:</h2>\r\n<div>Enter the contact information for as many friends as you would like to send your invitation to.<br /><br />\r\n</div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<table align=\"center\">\r\n<tr>\r\n	<td valign=\"top\"><div>\r\n		<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"350\">\r\n		<tr>\r\n			<td><div>\r\n				<h2 class=\"withBG\">Your Letter</h2>\r\n			</div></td>\r\n		</tr>\r\n		<tr>\r\n			<td align=\"left\">\r\n				<div id=\"letter\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;\">\r\n					{eval var=$invitationLetter|nl2br}\r\n					</div>\r\n			</td>\r\n		</tr>\r\n		</table>\r\n	</div></td>\r\n	<td valign=\"top\">\r\n		<table>\r\n		<tr>\r\n			<td><div>&nbsp;</div></td>\r\n			<td><h2 class=\"withBG\">Name</h2></td>\r\n			<td><h2 class=\"withBG\">E-Mail</h2></td>\r\n			<td><h2 class=\"withBG\">Relation</h2></td>\r\n		</tr> \r\n		{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n		<tr>\r\n			<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n			<td><div><input type=\"text\" size=\"18\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n			<td><div><input type=\"text\" size=\"25\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n			<td><div><input type=\"text\" size=\"15\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		</tr>\r\n		{/section}\r\n		</table>\r\n	</td>\r\n	<td>\r\n	</td>\r\n</tr>\r\n</table>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(980,119,0.22,'smarty','0','added show/hide',1084853694,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Review Your Invitation:</h2>\r\n\r\n<div>Make sure that you are satisfied with the invitation you will be sending to the other competetors.</div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:block;margin:10px;padding:5px;border:1px solid #CCC;background-color:#FFF;\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'enterEmails\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Invite Some Competitors:</h2>\r\n\r\n<div>Enter a contact name and email address for each person you would like to invite into this competition. Don\'t worry about gathering everyone\'s email address right now, you can always add more later.<br /><br /></div>\r\n\r\n<div id=\"enterEmails\">\r\n	<table cellpadding=\"0\" cellspacing=\"0\" style=\"margin:10px;\">\r\n	<tr>\r\n		<td><div>&nbsp;</div></td>\r\n		<td><h2 class=\"withBG\">Name</h2></td>\r\n		<td><h2 class=\"withBG\">E-Mail</h2></td>\r\n		<td><h2 class=\"withBG\">Relation</h2></td>\r\n	</tr> \r\n	{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n	<tr>\r\n		<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(981,119,0.23,'smarty','0','added show/hide',1084854966,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Review Your Invitation:</h2>\r\n\r\n<div>Make sure that you are satisfied with the invitation you will be sending to the other competetors.</div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:block;margin:10px;padding:5px;border:1px solid #CCC;background-color:#FFF;\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'enterEmails\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Invite Some Competitors:</h2>\r\n\r\n<div>Enter a contact name and email address for each person you would like to invite into this competition. Don\'t worry about gathering everyone\'s email address right now, you can always add more later.<br /><br /></div>\r\n\r\n<div id=\"enterEmails\">\r\n	<table style=\"margin:10px;\">\r\n	<tr>\r\n		<td><div>&nbsp;</div></td>\r\n		<td><h3 class=\"withBG\">Name</h2></td>\r\n		<td><h3 class=\"withBG\">E-Mail</h2></td>\r\n		<td><h3 class=\"withBG\">Relation</h2></td>\r\n	</tr> \r\n	{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n	<tr>\r\n		<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(982,116,0.39,'smarty','0','margin:0px;',1084867326,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<h1 class=\"underline\">Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'makeInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Create Your Invitation Letter:</h2>\r\n	\r\n<div id=\"makeInvite\" style=\"display:block;\">\r\n	In this step you will create an email letter to invite your competitors into your Weight Loss War!<br /><br />\r\n	Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n	<b>\'Create My Own\'</b> below and write your own challenge invitation!  Then click <b>\'Next\'</b> below.\r\n	\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n	\r\n	<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n	<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n	<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n	\r\n	<br />\r\n	\r\n	<table>\r\n	<tr>\r\n		<td valign=\"top\"><div>\r\n			<h2 class=\"withBG\">Examples:</h2>\r\n			<div style=\"margin:0px 10px 0px 10px;\">\r\n				{foreach from=$examples key=\"key\" item=\"example\"}\r\n					<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n				{foreachelse}\r\n					Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n				{/foreach}\r\n			</div>\r\n		</div></td>\r\n		<td>\r\n			<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n			<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"500\">\r\n			<tr>\r\n				<td><div>\r\n					{if $madlibs|@count}\r\n						<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n							<option value=\"\">(Select a MadLib)</option>\r\n						{foreach from=$madlibs item=\"madlib\"}\r\n							<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n						{/foreach}\r\n						</select>\r\n					{else}\r\n						No Madlibs Available!\r\n					{/if}\r\n					<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n				</div></td>\r\n			</tr>\r\n			<tr>\r\n				<td align=\"left\">\r\n					<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n						{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n							<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n						{/foreach}\r\n						</div>\r\n	\r\n					<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n						<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" style=\"width:480px;\" class=\"textarea\"></textarea></div>\r\n				</td>\r\n			</tr>\r\n			</table>\r\n		</td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<script language=\"JavaScript\">\r\n	\r\n	var examples = Array();\r\n	{foreach from=$examples key=\"key\" item=\"example\"}\r\n	examples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n	{/foreach}\r\n	\r\n	{literal}\r\n	\r\n	function toggleType(type) {\r\n		if (type == \'customLetter\') {\r\n			document.getElementById(\'customLetter\').style.display = \'block\';\r\n			document.getElementById(\'madlib\').style.display = \'none\';\r\n			document.getElementById(\'letterType\').value = \'customLetter\';\r\n			document.getElementById(\'madlibsElement\').selectedIndex = 0;\r\n		} else {\r\n			document.getElementById(\'customLetter\').style.display = \'none\';\r\n			document.getElementById(\'madlib\').style.display = \'block\';\r\n			document.getElementById(\'letterType\').value = \'madlib\';\r\n		}\r\n	}\r\n	\r\n	function setExample(key) {\r\n		toggleType(\'customLetter\');\r\n		var ta = document.getElementById(\'customLetterElement\');\r\n	\r\n		if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n			ta.value = examples[key];\r\n		}\r\n	}\r\n	\r\n	function setMadlib(key) {\r\n		var obj;\r\n		key--;\r\n		toggleType(\'madlib\');	\r\n		for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n			obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n		}\r\n	}\r\n	{/literal}\r\n</script>'),(983,116,0.40,'smarty','0','br',1084867386,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<h1 class=\"underline\">Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'makeInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Create Your Invitation Letter:</h2>\r\n	\r\n<div id=\"makeInvite\" style=\"display:block;\">\r\n	In this step you will create an email letter to invite your competitors into your Weight Loss War!<br /><br />\r\n	Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n	<b>\'Create My Own\'</b> below and write your own challenge invitation!  Then click <b>\'Next\'</b> below.\r\n	\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n	\r\n	<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n	<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n	<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n	\r\n	<br />\r\n	\r\n	<table>\r\n	<tr>\r\n		<td valign=\"top\"><div>\r\n			<h2 class=\"withBG\">Examples:</h2>\r\n			<div style=\"margin:0px 10px 0px 10px;\">\r\n				{foreach from=$examples key=\"key\" item=\"example\"}\r\n					<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n				{foreachelse}\r\n					Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n				{/foreach}\r\n			</div>\r\n		</div></td>\r\n		<td>\r\n			<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n			<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"500\">\r\n			<tr>\r\n				<td><div>\r\n					{if $madlibs|@count}\r\n						<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n							<option value=\"\">(Select a MadLib)</option>\r\n						{foreach from=$madlibs item=\"madlib\"}\r\n							<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n						{/foreach}\r\n						</select>\r\n					{else}\r\n						No Madlibs Available!\r\n					{/if}\r\n					<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n				</div></td>\r\n			</tr>\r\n			<tr>\r\n				<td align=\"left\">\r\n					<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n						{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n							<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n						{/foreach}\r\n						</div>\r\n	\r\n					<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n						<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" style=\"width:480px;\" class=\"textarea\"></textarea></div>\r\n				</td>\r\n			</tr>\r\n			</table>\r\n		</td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n<br />\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<script language=\"JavaScript\">\r\n	\r\n	var examples = Array();\r\n	{foreach from=$examples key=\"key\" item=\"example\"}\r\n	examples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n	{/foreach}\r\n	\r\n	{literal}\r\n	\r\n	function toggleType(type) {\r\n		if (type == \'customLetter\') {\r\n			document.getElementById(\'customLetter\').style.display = \'block\';\r\n			document.getElementById(\'madlib\').style.display = \'none\';\r\n			document.getElementById(\'letterType\').value = \'customLetter\';\r\n			document.getElementById(\'madlibsElement\').selectedIndex = 0;\r\n		} else {\r\n			document.getElementById(\'customLetter\').style.display = \'none\';\r\n			document.getElementById(\'madlib\').style.display = \'block\';\r\n			document.getElementById(\'letterType\').value = \'madlib\';\r\n		}\r\n	}\r\n	\r\n	function setExample(key) {\r\n		toggleType(\'customLetter\');\r\n		var ta = document.getElementById(\'customLetterElement\');\r\n	\r\n		if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n			ta.value = examples[key];\r\n		}\r\n	}\r\n	\r\n	function setMadlib(key) {\r\n		var obj;\r\n		key--;\r\n		toggleType(\'madlib\');	\r\n		for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n			obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n		}\r\n	}\r\n	{/literal}\r\n</script>'),(984,116,0.41,'smarty','0','moved some content out of hiding.',1084867555,3,'24.10.220.247','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<h1 class=\"underline\">Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'makeInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Create Your Invitation Letter:</h2>\r\n<div>	\r\n	In this step you will create an email letter to invite your competitors into your Weight Loss War!<br /><br />\r\n	Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n	<b>\'Create My Own\'</b> below and write your own challenge invitation!  Then click <b>\'Next\'</b> below.</div>\r\n\r\n<div id=\"makeInvite\" style=\"display:block;\">	\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n	\r\n	<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n	<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n	<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n	\r\n	<br />\r\n	\r\n	<table>\r\n	<tr>\r\n		<td valign=\"top\"><div>\r\n			<h2 class=\"withBG\">Examples:</h2>\r\n			<div style=\"margin:0px 10px 0px 10px;\">\r\n				{foreach from=$examples key=\"key\" item=\"example\"}\r\n					<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n				{foreachelse}\r\n					Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n				{/foreach}\r\n			</div>\r\n		</div></td>\r\n		<td>\r\n			<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n			<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"500\">\r\n			<tr>\r\n				<td><div>\r\n					{if $madlibs|@count}\r\n						<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n							<option value=\"\">(Select a MadLib)</option>\r\n						{foreach from=$madlibs item=\"madlib\"}\r\n							<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n						{/foreach}\r\n						</select>\r\n					{else}\r\n						No Madlibs Available!\r\n					{/if}\r\n					<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n				</div></td>\r\n			</tr>\r\n			<tr>\r\n				<td align=\"left\">\r\n					<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n						{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n							<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n						{/foreach}\r\n						</div>\r\n	\r\n					<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n						<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" style=\"width:480px;\" class=\"textarea\"></textarea></div>\r\n				</td>\r\n			</tr>\r\n			</table>\r\n		</td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n<br />\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<script language=\"JavaScript\">\r\n	\r\n	var examples = Array();\r\n	{foreach from=$examples key=\"key\" item=\"example\"}\r\n	examples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n	{/foreach}\r\n	\r\n	{literal}\r\n	\r\n	function toggleType(type) {\r\n		if (type == \'customLetter\') {\r\n			document.getElementById(\'customLetter\').style.display = \'block\';\r\n			document.getElementById(\'madlib\').style.display = \'none\';\r\n			document.getElementById(\'letterType\').value = \'customLetter\';\r\n			document.getElementById(\'madlibsElement\').selectedIndex = 0;\r\n		} else {\r\n			document.getElementById(\'customLetter\').style.display = \'none\';\r\n			document.getElementById(\'madlib\').style.display = \'block\';\r\n			document.getElementById(\'letterType\').value = \'madlib\';\r\n		}\r\n	}\r\n	\r\n	function setExample(key) {\r\n		toggleType(\'customLetter\');\r\n		var ta = document.getElementById(\'customLetterElement\');\r\n	\r\n		if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n			ta.value = examples[key];\r\n		}\r\n	}\r\n	\r\n	function setMadlib(key) {\r\n		var obj;\r\n		key--;\r\n		toggleType(\'madlib\');	\r\n		for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n			obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n		}\r\n	}\r\n	{/literal}\r\n</script>'),(985,109,0.21,'smarty','0','a little more cleaning.',1084868434,3,'24.10.220.247','{include_php file=\"shared_handle:contactForm\"}\r\n\r\n<h1 class=\"underline\">Contact Us</h1>\r\n\r\n<strong>You can contact us by E-mail, phone, or U.S. mail. </strong><br><br>\r\n\r\n<form name=\"contactForm\" action=\"index.php\" method=\"post\">\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>\r\n<tr>\r\n	<td><span>Your Name:</span></td>\r\n	<td><input type=\"text\" name=\"mfName\" value=\"{$smarty.request.mfName|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Your E-mail Address:</span></td>\r\n	<td><input type=\"text\" name=\"mfEmail\" value=\"{$smarty.request.mfEmail|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Subject:</span></td>\r\n	<td><input type=\"text\" name=\"mfSubject\" value=\"{$smarty.request.mfSubject|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Message Body:</span></td>\r\n	<td><textarea cols=\"35\" rows=\"6\" name=\"mfMessage\">{$smarty.request.mfMessage|stripslashes|htmlspecialchars}</textarea></td>\r\n</tr>\r\n<tr>\r\n	<td><span>&nbsp;</span></td>\r\n	<td><input type=\"submit\" value=\"Send Now\"></td>\r\n</tr>\r\n</table>\r\n<div class=\"underline\">&nbsp;</div>\r\n<br />\r\n<table>\r\n<tr>\r\n	<td><span>E-Mail:</span></td>\r\n	<td><span><strong>Fill out the form above or email us at <br>{mailto address=\"customerservice@weightlosswars.com\" text=\"customerservice@weightlosswars.com\" encode=\"javascript\"}</strong></span></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Phone:</span></td>\r\n	<td><span><strong>1-510-415-3030</strong></span></td>\r\n</tr>\r\n<!--tr>\r\n	<td><span>Fax:</span></td>\r\n	<td><span><strong>1-801-555-5555 </strong></span></td>\r\n</tr-->\r\n<tr>\r\n	<td valign=\"top\" nowrap><span><br>U.S. Mail: &nbsp; &nbsp; </span></td>\r\n	<td><span><strong><br>WeightLossWars, L.L.C. <br>\r\n			2111 N. 120 W. #263<br>\r\n			Provo, UT 84604</strong></span></td>\r\n</tr>\r\n</table>\r\n\r\n'),(2968,99,3.59,'smarty','0','Made graph default to the choose graph image instead of automatically loading the graph',1106073950,2,'67.166.75.78','{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=\"file:./layouts/comp_layout2.tpl\"}\r\n\r\n{include_php file=\"shared_handle:competition.load\"}\r\n{if $competition.userId 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.verifyInitialPot\"}\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 y=$competition.startDate z=\"86400\"}\r\n		{math assign=\"marginOfVictory\" equation=\"x - y\" x=$competition.results.winningStat y=$competition.results.secondPlaceStat}\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 currently unavailable.<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<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}% of thier body weight{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}exercising <b>{$userValue}</b> miles{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 then <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}%{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}<b>{$userValue}</b> miles{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}% of thier body weight{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}exercising <b>{$userValue}</b> miles{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 then <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}%{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}<b>{$userValue}</b> miles{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.availableGraphs|@count}\r\n{include_php file=\"shared_handle:competition.graphs\"}\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	{*\r\n	{if $competition.scoringMethod eq \"Distance Exercised\"}\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&compId=`$competition.id`&type=distanceExercised&fillPrevious=0&precision=1&totalChange=0&format=wide\"}\r\n	{elseif $competition.scoringMethod eq \"Minutes Exercise\"}\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&compId=`$competition.id`&type=minutesExercise&fillPrevious=0&precision=1&totalChange=0&format=wide\"}\r\n	{else}  { * weight lost, percent lost, weight gained, etc... * }\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&compId=`$competition.id`&type=weight&fillPrevious=1&precision=1&totalChange=1&format=wide\"}\r\n	{/if}\r\n	*}\r\n	<tr>\r\n		<td><div style=\"border:#999 1px solid;background-color:#FFF;padding:5px;\"><iframe name=\"graphwindow\" src=\"{$graphURL}\" frameborder=\"0\" width=\"625\" height=\"220\" scrollbars=\"no\"></iframe></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\" align=\"center\" width=\"100%\">\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></td>\r\n	</tr>\r\n	{* <tr>\r\n		<td colspan=\"2\">\r\n			<h3 class=\"withBG\">Compare With Stars!</h3>\r\n			<div>To graphically and numerically compare to different \"stars\", click a \r\n				category and select one or more stars (hold down the CTRL or SHIFT \r\n				key to select/deselect multiple) then click the \"Compare Now!\" \r\n				button below. When you do, the graph above will be updated to include\r\n				the selected \"stars\" and you will see a comparison window appear below\r\n				to show how you compare.</div>\r\n\r\n			<!-- This DIV is initially Empty. Will contain IFRAME of comparison view. -->\r\n			<div id=\"compareFrameDiv\" style=\"width:375px; display:none;\"><iframe name=\"compareFrame\" src=\"?pg=compare-frame\" frameborder=\"0\" width=\"375\" height=\"180\" scrollbars=\"no\"></iframe></div>\r\n\r\n			<table xwidth=\"99%\" cellspacing=\"1\" cellpadding=\"1\">\r\n			<tr>\r\n			<td xwidth=\"45%\" align=\"center\">\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'players\');\" class=\"button\">Players</a>\r\n					<div id=\"players\" style=\"display:block;\">\r\n						<select size=\"6\" id=\"comparePlayers\" name=\"compare[players]\" style=\"width:100%\">\r\n						{if $competition.style eq \'Group-vs-Group\'}\r\n							{foreach from=$competition.teams item=\"teams\" key=\"teamName\"}\r\n								{foreach from=$teams.users item=\"users\" key=\"userName\"}\r\n									{if $users.hideInitialWeight neq \"Yes\" OR $users.id eq $user->id}<option value=\"{$users.id}\">{$userName}</option>{/if}\r\n								{/foreach}\r\n							{/foreach}\r\n						{else}\r\n							{foreach from=$competition.users item=\"users\" key=\"username\" name=\"dateUpdated\"}\r\n								{if $users.hideInitialWeight neq \"Yes\" OR $users.id eq $user->id}<option value=\"{$users.id}\">{$username}</option>{/if}\r\n							{/foreach}\r\n						{/if}\r\n						</select>\r\n					</div>\r\n				</div>\r\n			</td>\r\n			<td xwidth=\"10%\" style=\"border-left:1px solid #CCC; border-right:1px solid #CCC;\" valign=\"middle\" align=\"center\"><b>Versus</b></td>\r\n			<td xwidth=\"45%\" align=\"center\">\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'animals\');\" class=\"button\">Animals</a>\r\n					<div id=\"animals\" style=\"display:none;\">\r\n						<select size=\"6\" id=\"compareAnimals\" multiple=\"multiple\" name=\"compare[animals]\" style=\"width:100%;\">\r\n						{foreach from=$stars.animals item=\"row\"}\r\n							<option value=\"{$row.id}\">{$row.name}</option>\r\n						{/foreach}\r\n						</select>\r\n					</div>\r\n				</div>\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'athletes\');\" class=\"button\">Athletes</a>\r\n					<div id=\"athletes\" style=\"display:none;\">\r\n						<select size=\"6\" id=\"compareAthletes\" multiple=\"multiple\" name=\"compare[athletes]\" style=\"width:100%;\">\r\n						{foreach from=$stars.athletes item=\"row\"}\r\n							<option value=\"{$row.id}\">{$row.name}</option>\r\n						{/foreach}\r\n						</select>\r\n					</div>\r\n				</div>\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'movies\');\" class=\"button\">Movie Stars</a>\r\n					<div id=\"movies\" style=\"display:none;\">\r\n						<select size=\"6\" id=\"compareMovies\" multiple=\"multiple\" name=\"compare[movies]\" style=\"width:100%;\">\r\n						{foreach from=$stars.movies item=\"row\"}\r\n							<option value=\"{$row.id}\">{$row.name}</option>\r\n						{/foreach}\r\n						</select>\r\n					</div>\r\n				</div>\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'politics\');\" class=\"button\">Politicians</a>\r\n					<div id=\"politics\" style=\"display:none;\">\r\n						<select size=\"6\" id=\"comparePolitics\" multiple=\"multiple\" name=\"compare[politics]\" style=\"width:100%;\">\r\n						{foreach from=$stars.politics item=\"row\"}\r\n							<option value=\"{$row.id}\">{$row.name}</option>\r\n						{/foreach}\r\n						</select>\r\n					</div>\r\n				</div>\r\n			</td>\r\n			</tr>\r\n			<tr>\r\n			<td colspan=\"3\" align=\"center\">\r\n				<br /><a href=\"#graph\" class=\"button\" onclick=\"goCompareGraph();\"> &nbsp; &gt; Compare Now! &lt; &nbsp; </a><br />\r\n			</td>\r\n			</table>\r\n		</td>\r\n	</tr> *}\r\n	</table>\r\n<br />\r\n</div>\r\n{/if}\r\n\r\n{*   comparisons currently disabled\r\n{include_php file=\"shared_handle:getStarStats\"}\r\n\r\n<script language=\"javascript\">{literal}\r\n\r\nfunction goCompareGraph() {\r\n	var elementIds = Array(\'compareAnimals\', \'compareAthletes\', \'compareMovies\', \'comparePolitics\');\r\n	var obj = \'\';\r\n	var ids = \'\';\r\n\r\n	for (var a = 0; a < elementIds.length; a++) {\r\n		obj = document.getElementById(elementIds[a]);\r\n\r\n		for (var x = 0; x < obj.options.length; x++) {\r\n			if (obj.options[x].selected)\r\n				ids += obj.options[x].value + \',\';\r\n		}\r\n	}\r\n\r\n	if (ids) {\r\n		ids = ids.replace(/\\,$/, \'\');\r\n		var url = \'?pg=flashgraph-frame&compId={/literal}{$competition.id}{literal}&type=weight&fillPrevious=1&precision=0&stars=\' + ids;\r\n		graphwindow.location.replace(url);\r\n\r\n		// Now update the content of the compare frame.\r\n		obj = document.getElementById(\'compareFrameDiv\');\r\n		obj.style.display = \'block\';\r\n		\r\n		obj = document.getElementById(\'comparePlayers\');\r\n		var userIds = \'\';\r\n\r\n		for (var x = 0; x < obj.options.length; x++)\r\n			if (obj.options[x].selected)\r\n				userIds += obj.options[x].value;\r\n\r\n		compareFrame.location.replace(\'?pg=compare-frame&stars=\' + ids + \'&userId=\' + userIds);\r\n	} else {\r\n		alert (\'Click on one of the categories to the left and select as many \"stars\" as you would like.\\n\\nTo select multiple \"stars\", hold down the SHIFT or CTRL key while clicking on their names.\\n\\nWhen finished, click this link again to see the comparison.\');\r\n	}\r\n}\r\n\r\n{/literal}</script>\r\n*}  {* End commented out comparison stuff *}\r\n\r\n{* ******************************** GROUP TEAMS/PLAYERS SUMMARY W/MOVING ***************************************** *}\r\n{if $competition.style eq \'Group-vs-Group\'}\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	{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	{/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.teams name=\"teamsLoop\" item=\"teams\" 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			<h4>{if $teams.name eq \"Waiting to Join\"}Not assigned to a team{else}{$teams.name|default:\"&nbsp;\"}{/if}</h4>\r\n		{if $scoringMethod|regex_match:\"/exercise/i\"}\r\n			<span class=\"cellHeadLarge\">Name</span>\r\n			<span class=\"cellHeadSmall\">Min.</span>\r\n			<span class=\"cellHeadSmall\">Dist.</span>\r\n			<span class=\"cellHeadSmall\">Update</span><br />\r\n			{foreach from=$teams.users item=\"users\" key=\"userName\"}\r\n				<span class=\"cellLarge\" style=\"text-align:left;\"><small>{if $isManager}<input type=\"checkbox\" name=\"changeTeam[players][{$userName}]\" style=\"width:14px;height:14px;margin:0px 2px;\" />{/if}{$userName}</small></span>\r\n				<span class=\"cellSmall\"><small>{$users.$minEx|default:\"-\"|replace:\".00\":\"\"}</small></span>\r\n				<span class=\"cellSmall\"><small>{$users.$distEx|default:\"-\"|replace:\".00\":\"\"}</small></span>\r\n				<span class=\"cellSmall\"><small>{$users.dateOfEntry|date_format2:\"n/j/y\"|default:\"-\"}</small></span>\r\n			{foreachelse}\r\n				{* No players assigned to this team. *}\r\n			{/foreach}\r\n		{else}\r\n			<span class=\"cellHeadLarge\">Name</span>\r\n			<span class=\"cellHeadTiny\">%</span>\r\n			<span class=\"cellHeadSmall\">Update</span><br />\r\n			{foreach from=$teams.users item=\"users\" key=\"userName\"}\r\n				<span class=\"cellLarge\" style=\"clear:left;text-align:left;\"><small>{if $isManager}<input type=\"checkbox\" name=\"changeTeam[players][{$userName}]\" />{/if}{$userName}</small></span>\r\n				<span class=\"cellTiny\"><small>{if $users.hideInitialWeight neq \"Yes\"}{$users.$pctLst|number_format:\"2\"|replace:\".00\":\"\"}{else}-{/if}</small></span>\r\n				<span class=\"cellSmall\"><small>{$users.dateOfEntry|date_format2:\"n/j/y\"|default:\"-\"}</small></span><br />\r\n			{foreachelse}\r\n				{* No players assigned to this team. *}\r\n			{/foreach}\r\n		{/if}\r\n			</div>\r\n		{/foreach}\r\n	{if $isManager}\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 $newTeams.name ne $teams.name and $newTeams.name ne \"Waiting to Join\"*}\r\n				{if $newTeams.name ne \"Waiting to Join\"}\r\n					<option value=\"{$newTeams.name}\">{$newTeams.name}</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\r\n{* ********************** LEADERS ******************************* *}\r\n{* <div class=\"chunk300\">\r\n<h2 class=\"withBG\">Leaders</h2>\r\n<div id=\"leadersList\" class=\"contentColumn\">\r\n	<span class=\"cellHeadLarge\">{if $competition.style eq \'Group-vs-Group\'}# of members{else}Competitor{/if}</span\r\n	><span class=\"cellHeadSmall\">{if $scoringMethod eq \"Percentage Weight Lost\"}% Lost{elseif $scoringMethod eq \"Weight Lost\"}lbsLost{elseif $scoringMethod eq \"Weight Gained\"}lbsGain{elseif $scoringMethod eq \"Minutes Exercise\"}Min.{elseif $scoringMethod eq \"Distance Exercised\"}Dist.{/if}</span\r\n	><br />\r\n{if $competition.style eq \'Group-vs-Group\'}\r\n	{foreach from=$competition.teams item=\"compUser\" key=\"username\"}\r\n	<span class=\"cell\"><small>{$compUser.userCount}</small></span><br />\r\n	{/foreach}\r\n{else}\r\n	{foreach from=$competition.users item=\"compUser\" key=\"username\" name=\"leaders\"}\r\n	{*$smarty.foreach.leaders.iteration* }<span class=\"cellLarge\"><small>{$username}</small></span>\r\n	<span class=\"cellSmall\"><small>{if $scoringMethod eq \"Percentage Weight Lost\"}{$compUser.$scoringMethod|number_format:\"2\"} %{else}{$compUser.$scoringMethod}{/if}</small></span><br />\r\n	{/foreach}\r\n{/if}\r\n</div> *}'),(2988,105,1.14,'php','0','Replaced some weird character.',1106561257,2,'67.166.75.78','<?php\r\n\r\n$FAQ = array(\r\n	\"0\" => array(\r\n		\"title\" => \"Competition Questions\",\r\n		\"anchor\" => \"comp\",\r\n		\"questions\" => array(\r\n			\"How is the scoring calculated?\",\r\n			\"My weight loss is incorrect! Why?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"This depends on what the scoring method is.<br /><br />If the scoring method is based on a totals-type category, where the winner has the largest (or smallest) sum of one category (such as minutes or distance exercise), then the totals are simply calculated on all entries you placed between (or on) the start date and the end date of the competition.<br /><br />If the competition is based on weight (weight lost or percentage weight lost), the site uses the earliest weight entry for you on or after the start date of the competition. This number is subracted by the weight entry nearest, but not after the competition end date to calculate your weight lost for the competition.<br /><br />The site does not use any weight entries before the start date of the competition as your start weight because it will not assume that your weight was consistent between that time and the start of the competition.<br /><br />We recommend weighing yourself on the starting date of the competition (or as soon as possible after it begins) and making that entry in your weight loss journal.\",\r\n			\"There are many possible reasons for this, but the most common is covered above in \\\"How is the scoring calculated?\\\".<br /><br />It is also possible that you have entered incorrect data, or incorrectly calculated what you think your loss should be; please be careful to make sure your weight loss is indeed incorrectly calculated in a competition before contacting us for help.<br /><br />Another reason your weight loss might not seem correct is that the competition calculation has been cached and has not been updated since you saved entries in your weight loss journal. Please note the \\\"as of MM/DD/YYYY HH:MM A\\\" time at the top of your leader board. Some competitions are only updated manually when the competition creator or a site administrator requests a calculation update. If your competition is considerably out of date, try contacting the creator of the competition, or <a href=\\\"?pg=contact\\\">contact us</a> and let us know.\"\r\n		)\r\n	),\r\n	\"1\" => array(\r\n		\"title\" => \"Account Questions\",\r\n		\"anchor\" => \"cat1\",\r\n		\"questions\" => array(\r\n			\"How do I change my password?\",\r\n			\"I entered the wrong birthdate how do I change my entry?\",\r\n			\"My weight loss goals have changed, is there a way to set a new goal?\",\r\n			\"What is a Weight Loss Journal?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"You can manage many aspects of you account by clicking on the Account Settings button towards the top of the My Home page.\",\r\n			\"Having the correct age is important - and is configured in some of the calculators and other site tools to help you understand health issues facing your age group.  Unfortunately there isn\'t a way to change your birthdate at this time, but a customer service representative would be happy to change it for you.  Simply click on the Contact Us link at the bottom of the page and let them know of the change you need.\",\r\n			\"You can make changes to your goals by clicking on the Update My Profile button near the top of the My Home page.  check back often for enhanced goal management features!\",\r\n			\"A weight loss Journal is a place to record your weight loss efforts in exercise and nutrition.  It has been proven that those who keep a record of what they eat are more successful in losing weight.  WeightLossWars provides you an interactive and informative FREE weight loss journal.\"\r\n		\r\n		)\r\n	),\r\n	\"2\" => array(\r\n		\"title\" => \"Incentive Survey Questions\",\r\n		\"anchor\" => \"cat2\",\r\n		\"questions\" => array(\r\n			\"I can no longer take the wellness surveys, what happened?\",\r\n			\"I entered some wrong information, is there any way I can change my answers?\",\r\n			\"How are the points awarded?\",\r\n			\"How many points do I need to receive different prizes and bonuses?\"\r\n\r\n		),\r\n		\"answers\" => array(\r\n			\"Each survey has a time limit that must expire before you take the survey again.  Currently the Life Style survey can be taken once a month, while the Physical Activity and Nutrition surveys can be taken weekly.  The date that is displayed next to each survey will let you know when you can take them again.\",\r\n			\"Data that you have entered cannot be changed.  As you select your answers be careful to select the answer that most appropriately represents you.\",\r\n			\"Points are distributed based on frequency of participation and the answers that you give.  Participation points are awarded for filling out the survey, and then, based on your answers, you receive points that reward healthier life styles.\",\r\n			\"Receiving prizes depends upon your company.  Ask your benefits manager or wellness director for the details on redeeming your points for prizes.\"\r\n		)\r\n	),\r\n	\"3\" => array(\r\n		\"title\" => \"Health and Wellness Questions\",\r\n		\"anchor\" => \"cat3\",\r\n		\"questions\" => array(\r\n			\"What does BMI stand for and what is a healthy BMI for me? \",\r\n			\"How accurate is the BMI measurement? \",\r\n			\"What is a healthy blood pressure? \",\r\n			\"How can I lower blood pressure besides medication?\",\r\n			\"Where should my cholesterol levels be?\",\r\n			\"How much exercise do I need to do to lose weight?\",\r\n			\"What is the best type of exercise to lose body fat?\",\r\n			\"How can I know what my body fat percentage is?\",\r\n			\"What is heart disease and how does exercise and nutrition affect my risks?\",\r\n			\"What is the Target Heart Rate zone? \",\r\n			\"Do I really need to lift weights?\",\r\n			\"What if I just don\'t have time to exercise?\",\r\n			\"If I am overweight or obese, what diseases am I at risk for?\"\r\n		),\r\n		\"answers\" => array(\r\n			\"BMI stands for Body Mass Index and is a ratio of weight to height, used to estimate the relationship of body composition to risk factors of certain diseases. Use our calculator to determine what your BMI is and refer to the chart below to see what category you are in.<br />18.5 or less is Under Weight <br />18.5 to 24.9 is Normal <br />25.0 to 29.9 is Overweight <br />30.0 to 34.9 is Level 1 Obese <br />35.0 to 39.9 is Level 2 Obese <br />40 or greater is Extreme Obese\",\r\n			\"For the vast majority of average individuals, the BMI is a useful and accurate measurement. The drawback lies in the fact that short, muscular individuals may be falsely labeled as obese, and tall lean individuals as underweight.\",\r\n			\"According to national guidelines, normal blood pressure is below 120/80 mmHg. Blood pressure above 140/90 mmHg is diagnosed as hypertension, or high blood pressure. Someone with hypertension is at higher risk of having strokes, heart attacks and kidney failure.\",\r\n			\"Hypertension can be treated through increased exercise and a better diet. Many recent studies have shown that regular aerobic exercise (workouts like brisk walking that use large muscles for an extended period) over several months may modestly lower blood pressure. According to a recent National Institutes of Health conference, aerobic exercise reduces resting (nonexercise) blood pressure in people who have hypertension by an average of 11 points off the top number and 9 points off the bottom number. That could be enough to lower high blood pressure to normal. Reducing sodium(salt) in your diet can also help to lower blood pressure.\",\r\n			\"Your TOTAL blood cholesterol will fall into one of these categories:<br /><b>Desirable</b> is Less than 200 mg/dL <br /><b>Borderline high risk</b> is 200 to 239 mg/dL <br /><b>High risk</b> is 240 mg/dL and over<br />There are two types of cholesterol in your body: LDL is bad cholesterol and contributes to artery clogging. You want Low LDL levels (below 100 is optimal). HDL is good cholesterol and helps to clear arterial blockage. You want High HDL levels. (Less than 40 is too low) To lower your LDL and raise your HDL levels you can: <br />Quit Smoking <br />Lose weight (or maintain a healthy weight) <br />Be physically active for at least 30 to 60 minutes a day on most or all days of the week.\",\r\n			\"This depends on how many calories you are consuming. To lose weight you need to burn more calories than you take in. It takes 3500 calories burned to lose 1 pound. That’s going into a deficit of 1,000 calories a day if you want to lose 2 lbs a week. This can be done by eating 500 calories less than you normally do and burning 500 calories per day more through exercise. That is equivalent to about a 45 minute jog.<br />Exercising 30 to 60 minutes 5 days a week is a good guideline to follow and will not only aid in weight loss but will also reduce your risk for several diseases including heart disease, diabetes and colon cancer.\",\r\n			\"When your body is engaged in aerobic exercise, it utilizes fat as its fuel. So if your goal is to lose body fat, your main modes of exercise should be walking, jogging, biking or swimming in your target heart rate zone.\",\r\n			\"There are several different methods used to determine body fat percentage. Hydrostatic or underwater weighing is probably the most accurate and widely used. There are other methods and devices including the DEXA machine, the Bod Pod, Tanita scales, hand held devices and Skin Calipers. The key is to use the same method consistently so that you can see the change in your body fat percentage. \",\r\n			\"Heart disease occurs because of inadequate blood flow to the heart muscle. This occurs when the arteries that supply the heart muscle (the coronary arteries) become partially or completely blocked. Obese people are at increased risk of heart disease due to their higher rates of hypercholesterolemia, diabetes and hypertension. Several studies have proven the beneficial effects of exercise on heart diseases. Not only will it reduce body fat, but it will also help to lower blood cholesterol, blood pressure and regulate glucose metabolism. Eating a diet high low in saturated fat and cholesterol and high in dietary fiber will lower your risk for heart disease.\",\r\n			\"The Target Heart Rate zone refers to the range that you want your heart rate to be in while you are doing aerobic exercise. This is the best zone to be in to burn body fat. Calculate your target heart rate zone using our calculator.\",\r\n			\"There are many benefits to strength training including:<br />Higher metabolism<br />Stronger bones<br />Increased muscle strength and endurance<br />Increased balance, flexibility and stability<br />Decreased risk of coronary heart disease<br />Injury prevention<br />Feel and look better<br />Strength training will help you with weight loss because the more muscle you have the more calories you burn at rest.\",\r\n			\"We all have busy schedules and the trick with exercising is plan, plan, plan. Schedule it in before your busy week begins. Make it a priority. Set aside time one day a week to plan when, where and for how long you will exercise. It may require getting up half hour earlier, or taking a little longer lunch break. If there is absolutely no time in your schedule for a formal exercise session you can do little tricks like parking farther away at the store, not taking the elevator, etc. Every little bit helps.\",\r\n			\"Obesity places you at risk for several diseases including heart disease, diabetes, some forms of cancer, sleep apnea, abdominal hernias, varicose veins, gout, gall bladder disease, respiratory problems, and liver malfunction. Losing just 10% of your body weight will significantly lower your risk for these diseases.\"\r\n		)\r\n	)\r\n);\r\n\r\n?>\r\n<h1 class=\"underline\">Frequently Asked Questions</h1>\r\n<br />\r\n<a name=\"toc\" />\r\n<h2 class=\"withBG\">Table of Contents</h2>\r\n<ul>\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n	<li><a href=\"#<?php echo $FAQ[$x][\"anchor\"] ?>\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></a><br /><br /></li>\r\n	<ul>\r\n	<?php\r\n		for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n		<li><a href=\"#question_<?php echo $x?>_<?php echo $y?>\"><?php echo  $FAQ[$x][\"questions\"][$y] ?></a></li>\r\n		<?php } ?>\r\n	</ul>\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n<?php }	?>\r\n</ul>\r\n\r\n<br />\r\n\r\n<?php\r\n	for ($x = 0; $x < count($FAQ); $x++) { ?>\r\n\r\n<a name=\"<?php echo  $FAQ[$x][\"anchor\"] ?>\" />\r\n<h2 class=\"withBG\"><?php echo  strtoupper($FAQ[$x][\"title\"]) ?></h2>\r\n\r\n<?php \r\n	for ($y = 0; $y < count($FAQ[$x][\"questions\"]); $y++) { ?>\r\n\r\n<a name=\"question_<?php echo $x?>_<?php echo $y?>\" />\r\n<b>Q.</b> &nbsp;<?php echo  $FAQ[$x][\"questions\"][$y] ?>\r\n<div style=\"margin:10px;margin-top:2px;\">\r\n	<b>A.</b> &nbsp;<?php echo $FAQ[$x][\"answers\"][$y] ?><br />\r\n	<div align=\"right\"><a href=\"#toc\" class=\"button\">Return to top</a><br /></div>\r\n</div>\r\n	<?php } ?>\r\n<?php } ?>\r\n\r\n<br />\r\n<br />\r\nStill have questions? <a href=\"?pg=contact\">Contact Us</a><br />\r\n'),(999,91,0.54,'smarty','0','Updated some visual cues.',1085007974,2,'67.166.72.190','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{* display var=$newcomp *}\r\n\r\n<h1>Create a Competition: Step 1</h1>\r\n<div class=\"pixel underline\">&nbsp;</div>\r\n<br />\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectComp\',\'hideSelectComp\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Selected Competition Type:</h2>\r\n<input type=\"hidden\" id=\"hideSelectComp\" name=\"newcomp[hideSelectComp]\" value=\"{$newcomp.hideSelectComp|default:0}\" />\r\n<div id=\"selectComp\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectComp eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div id=\"corporate\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Corporate</h2>\r\n				Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n			</div>\r\n					\r\n			<div id=\"friends\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Family/Friends</h2>\r\n				\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			</div>\r\n				\r\n			<div id=\"partner\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Partner/Spouse</h2>\r\n				Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			</div>\r\n				\r\n			<div id=\"group\" style=\"display:{if $newcomp.type eq \"group\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Group/Club</h2>\r\n				Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"compRadios\">\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"corporateRadio\" value=\"corporate\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'corporateRadio\').checked=\'true\';selectType();return false;\">Corporate</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"friendsRadio\" value=\"friends\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendsRadio\').checked=\'true\';selectType();return false;\">Family / Friends</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"partnerRadio\" value=\"partner\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'partnerRadio\').checked=\'true\';selectType();return false;\">Partner / Spouse</a><!-- <br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"groupRadio\" value=\"group\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'groupRadio\').checked=\'true\';selectType();return false;\">Group / Club</a> -->\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n{assign var=\"includeX\" value=\"true\"}\r\n\r\n{if $newcomp.startDate}\r\n	{assign var=\"startDate\" value=$newcomp.startDate}\r\n{else}\r\n	{assign var=\"startDate\" value=$smarty.now}\r\n{/if}\r\n{if $newcomp.endDate}\r\n	{assign var=\"endDate\" value=$newcomp.endDate}\r\n{else}\r\n	{assign var=\"endDate\" value=$smarty.now|math:\"x+5184000\"}  {* Now + 2 Months *}\r\n{/if}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectParams\',\'hideSelectParams\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Competition Parameters:</h2>\r\n<input type=\"hidden\" id=\"hideSelectParams\" name=\"newcomp[hideSelectParams]\" value=\"{$newcomp.hideSelectParams|default:0}\" />\r\n<div id=\"selectParams\" style=\"margin:10px; display:{if $newcomp.hideSelectParams eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Name:</div></td>\r\n		<td><input type=\"text\" name=\"newcomp[name]\" class=\"textInput\" size=\"22\" maxlength=\"32\" style=\"width:220px;\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Any old thing you want to reference this competition by.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Start Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar0\" style=\"float:left; display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n				<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textInput\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar0\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>End Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar1\" style=\"float:left; display:none; border:#999999 1px solid; width:100px;\" align=\"center\">\r\n				<iframe name=\"frameCalendar2\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=1&year={$endDate|date_format2:\"Y\"}&month={$endDate|date_format2:\"m\"}&day={$endDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textInput\" disabled=\"disabled\" name=\"newcomp[endDateViewable]\" value=\"{if not $newcomp.endDate}Click a Date ^{else}{$newcomp.endDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar1\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[endDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Style:</div></td>\r\n		<td><select name=\"newcomp[style]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Everyone-vs-Everyone\">Everyone vs. Everyone</option>\r\n			<option value=\"Group-vs-Group\">Team vs. Team</option>\r\n			<option value=\"One-on-One\">One on One</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Jackpot Method:</div></td>\r\n		<td><select name=\"newcomp[potMethod]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Per-competitor Donations\">Per-competitor Donations</option>\r\n			<option value=\"Individual Charity\">Individual Charity</option>\r\n			<option value=\"Company Charity\">Company Charity</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Where the \"Jackpot\" money comes from.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Jackpot Contribution:</div></td>\r\n		<td valign=\"middle\"><span style=\"position:relative; top:-5px;\">$</span><input type=\"text\" name=\"newcomp[individualPotAmount]\" class=\"textInput\" size=\"4\" maxlength=\"4\" style=\"width:30px;\" /><span style=\"position:relative; top:-5px;\">.00</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Each individual must enter this much into the jackpot to join,<br />\r\n			 including you, when the competition is created.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Scoring Method:</div></td>\r\n		<td><select name=\"newcomp[scoringMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage Weight Lost</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>How the winner is determined.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Tie-Breaker Method:</span></td>\r\n		<td><select name=\"newcomp[tieBreakerMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\"{if not $newcomp.tieBreakerMethod} selected{/if}>Percentage Weight Lost</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>How the winner is determined, in the event of a tie.</small></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectInvite\', \'hideSelectInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Choose an Invitation Style:</h2>\r\n<input type=\"hidden\" id=\"hideSelectInvite\" name=\"newcomp[hideSelectInvite]\" value=\"{$newcomp.hideSelectInvite|default:0}\" />	\r\n<div id=\"selectInvite\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectInvite eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div>\r\n			Select the type of invitation you want to send out to your first group of contacts.</div>\r\n				\r\n		<div id=\"smack\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">SMACK!</h2>\r\n				<b>example:</b><br /> &quot;I challenge you to the battle of all battles, you stinky monkey!&quot;</div>\r\n			</div>\r\n					\r\n			<div id=\"challenge\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Challenge</h2>\r\n				<b>example:</b><br /> &quot;I\'m putting up $20 to take you down in a 6-week weight-loss competition!&quot;</div>\r\n			</div>\r\n				\r\n			<div id=\"friendly\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Friendly</h2>\r\n				<b>example:</b><br /> &quot;I bet that I can lose more body fat that you.&quot;</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"inviteRadios\">\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"smackRadio\" value=\"smack\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'smackRadio\').checked=\'true\';selectInvite();return false;\">SMACK!</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"challengeRadio\" value=\"challenge\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'challengeRadio\').checked=\'true\';selectInvite();return false;\">Challenge</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"friendlyRadio\" value=\"friendly\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendlyRadio\').checked=\'true\';selectInvite();return false;\">Friendly</a>\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" align=\"right\" style=\"margin:0px;\">\r\n	<a href=\"javascript:document.compStartForm.submit();\"><img src=\"{$skinFolder}images/btn_next.gif\" border=\"0\" /></a></div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n\r\n	<script language=\"JavaScript\">{literal}\r\n	function selectType() {\r\n		var type;\r\n		var types = Array(\'corporate\',\'friends\',\'partner\',\'group\');\r\n		var elems = document.getElementsByName(\'newcomp[type]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'friends\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function selectInvite() {\r\n		var type;\r\n		var types = Array(\'smack\',\'challenge\',\'friendly\');\r\n		var elems = document.getElementsByName(\'newcomp[invitationType]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'smack\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function updateScoringMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[scoringMethod]\') ? \'newcomp[tieBreakerMethod]\' : \'newcomp[scoringMethod]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		other.selectedIndex = (obj.selectedIndex == 0) ? 1 : 0;\r\n	}\r\n	\r\n	{/literal}\r\n</script>'),(1000,119,0.24,'smarty','0','Using new notepaperBG class for background of letter.',1085041001,2,'127.0.0.1','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Review Your Invitation:</h2>\r\n\r\n<div>Make sure that you are satisfied with the invitation you will be sending to the other competetors.</div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:block;margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'enterEmails\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Invite Some Competitors:</h2>\r\n\r\n<div>Enter a contact name and email address for each person you would like to invite into this competition. Don\'t worry about gathering everyone\'s email address right now, you can always add more later.<br /><br /></div>\r\n\r\n<div id=\"enterEmails\">\r\n	<table style=\"margin:10px;\">\r\n	<tr>\r\n		<td><div>&nbsp;</div></td>\r\n		<td><h3 class=\"withBG\">Name</h2></td>\r\n		<td><h3 class=\"withBG\">E-Mail</h2></td>\r\n		<td><h3 class=\"withBG\">Relation</h2></td>\r\n	</tr> \r\n	{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n	<tr>\r\n		<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(1001,119,0.25,'smarty','0','Added ability to (with DHTML) add more emails now.',1085043486,2,'127.0.0.1','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Review Your Invitation:</h2>\r\n\r\n<div>Make sure that you are satisfied with the invitation you will be sending to the other competetors.</div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:block;margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'enterEmails\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Invite Some Competitors:</h2>\r\n\r\n<div>Enter a contact name and email address for each person you would like to invite into this competition. Don\'t worry about gathering everyone\'s email address right now, you can always add more later.<br /><br /></div>\r\n\r\n<div id=\"enterEmails\">\r\n	<table align=\"center\" style=\"margin:10px;\">\r\n	<tr>\r\n		<td><div>&nbsp;</div></td>\r\n		<td><h3 class=\"withBG\">Name</h2></td>\r\n		<td><h3 class=\"withBG\">E-Mail</h2></td>\r\n		<td><h3 class=\"withBG\">Your Relation</h2></td>\r\n	</tr> \r\n	{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n	<tr>\r\n		<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\" style=\"margin-right:30px;\">\r\n	<a href=\"javascript://\" onclick=\"addEmailRows();return false;\">&gt; Click to add more now! &lt;</a>\r\n</div>\r\n\r\n<script language=\"javascript\">\r\n	var addCount = {$addCount};\r\n	{literal}\r\n	function addEmailRows() {\r\n		addCount++;\r\n		var obj = document.getElementById(\'enterEmails\');\r\n		var html = obj.innerHTML;\r\n		html = html.replace(/\\<\\/TABLE\\>/i, \'\');\r\n		html += \'<tr><td><div>#\'+addCount+\'</div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][\'+addCount+\']\"></div></td></tr></table>\';\r\n		obj.innerHTML = html;\r\n	}\r\n	{/literal}\r\n</script>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(1002,117,0.11,'smarty','0','Copied some text and such from previous page.',1085043682,2,'127.0.0.1','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Review</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'parameters\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Competition Parameters:</h2>\r\n\r\n<div>Make sure that you are satisfied with the invitation you will be sending to the other competetors.</div>\r\n'),(1003,119,0.26,'smarty','0','Fixed a typo.',1085043700,2,'127.0.0.1','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Review Your Invitation:</h2>\r\n\r\n<div>Make sure that you are satisfied with the invitation you will be sending to the other competitors.</div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:block;margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'enterEmails\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Invite Some Competitors:</h2>\r\n\r\n<div>Enter a contact name and email address for each person you would like to invite into this competition. Don\'t worry about gathering everyone\'s email address right now, you can always add more later.<br /><br /></div>\r\n\r\n<div id=\"enterEmails\">\r\n	<table align=\"center\" style=\"margin:10px;\">\r\n	<tr>\r\n		<td><div>&nbsp;</div></td>\r\n		<td><h3 class=\"withBG\">Name</h2></td>\r\n		<td><h3 class=\"withBG\">E-Mail</h2></td>\r\n		<td><h3 class=\"withBG\">Your Relation</h2></td>\r\n	</tr> \r\n	{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n	<tr>\r\n		<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\" style=\"margin-right:30px;\">\r\n	<a href=\"javascript://\" onclick=\"addEmailRows();return false;\">&gt; Click to add more now! &lt;</a>\r\n</div>\r\n\r\n<script language=\"javascript\">\r\n	var addCount = {$addCount};\r\n	{literal}\r\n	function addEmailRows() {\r\n		addCount++;\r\n		var obj = document.getElementById(\'enterEmails\');\r\n		var html = obj.innerHTML;\r\n		html = html.replace(/\\<\\/TABLE\\>/i, \'\');\r\n		html += \'<tr><td><div>#\'+addCount+\'</div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][\'+addCount+\']\"></div></td></tr></table>\';\r\n		obj.innerHTML = html;\r\n	}\r\n	{/literal}\r\n</script>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(1004,108,0.12,'smarty','0','Added some dynamic functionality.',1085044072,2,'127.0.0.1','<h1>Testimonials</h1>\r\n\r\n{select_query assign=\"testimonials\"}\r\n	*\r\nFROM testimonials\r\n{/select_query}\r\n\r\n{foreach from=$testimonials item=\"current\"}\r\n{cycle name=\"marginTypeCycler\" values=\"margin-left,margin-right\" delimiter=\",\" assign=\"marginType\"}\r\n<div class=\"notepaperBG\" style=\"padding:17px;{$marginType}:20px;margin-top:20px;margin-bottom:20px;\">\r\n	{$current.testimonial}\r\n</div>\r\n{/foreach}'),(1005,91,0.55,'smarty','0','Updated some visual cues.',1085104974,3,'24.2.66.215','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{* display var=$newcomp *}\r\n\r\n<h1>Create a Competition: Step 1</h1>\r\n<div class=\"pixel underline\">&nbsp;</div>\r\n<br />\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectComp\',\'hideSelectComp\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Selected Competition Type:</h2>\r\n<input type=\"hidden\" id=\"hideSelectComp\" name=\"newcomp[hideSelectComp]\" value=\"{$newcomp.hideSelectComp|default:0}\" />\r\n<div id=\"selectComp\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectComp eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div id=\"corporate\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Corporate</h2>\r\n				Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n			</div>\r\n					\r\n			<div id=\"friends\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Family/Friends</h2>\r\n				\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			</div>\r\n				\r\n			<div id=\"partner\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Partner/Spouse</h2>\r\n				Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			</div>\r\n				\r\n			<div id=\"group\" style=\"display:{if $newcomp.type eq \"group\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Group/Club</h2>\r\n				Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"compRadios\">\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"corporateRadio\" value=\"corporate\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'corporateRadio\').checked=\'true\';selectType();return false;\">Corporate</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"friendsRadio\" value=\"friends\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendsRadio\').checked=\'true\';selectType();return false;\">Family / Friends</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"partnerRadio\" value=\"partner\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'partnerRadio\').checked=\'true\';selectType();return false;\">Partner / Spouse</a><!-- <br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"groupRadio\" value=\"group\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'groupRadio\').checked=\'true\';selectType();return false;\">Group / Club</a> -->\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n{assign var=\"includeX\" value=\"true\"}\r\n\r\n{if $newcomp.startDate}\r\n	{assign var=\"startDate\" value=$newcomp.startDate}\r\n{else}\r\n	{assign var=\"startDate\" value=$smarty.now}\r\n{/if}\r\n{if $newcomp.endDate}\r\n	{assign var=\"endDate\" value=$newcomp.endDate}\r\n{else}\r\n	{assign var=\"endDate\" value=$smarty.now|math:\"x+5184000\"}  {* Now + 2 Months *}\r\n{/if}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectParams\',\'hideSelectParams\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Competition Parameters:</h2>\r\n<input type=\"hidden\" id=\"hideSelectParams\" name=\"newcomp[hideSelectParams]\" value=\"{$newcomp.hideSelectParams|default:0}\" />\r\n<div id=\"selectParams\" style=\"margin:10px; display:{if $newcomp.hideSelectParams eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Name:</div></td>\r\n		<td><input type=\"text\" name=\"newcomp[name]\" class=\"textInput\" size=\"22\" maxlength=\"32\" style=\"width:220px;\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Any old thing you want to reference this competition by.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Start Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar0\" style=\"float:left; display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n				<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLable\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar0\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>End Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar1\" style=\"float:left; display:none; border:#999999 1px solid; width:100px;\" align=\"center\">\r\n				<iframe name=\"frameCalendar2\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=1&year={$endDate|date_format2:\"Y\"}&month={$endDate|date_format2:\"m\"}&day={$endDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLable\" disabled=\"disabled\" name=\"newcomp[endDateViewable]\" value=\"{if not $newcomp.endDate}Click a Date ^{else}{$newcomp.endDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar1\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[endDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Style:</div></td>\r\n		<td><select name=\"newcomp[style]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Everyone-vs-Everyone\">Everyone vs. Everyone</option>\r\n			<option value=\"Group-vs-Group\">Team vs. Team</option>\r\n			<option value=\"One-on-One\">One on One</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Jackpot Method:</div></td>\r\n		<td><select name=\"newcomp[potMethod]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Per-competitor Donations\">Per-competitor Donations</option>\r\n			<option value=\"Individual Charity\">Individual Charity</option>\r\n			<option value=\"Company Charity\">Company Charity</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Where the \"Jackpot\" money comes from.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Jackpot Contribution:</div></td>\r\n		<td valign=\"middle\"><span style=\"position:relative; top:-5px;\">$</span><input type=\"text\" name=\"newcomp[individualPotAmount]\" class=\"textInput\" size=\"4\" maxlength=\"4\" style=\"width:30px;\" /><span style=\"position:relative; top:-5px;\">.00</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Each individual must enter this much into the jackpot to join,<br />\r\n			 including you, when the competition is created.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Scoring Method:</div></td>\r\n		<td><select name=\"newcomp[scoringMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage Weight Lost</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>How the winner is determined.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Tie-Breaker Method:</span></td>\r\n		<td><select name=\"newcomp[tieBreakerMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\"{if not $newcomp.tieBreakerMethod} selected{/if}>Percentage Weight Lost</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>How the winner is determined, in the event of a tie.</small></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectInvite\', \'hideSelectInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Choose an Invitation Style:</h2>\r\n<input type=\"hidden\" id=\"hideSelectInvite\" name=\"newcomp[hideSelectInvite]\" value=\"{$newcomp.hideSelectInvite|default:0}\" />	\r\n<div id=\"selectInvite\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectInvite eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div>\r\n			Select the type of invitation you want to send out to your first group of contacts.</div>\r\n				\r\n		<div id=\"smack\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">SMACK!</h2>\r\n				<b>example:</b><br /> &quot;I challenge you to the battle of all battles, you stinky monkey!&quot;</div>\r\n			</div>\r\n					\r\n			<div id=\"challenge\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Challenge</h2>\r\n				<b>example:</b><br /> &quot;I\'m putting up $20 to take you down in a 6-week weight-loss competition!&quot;</div>\r\n			</div>\r\n				\r\n			<div id=\"friendly\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Friendly</h2>\r\n				<b>example:</b><br /> &quot;I bet that I can lose more body fat that you.&quot;</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"inviteRadios\">\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"smackRadio\" value=\"smack\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'smackRadio\').checked=\'true\';selectInvite();return false;\">SMACK!</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"challengeRadio\" value=\"challenge\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'challengeRadio\').checked=\'true\';selectInvite();return false;\">Challenge</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"friendlyRadio\" value=\"friendly\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendlyRadio\').checked=\'true\';selectInvite();return false;\">Friendly</a>\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" align=\"right\" style=\"margin:0px;\">\r\n	<a href=\"javascript:document.compStartForm.submit();\"><img src=\"{$skinFolder}images/btn_next.gif\" border=\"0\" /></a></div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n\r\n	<script language=\"JavaScript\">{literal}\r\n	function selectType() {\r\n		var type;\r\n		var types = Array(\'corporate\',\'friends\',\'partner\',\'group\');\r\n		var elems = document.getElementsByName(\'newcomp[type]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'friends\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function selectInvite() {\r\n		var type;\r\n		var types = Array(\'smack\',\'challenge\',\'friendly\');\r\n		var elems = document.getElementsByName(\'newcomp[invitationType]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'smack\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function updateScoringMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[scoringMethod]\') ? \'newcomp[tieBreakerMethod]\' : \'newcomp[scoringMethod]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		other.selectedIndex = (obj.selectedIndex == 0) ? 1 : 0;\r\n	}\r\n	\r\n	{/literal}\r\n</script>'),(1007,91,0.57,'smarty','0','Updated some visual cues.',1085105381,3,'24.2.66.215','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{* display var=$newcomp *}\r\n\r\n<h1>Create a Competition: Step 1</h1>\r\n<div class=\"pixel underline\">&nbsp;</div>\r\n<br />\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectComp\',\'hideSelectComp\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Selected Competition Type:</h2>\r\n<input type=\"hidden\" id=\"hideSelectComp\" name=\"newcomp[hideSelectComp]\" value=\"{$newcomp.hideSelectComp|default:0}\" />\r\n<div id=\"selectComp\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectComp eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div id=\"corporate\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Corporate</h2>\r\n				Discover how WeightLossWars can help your business cut costs, and boost productivity!</div>\r\n			</div>\r\n					\r\n			<div id=\"friends\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Family/Friends</h2>\r\n				\'Call out\' your friends and see who has what it takes to win the Weight War!</div>\r\n			</div>\r\n				\r\n			<div id=\"partner\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Partner/Spouse</h2>\r\n				Face off in a grueling head to head competition against your spouse or close friend.</div>\r\n			</div>\r\n				\r\n			<div id=\"group\" style=\"display:{if $newcomp.type eq \"group\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_alert.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Group/Club</h2>\r\n				Team up with your homies to battle another group in an all-out weight loss rumble</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"compRadios\">\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"corporateRadio\" value=\"corporate\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'corporateRadio\').checked=\'true\';selectType();return false;\">Corporate</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"friendsRadio\" value=\"friends\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendsRadio\').checked=\'true\';selectType();return false;\">Family / Friends</a><br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"partnerRadio\" value=\"partner\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'partnerRadio\').checked=\'true\';selectType();return false;\">Partner / Spouse</a><!-- <br />\r\n				<input type=\"radio\" name=\"newcomp[type]\" id=\"groupRadio\" value=\"group\" onclick=\"selectType();\" onchange=\"selectType();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'groupRadio\').checked=\'true\';selectType();return false;\">Group / Club</a> -->\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n{assign var=\"includeX\" value=\"true\"}\r\n\r\n{if $newcomp.startDate}\r\n	{assign var=\"startDate\" value=$newcomp.startDate}\r\n{else}\r\n	{assign var=\"startDate\" value=$smarty.now}\r\n{/if}\r\n{if $newcomp.endDate}\r\n	{assign var=\"endDate\" value=$newcomp.endDate}\r\n{else}\r\n	{assign var=\"endDate\" value=$smarty.now|math:\"x+5184000\"}  {* Now + 2 Months *}\r\n{/if}\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectParams\',\'hideSelectParams\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Competition Parameters:</h2>\r\n<input type=\"hidden\" id=\"hideSelectParams\" name=\"newcomp[hideSelectParams]\" value=\"{$newcomp.hideSelectParams|default:0}\" />\r\n<div id=\"selectParams\" style=\"margin:10px; display:{if $newcomp.hideSelectParams eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Name:</div></td>\r\n		<td><input type=\"text\" name=\"newcomp[name]\" class=\"textInput\" size=\"22\" maxlength=\"32\" style=\"width:220px;\" /></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Any old thing you want to reference this competition by.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Start Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar0\" style=\"float:left; display:none; border:#999999 1px solid; width:100px; z-index:20;\" align=\"center\">\r\n				<iframe name=\"frameCalendar\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=0&year={$startDate|date_format2:\"Y\"}&month={$startDate|date_format2:\"m\"}&day={$startDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[startDateViewable]\" value=\"{if not $newcomp.startDate}Click a Date >{else}{$newcomp.startDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar0\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[startDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>End Date:</div></td>\r\n		<td valign=\"middle\"><div id=\"fCalendar1\" style=\"float:left; display:none; border:#999999 1px solid; width:100px;\" align=\"center\">\r\n				<iframe name=\"frameCalendar2\" height=\"144\" width=\"100%\" src=\"?pg=jscalendar&id=1&year={$endDate|date_format2:\"Y\"}&month={$endDate|date_format2:\"m\"}&day={$endDate|date_format2:\"j\"}\" scrolling=\"No\" frameborder=\"image/gif\"></iframe>\r\n			</div>\r\n			<input type=\"text\" class=\"textLabel\" disabled=\"disabled\" name=\"newcomp[endDateViewable]\" value=\"{if not $newcomp.endDate}Click a Date ^{else}{$newcomp.endDate|date_format2:\"M j, Y\"}{/if}\">\r\n			<a href=\"javascript:toggle(\'fCalendar1\');\" onmouseover=\"self.status=\'Show/Hide Calendar\'; return true;\" onmouseout=\"self.status=\'\'; return true;\"><img src=\"{$skinFolder}images/ico_calendar.gif\" border=\"0\" alt=\"Show/Hide Calendar\" /></a>\r\n			<input type=\"hidden\" name=\"newcomp[endDate]\" value=\"\">\r\n		</td>\r\n	</tr>\r\n	\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Competition Style:</div></td>\r\n		<td><select name=\"newcomp[style]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Everyone-vs-Everyone\">Everyone vs. Everyone</option>\r\n			<option value=\"Group-vs-Group\">Team vs. Team</option>\r\n			<option value=\"One-on-One\">One on One</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Jackpot Method:</div></td>\r\n		<td><select name=\"newcomp[potMethod]\" size=\"1\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Per-competitor Donations\">Per-competitor Donations</option>\r\n			<option value=\"Individual Charity\">Individual Charity</option>\r\n			<option value=\"Company Charity\">Company Charity</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Where the \"Jackpot\" money comes from.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\" nowrap><div>Jackpot Contribution:</div></td>\r\n		<td valign=\"middle\"><span style=\"position:relative; top:-5px;\">$</span><input type=\"text\" name=\"newcomp[individualPotAmount]\" class=\"textInput\" size=\"4\" maxlength=\"4\" style=\"width:30px;\" /><span style=\"position:relative; top:-5px;\">.00</span></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>Each individual must enter this much into the jackpot to join,<br />\r\n			 including you, when the competition is created.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><div>Scoring Method:</div></td>\r\n		<td><select name=\"newcomp[scoringMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\">Percentage Weight Lost</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>How the winner is determined.</small></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\" valign=\"middle\"><span>Tie-Breaker Method:</span></td>\r\n		<td><select name=\"newcomp[tieBreakerMethod]\" size=\"1\" onchange=\"updateScoringMethod(this);\" class=\"textInput\" style=\"width:220px;\" />\r\n			<option value=\"Weight Lost\">Weight Lost</option>\r\n			<option value=\"Percentage Weight Lost\"{if not $newcomp.tieBreakerMethod} selected{/if}>Percentage Weight Lost</option></select></td>\r\n	</tr>\r\n	<tr>\r\n		<td>&nbsp;</td>\r\n		<td><div style=\"margin-left:15px;\"><small>How the winner is determined, in the event of a tie.</small></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'selectInvite\', \'hideSelectInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Choose an Invitation Style:</h2>\r\n<input type=\"hidden\" id=\"hideSelectInvite\" name=\"newcomp[hideSelectInvite]\" value=\"{$newcomp.hideSelectInvite|default:0}\" />	\r\n<div id=\"selectInvite\" style=\"margin:10px;\" style=\"display:{if $newcomp.hideSelectInvite eq 1}none{else}block{/if};\">\r\n	<table>\r\n	<tr>\r\n		<td><div>\r\n			Select the type of invitation you want to send out to your first group of contacts.</div>\r\n				\r\n		<div id=\"smack\" style=\"display:{if $newcomp.type eq \"corporate\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_money.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">SMACK!</h2>\r\n				<b>example:</b><br /> &quot;I challenge you to the battle of all battles, you stinky monkey!&quot;</div>\r\n			</div>\r\n					\r\n			<div id=\"challenge\" style=\"display:{if $newcomp.type eq \"friends\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_family.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Challenge</h2>\r\n				<b>example:</b><br /> &quot;I\'m putting up $20 to take you down in a 6-week weight-loss competition!&quot;</div>\r\n			</div>\r\n				\r\n			<div id=\"friendly\" style=\"display:{if $newcomp.type eq \"partner\"}block{else}none{/if};\">\r\n				<img src=\"{$skinFolder}images/icon_weights.gif\" width=\"150\" height=\"150\" class=\"icon\" style=\"float:left;\" />\r\n				<div class=\"chunk\" style=\"text-align:left; width:250px; height:140px;\"><h2 class=\"withBG\">Friendly</h2>\r\n				<b>example:</b><br /> &quot;I bet that I can lose more body fat that you.&quot;</div>\r\n			</div>\r\n			\r\n			<div class=\"chunk\" style=\"text-align:left; width:140px; height:140px;\" id=\"inviteRadios\">\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"smackRadio\" value=\"smack\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'smackRadio\').checked=\'true\';selectInvite();return false;\">SMACK!</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"challengeRadio\" value=\"challenge\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'challengeRadio\').checked=\'true\';selectInvite();return false;\">Challenge</a><br />\r\n				<input type=\"radio\" name=\"newcomp[invitationType]\" id=\"friendlyRadio\" value=\"friendly\" onclick=\"selectInvite();\" onchange=\"selectInvite();\"> <a href=\"javascript://\" onclick=\"document.getElementById(\'friendlyRadio\').checked=\'true\';selectInvite();return false;\">Friendly</a>\r\n			</div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div class=\"hBox\" align=\"right\" style=\"margin:0px;\">\r\n	<a href=\"javascript:document.compStartForm.submit();\"><img src=\"{$skinFolder}images/btn_next.gif\" border=\"0\" /></a></div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n\r\n	<script language=\"JavaScript\">{literal}\r\n	function selectType() {\r\n		var type;\r\n		var types = Array(\'corporate\',\'friends\',\'partner\',\'group\');\r\n		var elems = document.getElementsByName(\'newcomp[type]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'friends\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function selectInvite() {\r\n		var type;\r\n		var types = Array(\'smack\',\'challenge\',\'friendly\');\r\n		var elems = document.getElementsByName(\'newcomp[invitationType]\');\r\n	\r\n		for (var x = 0; x < elems.length; x++) {\r\n			if (elems[x].checked) {\r\n				type = elems[x].value;\r\n				break;\r\n			}\r\n		}\r\n	\r\n		if (!type) type = \'smack\';\r\n	\r\n		for (x = 0; x < types.length; x++) {\r\n			document.getElementById(types[x]).style.display = (types[x] != type) ? \'none\' : \'block\';\r\n		}\r\n	\r\n		return false;\r\n	}\r\n	\r\n	function updateScoringMethod(obj) {\r\n		var name = obj.name;\r\n		var other = (name == \'newcomp[scoringMethod]\') ? \'newcomp[tieBreakerMethod]\' : \'newcomp[scoringMethod]\';\r\n		other = document.getElementsByName(other)[0];\r\n	\r\n		other.selectedIndex = (obj.selectedIndex == 0) ? 1 : 0;\r\n	}\r\n	\r\n	{/literal}\r\n</script>'),(1011,116,0.42,'smarty','0','Added \"Create a Competition\" before \"Step 2\"',1085118188,2,'24.2.66.215','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'makeInvite\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Create Your Invitation Letter:</h2>\r\n<div>	\r\n	In this step you will create an email letter to invite your competitors into your Weight Loss War!<br /><br />\r\n	Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n	<b>\'Create My Own\'</b> below and write your own challenge invitation!  Then click <b>\'Next\'</b> below.</div>\r\n\r\n<div id=\"makeInvite\" style=\"display:block;\">	\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n	\r\n	<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n	<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n	<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n	\r\n	<br />\r\n	\r\n	<table>\r\n	<tr>\r\n		<td valign=\"top\"><div>\r\n			<h2 class=\"withBG\">Examples:</h2>\r\n			<div style=\"margin:0px 10px 0px 10px;\">\r\n				{foreach from=$examples key=\"key\" item=\"example\"}\r\n					<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n				{foreachelse}\r\n					Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n				{/foreach}\r\n			</div>\r\n		</div></td>\r\n		<td>\r\n			<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n			<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"500\">\r\n			<tr>\r\n				<td><div>\r\n					{if $madlibs|@count}\r\n						<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n							<option value=\"\">(Select a MadLib)</option>\r\n						{foreach from=$madlibs item=\"madlib\"}\r\n							<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n						{/foreach}\r\n						</select>\r\n					{else}\r\n						No Madlibs Available!\r\n					{/if}\r\n					<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n				</div></td>\r\n			</tr>\r\n			<tr>\r\n				<td align=\"left\">\r\n					<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n						{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n							<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n						{/foreach}\r\n						</div>\r\n	\r\n					<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n						<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" style=\"width:480px;\" class=\"textarea\"></textarea></div>\r\n				</td>\r\n			</tr>\r\n			</table>\r\n		</td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n<br />\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<script language=\"JavaScript\">\r\n	\r\n	var examples = Array();\r\n	{foreach from=$examples key=\"key\" item=\"example\"}\r\n	examples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n	{/foreach}\r\n	\r\n	{literal}\r\n	\r\n	function toggleType(type) {\r\n		if (type == \'customLetter\') {\r\n			document.getElementById(\'customLetter\').style.display = \'block\';\r\n			document.getElementById(\'madlib\').style.display = \'none\';\r\n			document.getElementById(\'letterType\').value = \'customLetter\';\r\n			document.getElementById(\'madlibsElement\').selectedIndex = 0;\r\n		} else {\r\n			document.getElementById(\'customLetter\').style.display = \'none\';\r\n			document.getElementById(\'madlib\').style.display = \'block\';\r\n			document.getElementById(\'letterType\').value = \'madlib\';\r\n		}\r\n	}\r\n	\r\n	function setExample(key) {\r\n		toggleType(\'customLetter\');\r\n		var ta = document.getElementById(\'customLetterElement\');\r\n	\r\n		if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n			ta.value = examples[key];\r\n		}\r\n	}\r\n	\r\n	function setMadlib(key) {\r\n		var obj;\r\n		key--;\r\n		toggleType(\'madlib\');	\r\n		for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n			obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n		}\r\n	}\r\n	{/literal}\r\n</script>'),(1012,117,0.14,'smarty','0','More.......',1085123834,2,'24.2.66.215','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n{include_php file=\"shared_handle:newcomp.review\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Review</h1>\r\n\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div>\r\n	<br />\r\n	Before finalizing the competition and sending off your invitations,\r\n	please review to make sure everything is correct.\r\n</div>\r\n\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'parameters\', \'hideReviewParameters\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Competition Parameters:</h2>\r\n\r\n<input type=\"hidden\" id=\"hideReviewParameters\" name=\"newcomp[hideReviewParameters]\" value=\"{$newcomp.hideReviewParameters|default:0}\" />\r\n\r\n<div id=\"parameters\" style=\"margin:15px;\" style=\"display:{if $newcomp.hideReviewParameters eq 1}none{else}block{/if};\">\r\n	<table style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td align=\"right\"><div>Comptition Name:</div></td>\r\n		<td><div><b>{$newcomp.name}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Type:</div></td>\r\n		<td><div><b>{$newcomp.type|niceText}, {$newcomp.style}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Term:</div></td>\r\n		<td><div><b>{$newcomp.startDate|date_format2:\"M j, Y\"}</b> to <b>{$newcomp.endDate|date_format2:\"M j, Y\"}</b> ({math equation=\"(b - a) / 86400\" a=$newcomp.startDate b=$newcomp.endDate assign=\"numDays\"}{$numDays|number_format:\"0\"} days)</div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Pot:</div></td>\r\n		<td><div><b>${$newcomp.individualPotAmount|number_format:\"2\"}</b> {if $newcomp.potMethod eq \"Per-competitor Donations\"}(each) {/if}by <b>{$newcomp.potMethod}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Scoring:</div></td>\r\n		<td><div>Based on <b>{$newcomp.scoringMethod}</b> or, in the event of a tie, <b>{$newcomp.tieBreakerMethod}</b></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/start\">Change/Update Your Competition Parameters Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\', \'hideReviewLetter\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Invitation Letter:</h2>\r\n\r\n<input type=\"hidden\" id=\"hideReviewLetter\" name=\"newcomp[hideReviewLetter]\" value=\"{if $newcomp.hideReviewLetter !== \"0\"}1{else}0{/if}\" />\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:{if $newcomp.hideReviewLetter !== \"0\"}none{else}block{/if};margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/create-invitation\">Change/Update Your Invitation Letter Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'invitations\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Who You\'re Inviting:</h2>\r\n\r\n<div id=\"invitations\" style=\"margin:15px;\">\r\n	<table cellpadding=\"3\" style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td><b>Name</b></td>\r\n		<td><b>E-mail Address</b></td>\r\n		<td><b>How You Relate</b></td>\r\n	</tr>\r\n	{section name=\"x\" loop=$newcomp.invite.name}\r\n		{if not ($newcomp.invite.name[x] or $newcomp.invite.email[x] or $newcomp.invite.relation[x])}{php}continue;{/php}{/if}\r\n	<tr>\r\n		<td>{$newcomp.invite.name[x]}</td>\r\n		<td>{$newcomp.invite.email[x]}</td>\r\n		<td>{$newcomp.invite.relation[x]}</td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/send-invitation#invitations\">Change/Update Your Invitations</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n'),(1013,119,0.28,'smarty','0','Adding some nifty looking separators for show/hide sections',1085124830,2,'24.2.66.215','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Review Your Invitation:</h2>\r\n\r\n<div>Make sure that you are satisfied with the invitation you will be sending to the other competitors.</div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:block;margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n<br />\r\n\r\n<a name=\"invitations\" />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'enterEmails\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Invite Some Competitors:</h2>\r\n\r\n<div>Enter a contact name and email address for each person you would like to invite into this competition. Don\'t worry about gathering everyone\'s email address right now, you can always add more later.<br /><br /></div>\r\n\r\n<div id=\"enterEmails\">\r\n	<div class=\"pixel underline2\">&nbsp;</div>\r\n	<div id=\"inviteList\">\r\n	<table align=\"center\" style=\"margin:10px;\">\r\n	<tr>\r\n		<td><div>&nbsp;</div></td>\r\n		<td><h3 class=\"withBG\">Name</h2></td>\r\n		<td><h3 class=\"withBG\">E-Mail</h2></td>\r\n		<td><h3 class=\"withBG\">Your Relation</h2></td>\r\n	</tr> \r\n	{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n	<tr>\r\n		<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n	</div>\r\n	\r\n	<div align=\"right\" style=\"margin-right:30px;\">\r\n		<a href=\"javascript://\" onclick=\"addEmailRows();return false;\">&gt; Click to add more now! &lt;</a>\r\n	</div>\r\n</div>\r\n<div class=\"pixel underline2\">&nbsp;</div>\r\n\r\n\r\n<script language=\"javascript\">\r\n	var addCount = {$addCount};\r\n	{literal}\r\n	function addEmailRows() {\r\n		addCount++;\r\n		var obj = document.getElementById(\'inviteList\');\r\n		var html = obj.innerHTML;\r\n		html = html.replace(/\\<\\/TABLE\\>/i, \'\');\r\n		html += \'<tr><td><div>#\'+addCount+\'</div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][\'+addCount+\']\"></div></td></tr></table>\';\r\n		obj.innerHTML = html;\r\n	}\r\n	{/literal}\r\n</script>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(1014,119,0.29,'smarty','0','Adding some nifty looking separators for show/hide sections',1085129751,2,'24.2.66.215','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Review Your Invitation:</h2>\r\n\r\n<div>Make sure that you are satisfied with the invitation you will be sending to the other competitors.<br /><br /></div>\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:block;\">\r\n	<div class=\"pixel underline2\">&nbsp;</div>\r\n	<br />\r\n	<div style=\"margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n		{eval var=$invitationLetter|nl2br}\r\n	</div>\r\n</div>\r\n<br />\r\n<div class=\"pixel underline2\">&nbsp;</div>\r\n<br />\r\n\r\n<a name=\"invitations\" />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'enterEmails\');\"><img src=\"./img/icons/hide_show.gif\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Invite Some Competitors:</h2>\r\n\r\n<div>Enter a contact name and email address for each person you would like to invite into this competition. Don\'t worry about gathering everyone\'s email address right now, you can always add more later.<br /><br /></div>\r\n\r\n<div id=\"enterEmails\">\r\n	<div class=\"pixel underline2\">&nbsp;</div>\r\n	<div id=\"inviteList\">\r\n	<table align=\"center\" style=\"margin:10px;\">\r\n	<tr>\r\n		<td><div>&nbsp;</div></td>\r\n		<td><h3 class=\"withBG\">Name</h2></td>\r\n		<td><h3 class=\"withBG\">E-Mail</h2></td>\r\n		<td><h3 class=\"withBG\">Your Relation</h2></td>\r\n	</tr> \r\n	{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n	<tr>\r\n		<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n	</div>\r\n	\r\n	<div align=\"right\" style=\"margin-right:30px;\">\r\n		<a href=\"javascript://\" onclick=\"addEmailRows();return false;\">&gt; Click to add more now! &lt;</a>\r\n	</div>\r\n</div>\r\n<div class=\"pixel underline2\">&nbsp;</div>\r\n\r\n\r\n<script language=\"javascript\">\r\n	var addCount = {$addCount};\r\n	{literal}\r\n	function addEmailRows() {\r\n		addCount++;\r\n		var obj = document.getElementById(\'inviteList\');\r\n		var html = obj.innerHTML;\r\n		html = html.replace(/\\<\\/TABLE\\>/i, \'\');\r\n		html += \'<tr><td><div>#\'+addCount+\'</div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][\'+addCount+\']\"></div></td></tr></table>\';\r\n		obj.innerHTML = html;\r\n	}\r\n	{/literal}\r\n</script>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(2579,99,3.34,'smarty','0','commented Team Management Lbs and Wt. columns, only showing %',1101946798,3,'24.10.224.224','{assign var=\"hideWidgets\" value=0}\r\n{assign var=\"hideUserBox\" value=\"true\"}\r\n{assign var=\"showCompanyNews\" value=\"true\"}\r\n{assign var=\"pgLayout\" value=\"file:./layouts/comp_layout2.tpl\"}\r\n{if $competition.userId eq $user->id or $acm->isDomainAdmin()}\r\n	{assign var=\"isManager\" value=\"true\"}\r\n	{include_php file=\"shared_handle:competition.manageTeams\"}\r\n	{include_php file=\"shared_handle:competition.managePlayers\"}\r\n{/if}\r\n\r\n{include_php file=\"shared_handle:competition.load\"}\r\n{include_php file=\"shared_handle:competition.verifyInitialPot\"}\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 y=$competition.startDate z=\"86400\"}\r\n		{math assign=\"marginOfVictory\" equation=\"x - y\" x=$competition.results.winningStat y=$competition.results.secondPlaceStat}\r\n\r\n		{foreach from=$competition.results.winners item=\"winnerData\" key=\"winnerName\"}\r\n			\r\n			<h2><br /><b>{$winnerName}</b> wins{if $competition.potAmount} <b>$<i>{$competition.potAmount|number_format:2}</i></b>{/if}!</h2>\r\n			<br />\r\n			{if not $competition.results.isTie}   {* Not a Tie *}\r\n				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of weight loss rumble, <b>{$winnerName}</b> is the Winner! Based on <b>{$competition.results.winningMethod}</b>, <b>{$winnerName}</b> wins after losing <b>{$competition.results.winningStat|number_format:2} {if $competition.results.winningMethod eq \"Weight Lost\"}pounds{else}% body weight{/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				After a difficult <b>{$daysOfCompetition|number_format:0}</b> days of weight loss rumble, there was a tie in the judging method, <b>{$competition.scoringMethod}</b>. To break this tie, the selected tie breaking method, <b>{$competition.tieBreakerMethod}</b>, was used to determine <b>{$winnerName}</b> as the winner. <b>{$winnerName}</b> lost <b>{$winnerData.$weightLost|number_format:0} pounds</b>, which was <b>{$winnerData.$percentLost|number_format:4}%</b> body weight.\r\n			{/if}\r\n			<br />\r\n			<br />\r\n			<b>{$winnerName}</b> won with a <b>{$marginOfVictory|number_format:4}</b> margin over {foreach from=$competition.results.losers item=\"loser\" key=\"loserName\"}<b>{$loserName}</b>{php}break;{/php}{/foreach}.\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 />Sorry, we were unable to determine the winner of this competition! This may have been caused by an error.<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:#F90;\">(${$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<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 Weeks 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}% of thier body weight{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}exercising <b>{$userValue}</b> miles{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 then <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}%{elseif $weeklyWinnersMethod1 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod1 eq \'Distance Exercised\'}<b>{$userValue}</b> miles{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}% of thier body weight{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}exercising <b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}exercising <b>{$userValue}</b> miles{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 then <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}%{elseif $weeklyWinnersMethod2 eq \'Minutes Exercise\'}<b>{$userValue}</b> minutes{elseif $weeklyWinnersMethod2 eq \'Distance Exercised\'}<b>{$userValue}</b> miles{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\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	{if $competition.scoringMethod eq \"Distance Exercised\"}\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&compId=`$competition.id`&type=distanceExercised&fillPrevious=0&precision=1&totalChange=0&format=wide\"}\r\n	{elseif $competition.scoringMethod eq \"Minutes Exercise\"}\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&compId=`$competition.id`&type=minutesExercise&fillPrevious=0&precision=1&totalChange=0&format=wide\"}\r\n	{else}  {* weight lost, percent lost, weight gained, etc... *}\r\n		{assign var=\"graphURL\" value=\"?pg=flashgraph-frame&compId=`$competition.id`&type=weight&fillPrevious=1&precision=0&totalChange=1&format=wide\"}\r\n	{/if}\r\n	<tr>\r\n		<td><div style=\"border:#999 1px solid;background-color:#FFF;padding:5px;\"><iframe name=\"graphwindow\" src=\"{$graphURL}\" frameborder=\"0\" width=\"625\" height=\"220\" scrollbars=\"no\"></iframe></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td valign=\"top\" align=\"center\" width=\"100%\">\r\n		<small><a href=\"?pg=flashgraph-frame&compId={$competition.id}&type=weight&fillPrevious=1&precision=0&totalChange=1&format=wide\" target=\"graphwindow\">Change in Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type=weight&fillPrevious=1&precision=0&format=wide\" target=\"graphwindow\">Weight</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type=fat&fillPrevious=0&precision=1&format=wide\" target=\"graphwindow\">Fat Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type=calories&fillPrevious=0&precision=1&format=wide\" target=\"graphwindow\">Calorie Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type=carbs&fillPrevious=0&precision=1&format=wide\" target=\"graphwindow\">Carb Intake</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type=minutesExercise&fillPrevious=0&precision=1&format=wide\" target=\"graphwindow\">Exercise Minutes</a> |\r\n		<a href=\"?pg=flashgraph-frame&compId={$competition.id}&type=distanceExercised&fillPrevious=0&precision=1&format=wide\" target=\"graphwindow\">Distance Exercised</a>\r\n		</small></td>\r\n	</tr>\r\n	{* <tr>\r\n		<td colspan=\"2\">\r\n			<h3 class=\"withBG\">Compare With Stars!</h3>\r\n			<div>To graphically and numerically compare to different \"stars\", click a \r\n				category and select one or more stars (hold down the CTRL or SHIFT \r\n				key to select/deselect multiple) then click the \"Compare Now!\" \r\n				button below. When you do, the graph above will be updated to include\r\n				the selected \"stars\" and you will see a comparison window appear below\r\n				to show how you compare.</div>\r\n\r\n			<!-- This DIV is initially Empty. Will contain IFRAME of comparison view. -->\r\n			<div id=\"compareFrameDiv\" style=\"width:375px; display:none;\"><iframe name=\"compareFrame\" src=\"?pg=compare-frame\" frameborder=\"0\" width=\"375\" height=\"180\" scrollbars=\"no\"></iframe></div>\r\n\r\n			<table xwidth=\"99%\" cellspacing=\"1\" cellpadding=\"1\">\r\n			<tr>\r\n			<td xwidth=\"45%\" align=\"center\">\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'players\');\" class=\"button\">Players</a>\r\n					<div id=\"players\" style=\"display:block;\">\r\n						<select size=\"6\" id=\"comparePlayers\" name=\"compare[players]\" style=\"width:100%\">\r\n						{if $competition.style eq \'Group-vs-Group\'}\r\n							{foreach from=$competition.teams item=\"teams\" key=\"teamName\"}\r\n								{foreach from=$teams.users item=\"users\" key=\"userName\"}\r\n									{if $users.hideInitialWeight neq \"Yes\" OR $users.id eq $user->id}<option value=\"{$users.id}\">{$userName}</option>{/if}\r\n								{/foreach}\r\n							{/foreach}\r\n						{else}\r\n							{foreach from=$competition.users item=\"users\" key=\"username\" name=\"dateUpdated\"}\r\n								{if $users.hideInitialWeight neq \"Yes\" OR $users.id eq $user->id}<option value=\"{$users.id}\">{$username}</option>{/if}\r\n							{/foreach}\r\n						{/if}\r\n						</select>\r\n					</div>\r\n				</div>\r\n			</td>\r\n			<td xwidth=\"10%\" style=\"border-left:1px solid #CCC; border-right:1px solid #CCC;\" valign=\"middle\" align=\"center\"><b>Versus</b></td>\r\n			<td xwidth=\"45%\" align=\"center\">\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'animals\');\" class=\"button\">Animals</a>\r\n					<div id=\"animals\" style=\"display:none;\">\r\n						<select size=\"6\" id=\"compareAnimals\" multiple=\"multiple\" name=\"compare[animals]\" style=\"width:100%;\">\r\n						{foreach from=$stars.animals item=\"row\"}\r\n							<option value=\"{$row.id}\">{$row.name}</option>\r\n						{/foreach}\r\n						</select>\r\n					</div>\r\n				</div>\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'athletes\');\" class=\"button\">Athletes</a>\r\n					<div id=\"athletes\" style=\"display:none;\">\r\n						<select size=\"6\" id=\"compareAthletes\" multiple=\"multiple\" name=\"compare[athletes]\" style=\"width:100%;\">\r\n						{foreach from=$stars.athletes item=\"row\"}\r\n							<option value=\"{$row.id}\">{$row.name}</option>\r\n						{/foreach}\r\n						</select>\r\n					</div>\r\n				</div>\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'movies\');\" class=\"button\">Movie Stars</a>\r\n					<div id=\"movies\" style=\"display:none;\">\r\n						<select size=\"6\" id=\"compareMovies\" multiple=\"multiple\" name=\"compare[movies]\" style=\"width:100%;\">\r\n						{foreach from=$stars.movies item=\"row\"}\r\n							<option value=\"{$row.id}\">{$row.name}</option>\r\n						{/foreach}\r\n						</select>\r\n					</div>\r\n				</div>\r\n				<div class=\"chunk\" style=\"width:150px;\">\r\n					<a href=\"javascript://\" onclick=\"toggle(\'politics\');\" class=\"button\">Politicians</a>\r\n					<div id=\"politics\" style=\"display:none;\">\r\n						<select size=\"6\" id=\"comparePolitics\" multiple=\"multiple\" name=\"compare[politics]\" style=\"width:100%;\">\r\n						{foreach from=$stars.politics item=\"row\"}\r\n							<option value=\"{$row.id}\">{$row.name}</option>\r\n						{/foreach}\r\n						</select>\r\n					</div>\r\n				</div>\r\n			</td>\r\n			</tr>\r\n			<tr>\r\n			<td colspan=\"3\" align=\"center\">\r\n				<br /><a href=\"#graph\" class=\"button\" onclick=\"goCompareGraph();\"> &nbsp; &gt; Compare Now! &lt; &nbsp; </a><br />\r\n			</td>\r\n			</table>\r\n		</td>\r\n	</tr> *}\r\n	</table>\r\n<br />\r\n</div>\r\n\r\n{*   comparisons currently disabled\r\n{include_php file=\"shared_handle:getStarStats\"}\r\n\r\n<script language=\"javascript\">{literal}\r\n\r\nfunction goCompareGraph() {\r\n	var elementIds = Array(\'compareAnimals\', \'compareAthletes\', \'compareMovies\', \'comparePolitics\');\r\n	var obj = \'\';\r\n	var ids = \'\';\r\n\r\n	for (var a = 0; a < elementIds.length; a++) {\r\n		obj = document.getElementById(elementIds[a]);\r\n\r\n		for (var x = 0; x < obj.options.length; x++) {\r\n			if (obj.options[x].selected)\r\n				ids += obj.options[x].value + \',\';\r\n		}\r\n	}\r\n\r\n	if (ids) {\r\n		ids = ids.replace(/\\,$/, \'\');\r\n		var url = \'?pg=flashgraph-frame&compId={/literal}{$competition.id}{literal}&type=weight&fillPrevious=1&precision=0&stars=\' + ids;\r\n		graphwindow.location.replace(url);\r\n\r\n		// Now update the content of the compare frame.\r\n		obj = document.getElementById(\'compareFrameDiv\');\r\n		obj.style.display = \'block\';\r\n		\r\n		obj = document.getElementById(\'comparePlayers\');\r\n		var userIds = \'\';\r\n\r\n		for (var x = 0; x < obj.options.length; x++)\r\n			if (obj.options[x].selected)\r\n				userIds += obj.options[x].value;\r\n\r\n		compareFrame.location.replace(\'?pg=compare-frame&stars=\' + ids + \'&userId=\' + userIds);\r\n	} else {\r\n		alert (\'Click on one of the categories to the left and select as many \"stars\" as you would like.\\n\\nTo select multiple \"stars\", hold down the SHIFT or CTRL key while clicking on their names.\\n\\nWhen finished, click this link again to see the comparison.\');\r\n	}\r\n}\r\n\r\n{/literal}</script>\r\n*}  {* End commented out comparison stuff *}\r\n\r\n{* ******************************** GROUP TEAMS/PLAYERS SUMMARY W/MOVING ***************************************** *}\r\n{if $competition.style eq \'Group-vs-Group\'}\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	{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	{/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.teams item=\"teams\" key=\"teamName\"}\r\n			{counter name=\"counterI\" start=\"0\" print=0}\r\n			<div id=\"playersList{counter}\" style=\"float:left;width:310px;overflow:hidden;word-wrap:nowrap; margin:0px 5px 5px 0px;\">\r\n			<h4>{if $teams.name eq \"Waiting to Join\"}Not assigned to a team{else}{$teams.name|default:\"&nbsp;\"}{/if}</h4>\r\n		{if $scoringMethod|regex_match:\"/exercise/i\"}\r\n			<span class=\"cellHeadLarge\">Name</span>\r\n			<span class=\"cellHeadSmall\">Min.</span>\r\n			<span class=\"cellHeadSmall\">Dist.</span>\r\n			<span class=\"cellHeadSmall\">Update</span><br />\r\n			{foreach from=$teams.users item=\"users\" key=\"userName\"}\r\n				<span class=\"cellLarge\" style=\"text-align:left;\"><small>{if $isManager}<input type=\"checkbox\" name=\"changeTeam[players][{$userName}]\" style=\"width:14px;height:14px;margin:0px 2px;\" />{/if}{$userName}</small></span>\r\n				<span class=\"cellSmall\"><small>{$users.$minEx|default:\"-\"|replace:\".00\":\"\"}</small></span>\r\n				<span class=\"cellSmall\"><small>{$users.$distEx|default:\"-\"|replace:\".00\":\"\"}</small></span>\r\n				<span class=\"cellSmall\"><small>{$users.dateOfEntry|date_format2:\"n/j/y\"|default:\"-\"}</small></span>\r\n			{foreachelse}\r\n				{* No players assigned to this team. *}\r\n			{/foreach}\r\n		{else}\r\n			{* display var=$users *}\r\n			<span class=\"cellHeadLarge\">Name</span>\r\n			{* <span class=\"cellHeadTiny\">Wt.</span>\r\n			<span class=\"cellHeadTiny\">{if $scoringMethod eq \"Percentage Weight Lost\"}%\r\n						{elseif $scoringMethod eq \"Weight Lost\"}Lost\r\n						{elseif $scoringMethod eq \"Weight Gained\"}Gain\r\n						{else}Lbs{/if}</span>\r\n			<span class=\"cellHeadTiny\">{if $scoringMethod eq \"Percentage Weight Lost\"}Lost{else}%{/if}</span> *}\r\n			<span class=\"cellHeadTiny\">%</span>\r\n			<span class=\"cellHeadSmall\">Update</span><br />\r\n			{foreach from=$teams.users item=\"users\" key=\"userName\"}\r\n				<span class=\"cellLarge\" style=\"clear:left;text-align:left;\"><small>{if $isManager}<input type=\"checkbox\" name=\"changeTeam[players][{$userName}]\" style=\"width:14px;height:14px;margin:0px 2px;\" />{/if}{$userName}</small></span>\r\n				{* <span class=\"cellTiny\"><small>{if $users.hideInitialWeight neq \"Yes\"}{if $users.CurrentWeight eq \'\'}-{else}{$users.CurrentWeight}{/if}{else}Hidden{/if}</small></span>\r\n				<span class=\"cellTiny\"><small>{if $scoringMethod eq \"Percentage Weight Lost\"}{$users.$scoringMethod|number_format:\"2\"|replace:\".00\":\"\"}{else}{$users.$scoringMethod|default:\"-\"|replace:\".00\":\"\"}{/if}</small></span>\r\n				<span class=\"cellTiny\"><small>{if $scoringMethod eq \"Percentage Weight Lost\"}{$users.$wtLost|default:\"-\"|replace:\".00\":\"\"}{else}{if $users.hideInitialWeight neq \"Yes\"}{$users.$pctLst|number_format:\"2\"|replace:\".00\":\"\"}{else}-{/if}{/if}</small></span> \r\n				*}\r\n				<span class=\"cellTiny\"><small>{if $users.hideInitialWeight neq \"Yes\"}{$users.$pctLst|number_format:\"2\"|replace:\".00\":\"\"}{else}-{/if}</span>\r\n				<span class=\"cellSmall\"><small>{$users.dateOfEntry|date_format2:\"n/j/y\"|default:\"-\"}</small></span><br />\r\n			{foreachelse}\r\n				{* No players assigned to this team. *}\r\n			{/foreach}\r\n		{/if}\r\n			</div>\r\n		{/foreach}\r\n	{if $isManager}\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 $newTeams.name ne $teams.name and $newTeams.name ne \"Waiting to Join\"*}\r\n				{if $newTeams.name ne \"Waiting to Join\"}\r\n					<option value=\"{$newTeams.name}\">{$newTeams.name}</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\r\n{* ********************** LEADERS ******************************* *}\r\n{* <div class=\"chunk300\">\r\n<h2 class=\"withBG\">Leaders</h2>\r\n<div id=\"leadersList\" class=\"contentColumn\">\r\n	<span class=\"cellHeadLarge\">{if $competition.style eq \'Group-vs-Group\'}# of members{else}Competitor{/if}</span\r\n	><span class=\"cellHeadSmall\">{if $scoringMethod eq \"Percentage Weight Lost\"}% Lost{elseif $scoringMethod eq \"Weight Lost\"}lbsLost{elseif $scoringMethod eq \"Weight Gained\"}lbsGain{elseif $scoringMethod eq \"Minutes Exercise\"}Min.{elseif $scoringMethod eq \"Distance Exercised\"}Dist.{/if}</span\r\n	><br />\r\n{if $competition.style eq \'Group-vs-Group\'}\r\n	{foreach from=$competition.teams item=\"compUser\" key=\"username\"}\r\n	<span class=\"cell\"><small>{$compUser.userCount}</small></span><br />\r\n	{/foreach}\r\n{else}\r\n	{foreach from=$competition.users item=\"compUser\" key=\"username\" name=\"leaders\"}\r\n	{*$smarty.foreach.leaders.iteration* }<span class=\"cellLarge\"><small>{$username}</small></span>\r\n	<span class=\"cellSmall\"><small>{if $scoringMethod eq \"Percentage Weight Lost\"}{$compUser.$scoringMethod|number_format:\"2\"} %{else}{$compUser.$scoringMethod}{/if}</small></span><br />\r\n	{/foreach}\r\n{/if}\r\n</div> *}'),(1025,116,0.45,'smarty','0','Begin converting show/hide\'s to new showHide class stuff...',1085175859,2,'208.187.110.149','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.createInvitation\"}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" id=\"letterType\" name=\"newcomp[letterType]\" value=\"{if not $newcomp.letterType}customLetter{/if}\">\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 2</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'makeInvite\', \'hideMakeInvite\', \'showHide\');\"><img id=\"makeInvite_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideMakeInvite eq 1}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Create Your Invitation Letter:</h2>\r\n	<input type=\"hidden\" id=\"hideMakeInvite\" name=\"newcomp[hideMakeInvite]\" value=\"{$newcomp.hideMakeInvite|default:\"0\"}\">\r\n<div>	\r\n	In this step you will create an email letter to invite your competitors into your Weight Loss War!<br /><br />\r\n	Select an Example letter or a fill-in-the-blanks letter to Edit.  If you don\'t like any of those letters then simply click on \r\n	<b>\'Create My Own\'</b> below and write your own challenge invitation!  Then click <b>\'Next\'</b> below.</div>\r\n\r\n<div id=\"makeInvite\" style=\"display:{if $newcomp.hideMakeInvite eq 1}none{else}block{/if};\">	\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n		\r\n	<br />\r\n	\r\n	<table>\r\n	<tr>\r\n		<td valign=\"top\"><div>\r\n			<h2 class=\"withBG\">Examples:</h2>\r\n			<div style=\"margin:0px 10px 0px 10px;\">\r\n				{foreach from=$examples key=\"key\" item=\"example\"}\r\n					<a href=\"javascript://\" onclick=\"setExample({$key});\">{$example.title}</a><br />\r\n				{foreachelse}\r\n					Sorry, there are no<br />examples for this combination<br />of competition type and<br />invitation letter type.\r\n				{/foreach}\r\n			</div>\r\n		</div></td>\r\n		<td>\r\n			<h2 class=\"withBG\">{$newcomp.invitationType|niceText} Letter</h2>\r\n			<table style=\"border:1px solid #AAAAAA;background-color:#CCCCCC;\" width=\"500\">\r\n			<tr>\r\n				<td><div>\r\n					{if $madlibs|@count}\r\n						<select id=\"madlibsElement\" name=\"newcomp[selectedMadlib]\" onchange=\"setMadlib(this.selectedIndex);\">\r\n							<option value=\"\">(Select a MadLib)</option>\r\n						{foreach from=$madlibs item=\"madlib\"}\r\n							<option value=\"{$madlib.id}\">{$madlib.title}</option>\r\n						{/foreach}\r\n						</select>\r\n					{else}\r\n						No Madlibs Available!\r\n					{/if}\r\n					<a href=\"javascript://\" onclick=\"toggleType(\'customLetter\');\" class=\"button\">Create My Own</a>\r\n				</div></td>\r\n			</tr>\r\n			<tr>\r\n				<td align=\"left\">\r\n					<div id=\"madlib\" align=\"left\" style=\"padding:8px;border:1px solid #CCCCCC;background-color:#FFFFFF;display:{if $newcomp.letterType eq \"madlib\"}block{else}none{/if};\">\r\n						{foreach from=$madlibs key=\"key\" item=\"madlib\"}\r\n							<div id=\"madlib{$key}\" style=\"display:{if $newcomp.selectedMadlib eq $madlib.id}block{else}none{/if};\">{eval var=$madlib.body|replace:\"\\n\":\"<br />\"}</div>\r\n						{/foreach}\r\n						</div>\r\n	\r\n					<div id=\"customLetter\" style=\"display:{if $newcomp.letterType eq \"customLetter\" OR not $newcomp.letterType}block{else}none{/if};\">\r\n						<textarea id=\"customLetterElement\" name=\"newcomp[customLetter]\" rows=\"20\" cols=\"40\" style=\"width:480px;\" class=\"textarea\"></textarea></div>\r\n				</td>\r\n			</tr>\r\n			</table>\r\n		</td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n<br />\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<script language=\"JavaScript\">\r\n	\r\n	var examples = Array();\r\n	{foreach from=$examples key=\"key\" item=\"example\"}\r\n	examples[{$key}] = \'{eval var=$example.body|addslashes|replace:\"\\r\":\"\"|replace:\"\\n\":\"\\\\n\"}\';\r\n	{/foreach}\r\n	\r\n	{literal}\r\n	\r\n	function toggleType(type) {\r\n		if (type == \'customLetter\') {\r\n			document.getElementById(\'customLetter\').style.display = \'block\';\r\n			document.getElementById(\'madlib\').style.display = \'none\';\r\n			document.getElementById(\'letterType\').value = \'customLetter\';\r\n			document.getElementById(\'madlibsElement\').selectedIndex = 0;\r\n		} else {\r\n			document.getElementById(\'customLetter\').style.display = \'none\';\r\n			document.getElementById(\'madlib\').style.display = \'block\';\r\n			document.getElementById(\'letterType\').value = \'madlib\';\r\n		}\r\n	}\r\n	\r\n	function setExample(key) {\r\n		toggleType(\'customLetter\');\r\n		var ta = document.getElementById(\'customLetterElement\');\r\n	\r\n		if (!ta.value || confirm(\'Are you sure you want to overwrite your custom letter with this example?\')) {\r\n			ta.value = examples[key];\r\n		}\r\n	}\r\n	\r\n	function setMadlib(key) {\r\n		var obj;\r\n		key--;\r\n		toggleType(\'madlib\');	\r\n		for (var x = 0; x < {/literal}{$madlibs|@count}{literal}; x++) {\r\n			obj = document.getElementById(\'madlib\'+x).style.display = (x != key) ? \'none\' : \'block\';\r\n		}\r\n	}\r\n	{/literal}\r\n</script>'),(1027,117,0.15,'smarty','0','Updated to use the new show/hide class/images.',1085176643,2,'208.187.110.149','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n{include_php file=\"shared_handle:newcomp.review\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Review</h1>\r\n\r\n	{toc_next assign=\"next\"}\r\n	{toc_prev assign=\"prev\"}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div>\r\n	<br />\r\n	Before finalizing the competition and sending off your invitations,\r\n	please review to make sure everything is correct.\r\n</div>\r\n\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'parameters\', \'hideReviewParameters\', \'showHide\');\"><img id=\"parameters_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewParameters}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Competition Parameters:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewParameters\" name=\"newcomp[hideReviewParameters]\" value=\"{$newcomp.hideReviewParameters|default:\"0\"}\" />\r\n\r\n<div id=\"parameters\" style=\"margin:15px;\" style=\"display:{if $newcomp.hideReviewParameters eq 1}none{else}block{/if};\">\r\n	<table style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td align=\"right\"><div>Comptition Name:</div></td>\r\n		<td><div><b>{$newcomp.name}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Type:</div></td>\r\n		<td><div><b>{$newcomp.type|niceText}, {$newcomp.style}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Term:</div></td>\r\n		<td><div><b>{$newcomp.startDate|date_format2:\"M j, Y\"}</b> to <b>{$newcomp.endDate|date_format2:\"M j, Y\"}</b> ({math equation=\"(b - a) / 86400\" a=$newcomp.startDate b=$newcomp.endDate assign=\"numDays\"}{$numDays|number_format:\"0\"} days)</div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Pot:</div></td>\r\n		<td><div><b>${$newcomp.individualPotAmount|number_format:\"2\"}</b> {if $newcomp.potMethod eq \"Per-competitor Donations\"}(each) {/if}by <b>{$newcomp.potMethod}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Scoring:</div></td>\r\n		<td><div>Based on <b>{$newcomp.scoringMethod}</b> or, in the event of a tie, <b>{$newcomp.tieBreakerMethod}</b></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/start\">Change/Update Your Competition Parameters Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\', \'hideReviewLetter\', \'showHide\');\"><img id=\"letter_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewLetter}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Invitation Letter:</h2>\r\n\r\n<input type=\"hidden\" id=\"hideReviewLetter\" name=\"newcomp[hideReviewLetter]\" value=\"{if $newcomp.hideReviewLetter !== \"0\"}1{else}0{/if}\" />\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:{if $newcomp.hideReviewLetter !== \"0\"}none{else}block{/if};margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/create-invitation\">Change/Update Your Invitation Letter Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'invitations\', \'hideReviewInvitations\', \'showHide\');\"><img id=\"invitations_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewInvitations}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Who You\'re Inviting:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewInvitations\" name=\"newcomp[hideReviewInvitations]\" value=\"{$newcomp.hideReviewInvitations|default:\"0\"}\" />\r\n\r\n<div id=\"invitations\" style=\"margin:15px;display:{if $newcomp.hideReviewInvitations eq \"1\"}none{else}block{/if};\">\r\n	<table cellpadding=\"3\" style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td><b>Name</b></td>\r\n		<td><b>E-mail Address</b></td>\r\n		<td><b>How You Relate</b></td>\r\n	</tr>\r\n	{section name=\"x\" loop=$newcomp.invite.name}\r\n		{if not ($newcomp.invite.name[x] or $newcomp.invite.email[x] or $newcomp.invite.relation[x])}{php}continue;{/php}{/if}\r\n	<tr>\r\n		<td>{$newcomp.invite.name[x]}</td>\r\n		<td>{$newcomp.invite.email[x]}</td>\r\n		<td>{$newcomp.invite.relation[x]}</td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/send-invitation#invitations\">Change/Update Your Invitations</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n'),(1028,119,0.31,'smarty','0','Added new show/hide classes/images.',1085181163,2,'208.187.110.149','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n{toc_next assign=\"next\"}\r\n{toc_prev assign=\"prev\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Step 3</h1>\r\n<br />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\', \'hideLetter\', \'showHide\');\"><img id=\"letter_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideLetter}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Review Your Invitation:</h2>\r\n	<input type=\"hidden\" id=\"hideLetter\" name=\"newcomp[hideLetter]\" value=\"{$newcomp.hideLetter|default:\"0\"}\">\r\n\r\n<div>Make sure that you are satisfied with the invitation you will be sending to the other competitors.<br /><br /></div>\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:{if $newcomp.hideLetter eq \"1\"}none{else}block{/if};\">\r\n	<div class=\"pixel underline2\">&nbsp;</div>\r\n	<br />\r\n	<div style=\"margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n		{eval var=$invitationLetter|nl2br}\r\n	</div>\r\n</div>\r\n<br />\r\n<div class=\"pixel underline2\">&nbsp;</div>\r\n<br />\r\n\r\n<a name=\"invitations\" />\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'enterEmails\', \'hideEnterEmails\', \'showHide\');\"><img id=\"enterEmails_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideEnterEmails}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Invite Some Competitors:</h2>\r\n	<input type=\"hidden\" id=\"hideEnterEmails\" name=\"newcomp[hideEnterEmails]\" value=\"{$newcomp.hideEnterEmails|default:\"0\"}\">\r\n\r\n<div>Enter a contact name and email address for each person you would like to invite into this competition. Don\'t worry about gathering everyone\'s email address right now, you can always add more later.<br /><br /></div>\r\n\r\n<div id=\"enterEmails\" style=\"display:{if $newcomp.hideEnterEmails eq \"1\"}none{else}block{/if};\">\r\n	<div class=\"pixel underline2\">&nbsp;</div>\r\n	<div id=\"inviteList\">\r\n	<table align=\"center\" style=\"margin:10px;\">\r\n	<tr>\r\n		<td><div>&nbsp;</div></td>\r\n		<td><h3 class=\"withBG\">Name</h2></td>\r\n		<td><h3 class=\"withBG\">E-Mail</h2></td>\r\n		<td><h3 class=\"withBG\">Your Relation</h2></td>\r\n	</tr> \r\n	{section name=\"contactLoop\" loop=$addCount}  {* $addCount is assigned by the handler... *}\r\n	<tr>\r\n		<td><div>#{$smarty.section.contactLoop.iteration}</div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n		<td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][{$smarty.section.contactLoop.iteration}]\"></div></td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n	</div>\r\n	\r\n	<div align=\"right\" style=\"margin-right:30px;\">\r\n		<a href=\"javascript://\" onclick=\"addEmailRows();return false;\">&gt; Click to add more now! &lt;</a>\r\n	</div>\r\n</div>\r\n<div class=\"pixel underline2\">&nbsp;</div>\r\n\r\n\r\n<script language=\"javascript\">\r\n	var addCount = {$addCount};\r\n	{literal}\r\n	function addEmailRows() {\r\n		addCount++;\r\n		var obj = document.getElementById(\'inviteList\');\r\n		var html = obj.innerHTML;\r\n		html = html.replace(/\\<\\/TABLE\\>/i, \'\');\r\n		html += \'<tr><td><div>#\'+addCount+\'</div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][name][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" style=\"width:200px;\" name=\"newcomp[invite][email][\'+addCount+\']\"></div></td><td><div><input type=\"text\" class=\"textInput\" name=\"newcomp[invite][relation][\'+addCount+\']\"></div></td></tr></table>\';\r\n		obj.innerHTML = html;\r\n	}\r\n	{/literal}\r\n</script>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n<div class=\"hBox\" style=\"text-align:right;\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n</form>'),(1029,117,0.16,'smarty','0','Updated to use the new show/hide class/images.',1085182761,2,'208.187.110.149','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.prepareInvitation\"}\r\n{include_php file=\"shared_handle:newcomp.review\"}\r\n\r\n<h1 class=\"underline\">Create a Competition: Review</h1>\r\n\r\n	{toc_prev assign=\"prev\"}\r\n	{if not $competitionErrors}\r\n		{toc_next assign=\"next\"}\r\n	{/if}\r\n\r\n<form name=\"compStartForm\" method=\"post\" style=\"margin:0px;\">\r\n<input type=\"hidden\" name=\"pg\" value=\"{toc_next}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div>\r\n	<br />\r\n	Before finalizing the competition and sending off your invitations,\r\n	please review to make sure everything is correct.\r\n</div>\r\n\r\n<br />\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'parameters\', \'hideReviewParameters\', \'showHide\');\"><img id=\"parameters_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewParameters}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Competition Parameters:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewParameters\" name=\"newcomp[hideReviewParameters]\" value=\"{$newcomp.hideReviewParameters|default:\"0\"}\" />\r\n\r\n<div id=\"parameters\" style=\"margin:15px;\" style=\"display:{if $newcomp.hideReviewParameters eq 1}none{else}block{/if};\">\r\n	<table style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td align=\"right\"><div>Comptition Name:</div></td>\r\n		<td><div><b>{$newcomp.name}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Type:</div></td>\r\n		<td><div><b>{$newcomp.type|niceText}, {$newcomp.style}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Term:</div></td>\r\n		<td><div><b>{$newcomp.startDate|date_format2:\"M j, Y\"}</b> to <b>{$newcomp.endDate|date_format2:\"M j, Y\"}</b> ({math equation=\"(b - a) / 86400\" a=$newcomp.startDate b=$newcomp.endDate assign=\"numDays\"}{$numDays|number_format:\"0\"} days)</div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Pot:</div></td>\r\n		<td><div><b>${$newcomp.individualPotAmount|number_format:\"2\"}</b> {if $newcomp.potMethod eq \"Per-competitor Donations\"}(each) {/if}by <b>{$newcomp.potMethod}</b></div></td>\r\n	</tr>\r\n	<tr>\r\n		<td align=\"right\"><div>Scoring:</div></td>\r\n		<td><div>Based on <b>{$newcomp.scoringMethod}</b> or, in the event of a tie, <b>{$newcomp.tieBreakerMethod}</b></div></td>\r\n	</tr>\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/start\">Change/Update Your Competition Parameters Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'letter\', \'hideReviewLetter\', \'showHide\');\"><img id=\"letter_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewLetter}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Your Invitation Letter:</h2>\r\n\r\n<input type=\"hidden\" id=\"hideReviewLetter\" name=\"newcomp[hideReviewLetter]\" value=\"{if $newcomp.hideReviewLetter !== \"0\"}1{else}0{/if}\" />\r\n\r\n<div id=\"letter\" align=\"left\" style=\"display:{if $newcomp.hideReviewLetter !== \"0\"}none{else}block{/if};margin:10px;padding:17px;\" class=\"notepaperBG\">\r\n	{eval var=$invitationLetter|nl2br}\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/create-invitation\">Change/Update Your Invitation Letter Now</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<h2 class=\"withBG\">\r\n	<div class=\"topRight hideShow\">\r\n		<a href=\"javascript:toggle(\'invitations\', \'hideReviewInvitations\', \'showHide\');\"><img id=\"invitations_img\" src=\"./img/blank.gif\" class=\"showHide_{if $newcomp.hideReviewInvitations}off{else}on{/if}\" alt=\"show/hide\" border=\"0\" /></a></div>\r\n	Who You\'re Inviting:</h2>\r\n	<input type=\"hidden\" id=\"hideReviewInvitations\" name=\"newcomp[hideReviewInvitations]\" value=\"{$newcomp.hideReviewInvitations|default:\"0\"}\" />\r\n\r\n<div id=\"invitations\" style=\"margin:15px;display:{if $newcomp.hideReviewInvitations eq \"1\"}none{else}block{/if};\">\r\n	<table cellpadding=\"3\" style=\"margin-left:35px;\">\r\n	<tr>\r\n		<td><b>Name</b></td>\r\n		<td><b>E-mail Address</b></td>\r\n		<td><b>How You Relate</b></td>\r\n	</tr>\r\n	{section name=\"x\" loop=$newcomp.invite.name}\r\n		{if not ($newcomp.invite.name[x] or $newcomp.invite.email[x] or $newcomp.invite.relation[x])}{php}continue;{/php}{/if}\r\n	<tr>\r\n		<td>{$newcomp.invite.name[x]}</td>\r\n		<td>{$newcomp.invite.email[x]}</td>\r\n		<td>{$newcomp.invite.relation[x]}</td>\r\n	</tr>\r\n	{/section}\r\n	</table>\r\n</div>\r\n\r\n<div align=\"right\">\r\n	<br />\r\n	<a class=\"button\" href=\"?pg=newcomp/send-invitation#invitations\">Change/Update Your Invitations</a>\r\n	<br /><br />\r\n</div>\r\n\r\n<div class=\"hBox\" style=\"text-align:right;margin:0px;\"\">\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\" onclick=\"pg.value=\'{$next.pageName}\';\">{/if}	\r\n</div>\r\n\r\n{stored_object_fill_form object=$newcomp name=\"newcomp\"}\r\n\r\n</form>\r\n'),(1030,121,0.10,'php','0','Page created.',1085182772,2,'208.187.110.149',''),(1031,121,0.11,'php','0','Page created.',1085528510,2,'24.2.96.192','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.verifyAccount\"}\r\n{include_php file=\"shared_handle:newcomp.verifyInitialPot\"}\r\n\r\n'),(1032,121,0.12,'smarty','0','Page created.',1085528982,2,'24.2.96.192','{stored_object name=$blah|cat:\'u\':$user->id type=\"newcomp\" from=\"newcomp\" assign=\"newcomp\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n{include_php file=\"shared_handle:newcomp.verifyAccount\"}\r\n{include_php file=\"shared_handle:newcomp.verifyInitialPot\"}\r\n\r\n{toc_next assign=\"next\"}\r\n\r\n{redirect href=$blah|cat:\"./?pg=\":$next.pageName}'),(1033,122,0.10,'php','0','Page created.',1085528995,2,'24.2.96.192',''),(1034,122,0.11,'php','0','Page created.',1085529026,2,'24.2.96.192','<h1>Congratulations! You have successfully created a competition!</h1>'),(2713,175,0.24,'smarty','0','Page created.',1103518164,2,'67.166.75.78','{if $user->isLoggedIn()}\r\n	{redirect href=\"index.php?pg=myhome\"}\r\n{else}\r\n{assign var=\"hideLogin\" value=\"true\"}\r\n<center>\r\n<div style=\"width:auto; float:left;\">\r\n	<div>\r\n		<div class=\"chunk300\">\r\n			<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n			<input type=\"hidden\" name=\"return\" value=\"{$smarty.request.return|default:$signup.returndefault:\"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\" 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.loginForm2.submit();\">Submit</a> | <a href=\"javascript:doForgotPassword(\'usernameBox2\', \'loginForm2\');\">Forgot Password?</a>\r\n			</form>\r\n			<script language=\"javascript\">\r\n				document.forms.loginForm2.username.focus();\r\n			</script>\r\n		</div>\r\n	</div>\r\n	<div align=\"right\" style=\"clear:left;\">\r\n		<a href=\"?pg=signup/begin\">Sign Up Now!</a>\r\n	</div>\r\n</div>\r\n</center>\r\n{/if}'),(2714,175,0.25,'smarty','0','Page created.',1103518269,2,'67.166.75.78','{if $user->isLoggedIn()}\r\n	{redirect href=\"index.php?pg=myhome\"}\r\n{else}\r\n{assign var=\"hideLogin\" value=\"true\"}\r\n	<div>\r\n		<div class=\"chunk300\">\r\n			<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n			<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n			<input type=\"hidden\" name=\"return\" value=\"{$smarty.request.return|default:$signup.returndefault:\"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\" 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				<input type=\"submit\" name=\"submit\" value=\"Submit\" style=\"position:absolute; top:-300px; left:-300px;\" />\r\n				<a href=\"javascript:document.loginForm2.submit();\">Submit</a> | <a href=\"javascript:doForgotPassword(\'usernameBox2\', \'loginForm2\');\">Forgot Password?</a>\r\n			</form>\r\n			<script language=\"javascript\">\r\n				document.forms.loginForm2.username.focus();\r\n			</script>\r\n		</div>\r\n	</div>\r\n	<div align=\"right\" style=\"clear:left;\">\r\n		<a href=\"?pg=signup/begin\">Sign Up Now!</a>\r\n	</div>\r\n{/if}'),(2527,102,0.50,'smarty','0','Renamed Goals to Profile.',1101769157,3,'24.10.224.224','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n{comment var=$signup}\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1 class=\"underline\">Sign Up - Step 2 - Your Profile</h1>\r\n<p>This step includes recording you initial weight and goals. Each field will be used to calculate other factors including your Body Mass Index. To hide your body weight from others select \'Yes.\' By selecting \'Yes\' others will only see your change in weight (i.e. -5 lbs).<small> * indicates a required field</small></p>\r\n\r\n{include_php file=\"shared_handle:signup.details\"}\r\n\r\n<!-- {$signup.return} -->\r\n\r\n<div>\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=\"{$next.pageName}\">\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*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\r\n*Current Weight:\r\n<input type=\"text\" name=\"signup[initialWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Hide Initial Weight?:\r\n<input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"Yes\"{if $signup[hideInitialWeight] neq \"No\"} checked{/if} /> Yes &nbsp; <input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"No\"{if $signup[hideInitialWeight] eq \"No\"} checked{/if} /> No<br />\r\n\r\n*Goal Weight:\r\n<input type=\"text\" name=\"signup[goalWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Height:\r\n<input type=\"text\" name=\"signup[height][feet]\" class=\"textInput\" maxlength=\"1\" style=\"width:18px;\" /> feet, \r\n<input type=\"text\" name=\"signup[height][inches]\" class=\"textInput\" maxlength=\"2\" style=\"width:20px;\" /> inches<br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Goal</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalGoal]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Motto</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalSaying]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Your Signature</h2>\r\n        Be creative with your signature! This will go at the bottom of the messages you post on the discussion board and can be changed often.\r\n	<textarea name=\"signup[signature]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><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\r\n</form>\r\n</div>'),(2938,1,2.91,'smarty','0','Added redirect to signup/begin if on a company vanity.',1104491326,2,'67.166.75.78','{if $user->isLoggedIn()}\r\n	{store_messages}	\r\n	{redirect href=\"?pg=myhome\"}\r\n{elseif $smarty.session.company.companyName}\r\n	{store_messages}\r\n	{redirect href=\"?pg=login\"}\r\n{/if}\r\n{if not $errors|@count}\r\n	{assign var=\"pgLayout\" value=\"file:./layouts/home.tpl\"}\r\n{/if}'),(4220,198,0.39,'smarty','0','added content.',1126223566,3,'216.194.127.150','{include file=\"layouts/forceLoggedIn.tpl\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title}</h1>\r\n\r\n<table>\r\n<tr><td valign=\"top\">\r\n	{if $smarty.session.company.preferences.hide_shop eq \"yes\"}\r\n		<br /><br />\r\n	{else}\r\n	<div align=\"right\" style=\"width:200px; float:right;\">\r\n		<a href=\"?pg=my_shop&sub=&tma=VIEW&eids=9\"><img id=\"pedometerDealImg\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /><br style=\"clear:both;\" />\r\n		Buy a Pedometer</a>\r\n	</div>\r\n	{/if}\r\n\r\n	<img src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" class=\"iconJoggers\" /> \r\n	<p>Its time to get Active!  Below you will find links that can help you understand ways to get exercise and be safe. Remember, the most difficult hurdle to exercise is time - but you must make time. Check out the \"At the Office\" link for things you can do at work.</p>\r\n	<br />\r\n	<br />\r\n<blockquote>\r\n<table width=\"100%\" cellspacing=\"10\"><tr>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<h3>Fitness Tools:</h3>\r\n		<img src=\"{$skinFolder}images/pliers.gif\" class=\"floatLeft\" />\r\n		<table cellspacing=\"0\" cellpadding=\"0\"><tr><td>\r\n		<ul>\r\n{toc_display start_id=247 level_limit=1 hide_start=1}\r\n{literal}\r\n		<li><a href=\"?pg={$toc_pageName}\">{$toc_title}<br />\r\n			<small>{$toc_description}<br /><br /></small></a></li>\r\n{/literal}\r\n{/toc_display}\r\n		</ul></td></tr></table>\r\n		<br class=\"clearLeft\" />\r\n		<br />\r\n		<h3>Fitness Tip:</h3>\r\n		<img src=\"{$skinFolder}images/ehc/tack.gif\" class=\"floatLeft\" />\r\n		<blockquote class=\"bgWhite\">{include_php file=\"shared_handle:fitness/echoRandomTip\"}</blockquote>\r\n		<ul>\r\n			<li><a href=\"?pg=tips&sub=exercise_tips\">View All Fitness Tips</a></li>\r\n		</ul>\r\n		</td>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<h3>Fitness Articles:</h3>\r\n		<img src=\"{$skinFolder}images/ehc/newspaper.gif\" class=\"floatLeft\" />\r\n		<table><tr><td><ul>\r\n{toc_display start_id=198 level_limit=1 hide_start=1}\r\n{literal}\r\n		<li><a href=\"?pg={$toc_pageName}\">{$toc_title}<br />\r\n			<small>{$toc_description}<br /><br /></small></a></li>\r\n{/literal}\r\n{/toc_display}\r\n		</ul></td></tr></table>\r\n		</td>\r\n	</tr></table>\r\n	</blockquote>\r\n</td></tr>\r\n</table>'),(4221,198,0.40,'smarty','0','added content.',1126223617,3,'216.194.127.150','{include file=\"layouts/forceLoggedIn.tpl\"}\r\n{assign var=\"pgLayout\" value=\"layouts/withLeftNav.tpl\"}\r\n<h1>{$page.title}</h1>\r\n\r\n<table>\r\n<tr><td valign=\"top\">\r\n	{if $smarty.session.company.preferences.hide_shop neq \"yes\"}\r\n	<div align=\"right\" style=\"width:200px; float:right;\">\r\n		<a href=\"?pg=my_shop&sub=&tma=VIEW&eids=9\"><img id=\"pedometerDealImg\" src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" /><br style=\"clear:both;\" />\r\n		Buy a Pedometer</a>\r\n	</div>\r\n	{/if}\r\n\r\n	<img src=\"blank.gif\" width=\"1\" height=\"1\" alt=\"\" class=\"iconJoggers\" /> \r\n	<p>Its time to get Active!  Below you will find links that can help you understand ways to get exercise and be safe. Remember, the most difficult hurdle to exercise is time - but you must make time. Check out the \"At the Office\" link for things you can do at work.</p>\r\n	<br />\r\n	<br />\r\n<blockquote>\r\n<table width=\"100%\" cellspacing=\"10\"><tr>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<h3>Fitness Tools:</h3>\r\n		<img src=\"{$skinFolder}images/pliers.gif\" class=\"floatLeft\" />\r\n		<table cellspacing=\"0\" cellpadding=\"0\"><tr><td>\r\n		<ul>\r\n{toc_display start_id=247 level_limit=1 hide_start=1}\r\n{literal}\r\n		<li><a href=\"?pg={$toc_pageName}\">{$toc_title}<br />\r\n			<small>{$toc_description}<br /><br /></small></a></li>\r\n{/literal}\r\n{/toc_display}\r\n		</ul></td></tr></table>\r\n		<br class=\"clearLeft\" />\r\n		<br />\r\n		<h3>Fitness Tip:</h3>\r\n		<img src=\"{$skinFolder}images/ehc/tack.gif\" class=\"floatLeft\" />\r\n		<blockquote class=\"bgWhite\">{include_php file=\"shared_handle:fitness/echoRandomTip\"}</blockquote>\r\n		<ul>\r\n			<li><a href=\"?pg=tips&sub=exercise_tips\">View All Fitness Tips</a></li>\r\n		</ul>\r\n		</td>\r\n		<td valign=\"top\" width=\"50%\">\r\n		<h3>Fitness Articles:</h3>\r\n		<img src=\"{$skinFolder}images/ehc/newspaper.gif\" class=\"floatLeft\" />\r\n		<table><tr><td><ul>\r\n{toc_display start_id=198 level_limit=1 hide_start=1}\r\n{literal}\r\n		<li><a href=\"?pg={$toc_pageName}\">{$toc_title}<br />\r\n			<small>{$toc_description}<br /><br /></small></a></li>\r\n{/literal}\r\n{/toc_display}\r\n		</ul></td></tr></table>\r\n		</td>\r\n	</tr></table>\r\n	</blockquote>\r\n</td></tr>\r\n</table>'),(2528,102,0.51,'smarty','0','Renamed Goals to Profile.',1101769176,3,'24.10.224.224','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n{display var=$signup comment=1}\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1 class=\"underline\">Sign Up - Step 2 - Your Profile</h1>\r\n<p>This step includes recording you initial weight and goals. Each field will be used to calculate other factors including your Body Mass Index. To hide your body weight from others select \'Yes.\' By selecting \'Yes\' others will only see your change in weight (i.e. -5 lbs).<small> * indicates a required field</small></p>\r\n\r\n{include_php file=\"shared_handle:signup.details\"}\r\n\r\n<!-- {$signup.return} -->\r\n\r\n<div>\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=\"{$next.pageName}\">\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*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\r\n*Current Weight:\r\n<input type=\"text\" name=\"signup[initialWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Hide Initial Weight?:\r\n<input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"Yes\"{if $signup[hideInitialWeight] neq \"No\"} checked{/if} /> Yes &nbsp; <input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"No\"{if $signup[hideInitialWeight] eq \"No\"} checked{/if} /> No<br />\r\n\r\n*Goal Weight:\r\n<input type=\"text\" name=\"signup[goalWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Height:\r\n<input type=\"text\" name=\"signup[height][feet]\" class=\"textInput\" maxlength=\"1\" style=\"width:18px;\" /> feet, \r\n<input type=\"text\" name=\"signup[height][inches]\" class=\"textInput\" maxlength=\"2\" style=\"width:20px;\" /> inches<br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Goal</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalGoal]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Motto</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalSaying]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Your Signature</h2>\r\n        Be creative with your signature! This will go at the bottom of the messages you post on the discussion board and can be changed often.\r\n	<textarea name=\"signup[signature]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><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\r\n</form>\r\n</div>'),(1045,104,0.12,'smarty','0','Page created.',1085603636,2,'24.2.96.192','<h1>Sign Up - Complete!</h1>\r\n\r\n{include_php file=\"shared_handle:signup.goals\"}\r\n\r\n'),(1046,104,0.13,'smarty','0','Page created.',1085603670,2,'24.2.96.192','{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$blah|cat:\'u\':$user->id type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1>Sign Up - Complete!</h1>\r\n\r\n{include_php file=\"shared_handle:signup.goals\"}\r\n\r\n\r\n\r\n'),(2628,102,0.56,'smarty','0','Renamed Goals to Profile.',1103232841,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n<!-- return:{$smarty.request.signup.return} -->\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1 class=\"underline\">Sign Up - Step 2 - Your Profile</h1>\r\n<p>This step includes recording you initial weight and goals. Each field will be used to calculate other factors including your Body Mass Index. To hide your body weight from others select \'Yes.\' By selecting \'Yes\' others will only see your change in weight (i.e. -5 lbs).<small> * indicates a required field</small></p>\r\n\r\n{include_php file=\"shared_handle:signup.details\"}\r\n\r\n<div>\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=\"{$next.pageName}\">\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*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\r\n*Current Weight:\r\n<input type=\"text\" name=\"signup[initialWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Hide Initial Weight?:\r\n<input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"Yes\"{if $signup[hideInitialWeight] neq \"No\"} checked{/if} /> Yes &nbsp; <input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"No\"{if $signup[hideInitialWeight] eq \"No\"} checked{/if} /> No<br />\r\n\r\n*Goal Weight:\r\n<input type=\"text\" name=\"signup[goalWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Height:\r\n<input type=\"text\" name=\"signup[height][feet]\" class=\"textInput\" maxlength=\"1\" style=\"width:18px;\" /> feet, \r\n<input type=\"text\" name=\"signup[height][inches]\" class=\"textInput\" maxlength=\"2\" style=\"width:20px;\" /> inches<br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Goal</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalGoal]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Motto</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalSaying]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Your Signature</h2>\r\n        Be creative with your signature! This will go at the bottom of the messages you post on the discussion board and can be changed often.\r\n	<textarea name=\"signup[signature]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><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\r\n</form>\r\n</div>'),(2529,102,0.52,'smarty','0','Renamed Goals to Profile.',1101769194,3,'24.10.224.224','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1 class=\"underline\">Sign Up - Step 2 - Your Profile</h1>\r\n<p>This step includes recording you initial weight and goals. Each field will be used to calculate other factors including your Body Mass Index. To hide your body weight from others select \'Yes.\' By selecting \'Yes\' others will only see your change in weight (i.e. -5 lbs).<small> * indicates a required field</small></p>\r\n\r\n{include_php file=\"shared_handle:signup.details\"}\r\n\r\n<!-- {$signup.return} -->\r\n\r\n<div>\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=\"{$next.pageName}\">\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*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\r\n*Current Weight:\r\n<input type=\"text\" name=\"signup[initialWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Hide Initial Weight?:\r\n<input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"Yes\"{if $signup[hideInitialWeight] neq \"No\"} checked{/if} /> Yes &nbsp; <input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"No\"{if $signup[hideInitialWeight] eq \"No\"} checked{/if} /> No<br />\r\n\r\n*Goal Weight:\r\n<input type=\"text\" name=\"signup[goalWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Height:\r\n<input type=\"text\" name=\"signup[height][feet]\" class=\"textInput\" maxlength=\"1\" style=\"width:18px;\" /> feet, \r\n<input type=\"text\" name=\"signup[height][inches]\" class=\"textInput\" maxlength=\"2\" style=\"width:20px;\" /> inches<br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Goal</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalGoal]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Motto</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalSaying]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Your Signature</h2>\r\n        Be creative with your signature! This will go at the bottom of the messages you post on the discussion board and can be changed often.\r\n	<textarea name=\"signup[signature]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><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\r\n</form>\r\n</div>'),(1049,104,0.14,'smarty','0','Now using session ID for object name.',1085611450,2,'24.2.96.192','{stored_object name=$smarty.session.sid|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.sid|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1>Sign Up - Complete!</h1>\r\n\r\n{include_php file=\"shared_handle:signup.goals\"}\r\n\r\n\r\n\r\n'),(5252,113,1.56,'smarty','0','Added maxlength 15 on username.',1197582724,16,'166.70.24.189','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n{assign var=\"return\" value=$smarty.request.return|default:$signup.return|default:\"my_competitions/available\"}\r\n<!-- {$return} -->\r\n{if $user->isLoggedIn() and $return neq \"\"}\r\n	{if $return eq \"home\"}\r\n		{message type=\"error\" value=\"You cannot sign up for a membership when you are already logged in.\"}\r\n	{/if}\r\n	{store_messages}\r\n	{redirect href=\"?pg=`$return`\"}\r\n{/if}\r\n{if not $smarty.session.company.id}\r\n	{message type=\"error\" value=\"Unable to determine your company. It is possible you were given an incorrect link. You should go to <b>http://yourcompany.ehealthcompete.com/signup/begin</b> where <b>yourcompany</b> is the name of your company.\"}\r\n	{message type=\"error\" value=\"If you need assistance, please <a href=\\\"?pg=contact\\\">contact us</a>.\"}\r\n	{store_messages}\r\n	{redirect href=\"?pg=`$return`\"}\r\n{/if}\r\n\r\n<h1 class=\"underline\">Sign Up - Step 1</h1>\r\nCreating your <em>FREE</em> membership is simple.  Just fill out the forms below and click Next.<br />\r\n\r\n<table cellpadding=\"0\" cellspacing=\"0\"><tr><td>\r\n\r\n<div class=\"chunk300\">\r\n	<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n	<input type=\"hidden\" name=\"return\" value=\"{$smarty.request.return|default:$signup.returndefault:\"home\"}\" />\r\n	<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n	<h2 class=\"withBG\">Already a Member?</h2>\r\n		<div><a href=\"javascript://\" onclick=\"toggle(\'logInNow\');\">Log in now.</a></div>\r\n		<div id=\"logInNow\" style=\"display:none;\">\r\n		Username: <input type=\"text\" name=\"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.loginForm2.submit();\">Submit</a> | <a href=\"javascript:doForgotPassword();\">Forgot Password?</a>\r\n		</div>\r\n	</form>\r\n</div>\r\n<div class=\"underline\" style=\"clear:left;\"></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=\"{$next.pageName}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" id=\"signupReturn\" name=\"signup[return]\" value=\"{$return}\">\r\n<input type=\"hidden\" name=\"signup[companyId]\" value=\"{$smarty.session.company.id}\" />\r\n\r\n<table><tr><td>\r\n\r\n<div class=\"chunk300 h150 w300\">\r\n<h2 class=\"withBG\">Create your Membership </h2>\r\n	*First Name:\r\n	<input type=\"text\" name=\"signup[firstName]\" class=\"textInput\" size=\"20\" /><br />\r\n\r\n	*Last Name:\r\n	<input type=\"text\" name=\"signup[lastName]\" class=\"textInput\" size=\"20\" /><br />\r\n\r\n	*E-mail:\r\n	<input type=\"text\" name=\"signup[email]\" class=\"textInput\" size=\"30\" /><br />\r\n\r\n	*Desired Username:\r\n	<input type=\"text\" name=\"signup[username]\" class=\"textInput\" size=\"12\" maxlength=\"15\"><br />\r\n        <small>Username must NOT contain your name or your CAI</small><br /><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n<h2 class=\"withBG\">Password</h2>\r\n{if $signup.password}\r\n	<small>You have already chosen a valid password. If you would like to choose a different one, enter it below and confirm it.</small><br /><br />\r\n{/if}\r\n	*Choose Your Password:\r\n	<input type=\"password\" name=\"signupSecure[password]\" size=\"12\" class=\"textInput\"><br />\r\n	<small>(Password must be at least 8 characters long)</small><br />\r\n\r\n	*Confirm Your Password:\r\n	<input type=\"password\" name=\"signupSecure[passwordConfirm]\" size=\"12\" class=\"textInput\"><br />\r\n</div>\r\n\r\n</td><td valign=\"top\">\r\n\r\n<div class=\"chunk300 w300\">\r\n	<h2 class=\"withBG\">Shipping &amp; Contact Address</h2>\r\n	\r\n	<div id=\"addressInfo\" style=\"display:block; width:auto;\">\r\n	*Address:\r\n	<input type=\"text\" name=\"signup[address1]\" value=\"{$smarty.request.signup.address1}\" class=\"textInput\" style=\"width:200px;\" /><br />\r\n	Line 2:\r\n	<input type=\"text\" name=\"signup[address2]\" value=\"{$smarty.request.signup.address2}\" class=\"textInput\" style=\"width:200px;\" /><br />\r\n\r\n	*City:\r\n	<input type=\"text\" name=\"signup[city]\" value=\"{$smarty.request.signup.city}\" class=\"textInput\" style=\"width:200px;\" /><br />\r\n\r\n	*State, *Zip:\r\n	<input type=\"text\" name=\"signup[state]\" value=\"{$smarty.request.signup.state}\" class=\"textInput\" style=\"width:30px;\" maxlength=\"2\" />\r\n	<input type=\"text\" name=\"signup[zip]\" value=\"{$smarty.request.signup.zip}\" class=\"textInput\" style=\"width:50px;\" /><br />\r\n	<div id=\"signupstate\" style=\"text-align:left; margin-left:200px; position:absolute; background-color:#fff; border:1px solid black;\"></div>\r\n\r\n	*Country:\r\n	<input type=\"text\" name=\"signup[country]\" value=\"{$smarty.request.signup.country}\" class=\"textInput\" style=\"width:200px;\" maxlength=\"30\" /><br />\r\n	<div id=\"signupcountry\" style=\"text-align:left; float:left; margin-left:100px; position:absolute; background-color:#fff; border:1px solid black;\"></div>\r\n\r\n	Phone:\r\n	<input type=\"text\" name=\"signup[phone1]\" value=\"{$smarty.request.signup.phone1}\" class=\"textInput\" style=\"width:200px;\" maxlength=\"80\" /><br />\r\n\r\n	Phone 2:\r\n	<input type=\"text\" name=\"signup[phone2]\" value=\"{$smarty.request.signup.phone2}\" class=\"textInput\" style=\"width:200px;\" maxlength=\"80\" /><br />\r\n\r\n	</div>\r\n</div>\r\n<div style=\"clear:left;\">* indicates a required field</div>\r\n</td></tr></table>\r\n\r\n{if $modules.spadeAutoComplete2}\r\n	{capture name=\"headAddendum\"}\r\n	<script language=\"javascript\" src=\"{$modules.spadeAutoComplete2}\"></script>\r\n	<script language=\"javascript\" src=\"js/auto-complete_states.js\"></script>\r\n	<script language=\"javascript\" src=\"js/auto-complete_countries.js\"></script>\r\n	{/capture}\r\n	<script language=\"javascript\">\r\n		initAutoComplete(\'signup[state]\', \'signupstate\', states, true);\r\n		initAutoComplete(\'signup[country]\', \'signupcountry\', countries, true);\r\n	</script>\r\n{/if}\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}\';\"><!-- <input type=\"submit\" class=\"btn\" value=\"&nbsp;&lt;&lt; Back&nbsp;\" onclick=\"pg.value=\'{$prev.pageName}\';\"> |-->&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\"> <!-- <input type=\"submit\" class=\"btn\" value=\"&nbsp;Next &gt;&gt;&nbsp;\"> -->	{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n<script language=\"javascript\">document.getElementById(\'signupReturn\').value = \'{$return}\';</script>\r\n\r\n</form>'),(2530,102,0.53,'smarty','0','Renamed Goals to Profile.',1101769218,3,'24.10.224.224','{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n<!-- {display var=$signup} -->\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1 class=\"underline\">Sign Up - Step 2 - Your Profile</h1>\r\n<p>This step includes recording you initial weight and goals. Each field will be used to calculate other factors including your Body Mass Index. To hide your body weight from others select \'Yes.\' By selecting \'Yes\' others will only see your change in weight (i.e. -5 lbs).<small> * indicates a required field</small></p>\r\n\r\n{include_php file=\"shared_handle:signup.details\"}\r\n\r\n<!-- {$signup.return} -->\r\n\r\n<div>\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=\"{$next.pageName}\">\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*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\r\n*Current Weight:\r\n<input type=\"text\" name=\"signup[initialWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Hide Initial Weight?:\r\n<input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"Yes\"{if $signup[hideInitialWeight] neq \"No\"} checked{/if} /> Yes &nbsp; <input type=\"radio\" name=\"signup[hideInitialWeight]\" value=\"No\"{if $signup[hideInitialWeight] eq \"No\"} checked{/if} /> No<br />\r\n\r\n*Goal Weight:\r\n<input type=\"text\" name=\"signup[goalWeight]\" size=\"4\" maxlength=\"3\" class=\"textInput\" style=\"width:25px;\" /><br />\r\n\r\n*Height:\r\n<input type=\"text\" name=\"signup[height][feet]\" class=\"textInput\" maxlength=\"1\" style=\"width:18px;\" /> feet, \r\n<input type=\"text\" name=\"signup[height][inches]\" class=\"textInput\" maxlength=\"2\" style=\"width:20px;\" /> inches<br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Goal</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalGoal]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Personal Motto</h2>\r\n        This will show up on your about page, and can be changed often.\r\n	<textarea name=\"signup[personalSaying]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n	<h2 class=\"withBG\">Your Signature</h2>\r\n        Be creative with your signature! This will go at the bottom of the messages you post on the discussion board and can be changed often.\r\n	<textarea name=\"signup[signature]\" cols=\"30\" rows=\"5\" style=\"width:295px; height:125px;\"></textarea><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\r\n</form>\r\n</div>'),(1053,104,0.15,'smarty','0','Now using session ID for object name.',1085614321,2,'24.2.96.192','{stored_object name=$smarty.session.sid|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.sid|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n\r\n<h1>Sign Up - Complete!</h1>\r\n\r\n{include_php file=\"shared_handle:signup.goals\"}\r\n\r\n<div>\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=\"{$prev.pageName}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n\r\n<div 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}\';\"><!-- <input type=\"submit\" class=\"btn\" value=\"&nbsp;&lt;&lt; Back&nbsp;\" onclick=\"pg.value=\'{$prev.pageName}\';\"> |-->&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\"> <!-- <input type=\"submit\" class=\"btn\" value=\"&nbsp;Next &gt;&gt;&nbsp;\"> -->	{/if}\r\n</div>\r\n\r\n</form>\r\n</div>\r\n'),(2687,113,1.40,'smarty','0','Working on AutoComplete stuff..',1103339846,3,'67.166.75.78','{assign var=\"pgLayout\" value=\"layouts/default.tpl\"}\r\n{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" from=\"signup\" assign=\"signup\"}\r\n\r\n{if $smarty.request.confirmReset}{stored_object name=$smarty.session.session_id|truncate:10:\"\" type=\"signup\" destroy=\"true\"}{/if}\r\n{assign var=\"return\" value=$smarty.request.return|default:$signup.return|default:\"home\"}\r\n<!-- {$return} -->\r\n{if $user->isLoggedIn() and $return neq \"\"}\r\n	{if $return eq \"home\"}\r\n		{message type=\"error\" value=\"You cannot sign up for a membership when you are already logged in.\"}\r\n	{/if}\r\n	{store_messages}\r\n	{redirect href=\"?pg=`$return`\"}\r\n{/if}\r\n\r\n<h1 class=\"underline\">Sign Up - Step 1</h1>\r\nCreating your <em>FREE</em> membership is simple.  Just fill out the forms below and click Next.\r\n<br />\r\n\r\n<table cellpadding=\"0\" cellspacing=\"0\"><tr><td>\r\n\r\n<div class=\"chunk300\">\r\n	<form name=\"loginForm2\" method=\"post\" action=\"index.php\" style=\"margin:3px;\">\r\n	<input type=\"hidden\" name=\"pg\" value=\"{$page.name}\" />\r\n	<input type=\"hidden\" name=\"return\" value=\"{$smarty.request.return|default:$signup.returndefault:\"home\"}\" />\r\n	<input type=\"hidden\" name=\"no_expire\" value=\"true\" />\r\n	<h2 class=\"withBG\">Already a Member?</h2>\r\n		<b>Log in now.</b><br />\r\n		Username: <input type=\"text\" name=\"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.loginForm2.submit();\">Submit</a> | <a href=\"javascript:doForgotPassword();\">Forgot Password?</a>\r\n	</form>\r\n</div>\r\n<div class=\"underline\" style=\"clear:left;\"></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=\"{$next.pageName}\">\r\n<input type=\"hidden\" name=\"no_expire\" value=\"true\">\r\n<input type=\"hidden\" id=\"signupReturn\" name=\"signup[return]\" value=\"{$return}\">\r\n\r\n<table><tr><td>\r\n\r\n<div class=\"chunk300 h150 w300\">\r\n<h2 class=\"withBG\">Create your Membership </h2>\r\n	*First Name:\r\n	<input type=\"text\" name=\"signup[firstName]\" class=\"textInput\" size=\"20\" /><br />\r\n\r\n	*Last Name:\r\n	<input type=\"text\" name=\"signup[lastName]\" class=\"textInput\" size=\"20\" /><br />\r\n\r\n	*E-mail:\r\n	<input type=\"text\" name=\"signup[email]\" class=\"textInput\" size=\"30\" /><br />\r\n\r\n	*Desired Username:\r\n	<input type=\"text\" name=\"signup[username]\" class=\"textInput\" size=\"12\"><br />\r\n</div>\r\n\r\n<div class=\"chunk300\">\r\n<h2 class=\"withBG\">Password</h2>\r\n{if $signup.password}\r\n	<small>You have already chosen a valid password. If you would like to choose a different one, enter it below and confirm it.</small><br /><br />\r\n{/if}\r\n	*Choose Your Password:\r\n	<input type=\"password\" name=\"signupSecure[password]\" size=\"12\" class=\"textInput\"><br />\r\n	<small>(Password must be at least 8 characters long)</small><br />\r\n\r\n	*Confirm Your Password:\r\n	<input type=\"password\" name=\"signupSecure[passwordConfirm]\" size=\"12\" class=\"textInput\"><br />\r\n</div>\r\n\r\n</td><td valign=\"top\">\r\n\r\n<div class=\"chunk300 w300\">\r\n	<h2 class=\"withBG\">Shipping &amp; Contact Address</h2>\r\n	\r\n	<div id=\"addressInfo\" style=\"display:block; width:auto;\">\r\n	*Address:\r\n	<input type=\"text\" name=\"signup[address1]\" value=\"{$smarty.request.signup.address1}\" class=\"textInput\" style=\"width:200px;\" /><br />\r\n	Line 2:\r\n	<input type=\"text\" name=\"signup[address2]\" value=\"{$smarty.request.signup.address2}\" class=\"textInput\" style=\"width:200px;\" /><br />\r\n\r\n	*City:\r\n	<input type=\"text\" name=\"signup[city]\" value=\"{$smarty.request.signup.city}\" class=\"textInput\" style=\"width:200px;\" /><br />\r\n\r\n	<div style=\"float:right;\">\r\n	*State, *Zip:\r\n	<input type=\"text\" name=\"signup[state]\" value=\"{$smarty.request.signup.state}\" class=\"textInput\" style=\"width:30px;\" maxlength=\"2\" />\r\n	<input type=\"text\" name=\"signup[zip]\" value=\"{$smarty.request.signup.zip}\" class=\"textInput\" style=\"width:50px;\" />\r\n	</div>\r\n	<div id=\"signupstate\" style=\"text-align:left; float:right; xmargin-left:205px; position:absolute; background-color:#fff; border:1px solid black;\">duh</div>\r\n\r\n	*Country:\r\n	<input type=\"text\" name=\"signup[country]\" value=\"{$smarty.request.signup.country}\" class=\"textInput\" style=\"width:200px;\" maxlength=\"30\" />\r\n	<div id=\"signupcountry\" style=\"text-align:left; float:right; xmargin-left:100px; position:absolute; background-color:#fff; border:1px solid black;\">duh</div>\r\n\r\n	Phone:\r\n	<input type=\"text\" name=\"signup[phone1]\" value=\"{$smarty.request.signup.phone1}\" class=\"textInput\" style=\"width:200px;\" maxlength=\"80\" /><br />\r\n\r\n	Phone 2:\r\n	<input type=\"text\" name=\"signup[phone2]\" value=\"{$smarty.request.signup.phone2}\" class=\"textInput\" style=\"width:200px;\" maxlength=\"80\" /><br />\r\n\r\n	</div>\r\n</div>\r\n<div style=\"clear:left;\">* indicates a required field</div>\r\n</td></tr></table>\r\n\r\n{if $modules.spadeAutoComplete2}\r\n	{capture name=\"headAddendum\"}\r\n	<script language=\"javascript\" src=\"{$modules.spadeAutoComplete2}\"></script>\r\n	<script language=\"javascript\" src=\"js/auto-complete_states.js\"></script>\r\n	<script language=\"javascript\" src=\"js/auto-complete_countries.js\"></script>\r\n	{/capture}\r\n	<script language=\"javascript\">\r\n		initAutoComplete(\'signup[state]\', \'signupstate\', states, true);\r\n		initAutoComplete(\'signup[country]\', \'signupcountry\', countries, true);\r\n	</script>\r\n{/if}\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}\';\"><!-- <input type=\"submit\" class=\"btn\" value=\"&nbsp;&lt;&lt; Back&nbsp;\" onclick=\"pg.value=\'{$prev.pageName}\';\"> |-->&nbsp; {/if}\r\n	{if $next.pageName}<input type=\"image\" src=\"{$skinFolder}images/btn_next.gif\" class=\"btn_image\"> <!-- <input type=\"submit\" class=\"btn\" value=\"&nbsp;Next &gt;&gt;&nbsp;\"> -->	{/if}\r\n</div>\r\n\r\n{stored_object_fill_form object=$signup name=\"signup\"}\r\n<script language=\"javascript\">document.getElementById(\'signupReturn\').value = \'{$return}\';</script>\r\n\r\n</form>'),(5253,109,0.36,'smarty','0','Fixed... did not have a closing form tag.',1206652555,16,'166.70.24.189','{if $user->isLoggedIn()}{assign var=\"pgLayout\" value=\"file:layouts/withLeftNav.tpl\"}{/if}\r\n{include_php file=\"shared_handle:contactForm\"}\r\n\r\n<h1>Contact Us</h1>\r\n\r\n<strong>For more information on creating an employee wellness program that fits your company\'s health goals and objectives, please contact us using the form below </strong><br><br>\r\n\r\n<form name=\"contactForm\" action=\"index.php\" method=\"post\">\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>\r\n<tr>\r\n	<td><span>Your Name:</span></td>\r\n	<td><input type=\"text\" name=\"mfName\" value=\"{$smarty.request.mfName|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Your E-mail Address:</span></td>\r\n	<td><input type=\"text\" name=\"mfEmail\" value=\"{$smarty.request.mfEmail|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Your Phone:</span></td>\r\n	<td><input type=\"text\" name=\"mfPhone\" value=\"{$smarty.request.mfPhone|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n\r\n<tr>\r\n	<td><span>Subject:</span></td>\r\n	<td><input type=\"text\" name=\"mfSubject\" value=\"{$smarty.request.mfSubject|stripslashes|htmlspecialchars}\"></td>\r\n</tr>\r\n<tr>\r\n	<td><span>Message Body:</span></td>\r\n	<td><textarea cols=\"35\" rows=\"6\" name=\"mfMessage\">{$smarty.request.mfMessage|stripslashes|htmlspecialchars}</textarea></td>\r\n</tr>\r\n<tr>\r\n	<td><span>&nbsp;</span></td>\r\n	<td><input type=\"submit\" value=\"Send Now\"></td>\r\n</tr>\r\n</table>\r\n{if $smarty.session.company.preferences.contact_email eq \"\"}\r\n	<div class=\"underline\">&nbsp;</div>\r\n	<br />\r\n	<table>\r\n	<tr>\r\n		<td><span>E-Mail:</span></td>\r\n		<td><span><strong>Fill out the form above or email us at <br>{mailto address=\"contact@ehealthcompete.com\" text=\"contact@ehealthcompete.com\" encode=\"javascript\"}</strong></span></td>\r\n	</tr>\r\n	<tr>\r\n		<td><span>Phone:</span></td>\r\n		<td><span><strong>801.443.4823</strong></span></td>\r\n	</tr>\r\n	<!--tr>\r\n		<td><span>Fax:</span></td>\r\n		<td><span><strong>1-801-555-5555 </strong></span></td>\r\n	</tr-->\r\n	<tr>\r\n		<td valign=\"top\" nowrap><span><br>U.S. Mail: &nbsp; &nbsp; </span></td>\r\n		<td><span><strong><br>eHealthCompete, INC. <br>\r\n				1639 S. 825 W.<br>\r\n				Lehi, Ut 84043</strong></span></td>\r\n	</tr>\r\n	</table>\r\n{/if}\r\n</form>\r\n'),(5254,327,0.10,'smarty','0','Page created.',1206734332,16,'166.70.24.189',''),(5255,327,0.11,'smarty','0','Page created.',1206734872,16,'166.70.24.189','<table><tr><td>\r\nAerobics\r\nAir Hockey\r\nArchery\r\nAuto repair\r\nBadminton\r\nBaseball\r\nBasketball\r\nBicycling\r\nBilliards\r\nBowling\r\nBoxing/Kick boxing\r\nCabbage ball\r\nCalisthenics\r\nCanoeing\r\nCardio Machines\r\nChildren\'s Games\r\nCircuit Training\r\nCoaching\r\nCricket\r\nCroquet\r\nCurling\r\nDancing\r\nDarts\r\nDiving\r\nFencing\r\nFishing\r\nFoosball\r\nFootball\r\nFrisbee\r\nGardening\r\nGolf\r\nGymnastics\r\nHacky Sack\r\nHandball\r\nHiking/Backpacking\r\nHockey\r\nHome Repair\r\nHorseback Riding\r\nHorseshoe Pitching\r\nHousehold Tasks\r\nHunting\r\nInline Skating\r\nJuggling\r\nKayaking\r\nLacrosse\r\nLandscaping\r\nLawn Bowling\r\nLawn mowing\r\n</td><td>\r\nLifting/Hauling\r\nMarching\r\nMartial Arts\r\nMountain Biking\r\nPaddleball\r\nPedometer\r\nPilates\r\nPing Pong\r\nPolo\r\nRacquetball\r\nRock Climbing\r\nRoller Skating\r\nRope Jumping\r\nRowing\r\nRugby\r\nRunning\r\nScuba diving\r\nShuffleboard\r\nSkateboarding\r\nSkating\r\nSnorkeling\r\nSoccer\r\nSoftball\r\nSquash\r\nStationary Bike\r\nStretching\r\nSurfing\r\nSwimming\r\nTable Tennis\r\nTai Chi\r\nTennis\r\nTrack & Field\r\nTrampoline\r\nTrap & Skeet\r\nVolleyball\r\nWake boarding\r\nWalking\r\nWallyball\r\nWater Aerobics\r\nWater Jogging\r\nWater Polo\r\nWater Skiing\r\nWeight Training\r\nWrestling\r\nYoga\r\n</td></table>'),(5256,327,0.12,'smarty','0','Page created.',1206735489,16,'166.70.24.189','<table><tr><td>\r\n<table><tr><td>\r\nAerobics\r\n</td></tr><tr><td>\r\nAir Hockey\r\n</td></tr><tr><td>\r\nArchery\r\n</td></tr><tr><td>\r\nAuto repair\r\n</td></tr><tr><td>\r\nBadminton\r\n</td></tr><tr><td>\r\nBaseball\r\n</td></tr><tr><td>\r\nBasketball\r\n</td></tr><tr><td>\r\nBicycling\r\nBilliards\r\nBowling\r\nBoxing/Kick boxing\r\nCabbage ball\r\nCalisthenics\r\nCanoeing\r\nCardio Machines\r\nChildren\'s Games\r\nCircuit Training\r\nCoaching\r\nCricket\r\nCroquet\r\nCurling\r\nDancing\r\nDarts\r\nDiving\r\nFencing\r\nFishing\r\nFoosball\r\nFootball\r\nFrisbee\r\nGardening\r\nGolf\r\nGymnastics\r\nHacky Sack\r\nHandball\r\nHiking/Backpacking\r\nHockey\r\nHome Repair\r\nHorseback Riding\r\nHorseshoe Pitching\r\nHousehold Tasks\r\nHunting\r\nInline Skating\r\nJuggling\r\nKayaking\r\nLacrosse\r\nLandscaping\r\nLawn Bowling\r\nLawn mowing\r\n</td><td>\r\nLifting/Hauling\r\nMarching\r\nMartial Arts\r\nMountain Biking\r\nPaddleball\r\nPedometer\r\nPilates\r\nPing Pong\r\nPolo\r\nRacquetball\r\nRock Climbing\r\nRoller Skating\r\nRope Jumping\r\nRowing\r\nRugby\r\nRunning\r\nScuba diving\r\nShuffleboard\r\nSkateboarding\r\nSkating\r\nSnorkeling\r\nSoccer\r\nSoftball\r\nSquash\r\nStationary Bike\r\nStretching\r\nSurfing\r\nSwimming\r\nTable Tennis\r\nTai Chi\r\nTennis\r\nTrack & Field\r\nTrampoline\r\nTrap & Skeet\r\nVolleyball\r\nWake boarding\r\nWalking\r\nWallyball\r\nWater Aerobics\r\nWater Jogging\r\nWater Polo\r\nWater Skiing\r\nWeight Training\r\nWrestling\r\nYoga\r\n</td></table>'),(5257,327,0.13,'smarty','0','Page created.',1206735810,16,'166.70.24.189','<table><tr><td>\r\n<table><tr><td>\r\nAerobics\r\n</td></tr><tr><td>\r\nAir Hockey\r\n</td></tr><tr><td>\r\nArchery\r\n</td></tr><tr><td>\r\nAuto repair\r\n</td></tr><tr><td>\r\nBadminton\r\n</td></tr><tr><td>\r\nBaseball\r\n</td></tr><tr><td>\r\nBasketball\r\n</td></tr><tr><td>\r\nBicycling\r\n</td></tr><tr><td>\r\nBilliards\r\n</td></tr><tr><td>\r\nBowling\r\n</td></tr><tr><td>\r\nBoxing/Kick boxing\r\n</td></tr><tr><td>\r\nCabbage ball\r\n</td></tr><tr><td>\r\nCalisthenics\r\n</td></tr><tr><td>\r\nCanoeing\r\n</td></tr><tr><td>\r\nCardio Machines\r\n</td></tr><tr><td>\r\nChildren\'s Games\r\n</td></tr><tr><td>\r\nCircuit Training\r\n</td></tr><tr><td>\r\nCoaching\r\n</td></tr><tr><td>\r\nCricket\r\n</td></tr><tr><td>\r\nCroquet\r\n</td></tr><tr><td>\r\nCurling\r\n</td></tr><tr><td>\r\nDancing\r\n</td></tr><tr><td>\r\nDarts\r\n</td></tr><tr><td>\r\nDiving\r\n</td></tr><tr><td>\r\nFencing\r\n</td></tr><tr><td>\r\nFishing\r\n</td></tr><tr><td>\r\nFoosball\r\n</td></tr><tr><td>\r\nFootball\r\n</td></tr><tr><td>\r\nFrisbee</td></tr><tr><td>\r\nGardening</td></tr><tr><td>\r\nGolf</td></tr><tr><td>\r\nGymnastics</td></tr><tr><td>\r\nHacky Sack</td></tr><tr><td>\r\nHandball</td></tr><tr><td>\r\nHiking/Backpacking</td></tr><tr><td>\r\nHockey</td></tr><tr><td>\r\nHome Repair</td></tr><tr><td>\r\nHorseback Riding</td></tr><tr><td>\r\nHorseshoe Pitching</td></tr><tr><td>\r\nHousehold Tasks</td></tr><tr><td>\r\nHunting</td></tr><tr><td>\r\nInline Skating</td></tr><tr><td>\r\nJuggling</td></tr><tr><td>\r\nKayaking</td></tr><tr><td>\r\nLacrosse</td></tr><tr><td>\r\nLandscaping</td></tr><tr><td>\r\nLawn Bowling</td></tr><tr><td>\r\nLawn mowing</td></tr>\r\n</td></tr></table>\r\n<td><table><tr><td>\r\nLifting/Hauling</td></tr><tr><td>\r\nMarching</td></tr><tr><td>\r\nMartial Arts</td></tr><tr><td>\r\nMountain Biking</td></tr><tr><td>\r\nPaddleball</td></tr><tr><td>\r\nPedometer</td></tr><tr><td>\r\nPilates</td></tr><tr><td>\r\nPing Pong</td></tr><tr><td>\r\nPolo</td></tr><tr><td>\r\nRacquetball</td></tr><tr><td>\r\nRock Climbing</td></tr><tr><td>\r\nRoller Skating</td></tr><tr><td>\r\nRope Jumping</td></tr><tr><td>\r\nRowing</td></tr><tr><td>\r\nRugby</td></tr><tr><td>\r\nRunning</td></tr><tr><td>\r\nScuba diving</td></tr><tr><td>\r\nShuffleboard</td></tr><tr><td>\r\nSkateboarding</td></tr><tr><td>\r\nSkating</td></tr><tr><td>\r\nSnorkeling</td></tr><tr><td>\r\nSoccer</td></tr><tr><td>\r\nSoftball</td></tr><tr><td>\r\nSquash</td></tr><tr><td>\r\nStationary Bike</td></tr><tr><td>\r\nStretching</td></tr><tr><td>\r\nSurfing</td></tr><tr><td>\r\nSwimming</td></tr><tr><td>\r\nTable Tennis</td></tr><tr><td>\r\nTai Chi</td></tr><tr><td>\r\nTennis</td></tr><tr><td>\r\nTrack & Field</td></tr><tr><td>\r\nTrampoline</td></tr><tr><td>\r\nTrap & Skeet</td></tr><tr><td>\r\nVolleyball</td></tr><tr><td>\r\nWake boarding</td></tr><tr><td>\r\nWalking</td></tr><tr><td>\r\nWallyball</td></tr><tr><td>\r\nWater Aerobics</td></tr><tr><td>\r\nWater Jogging</td></tr><tr><td>\r\nWater Polo</td></tr><tr><td>\r\nWater Skiing</td></tr><tr><td>\r\nWeight Training</td></tr><tr><td>\r\nWrestling</td></tr><tr><td>\r\nYoga</td></tr><tr><td>\r\n\r\n</td></tr></table>\r\n\r\n</td></tr></table>'),(1057,92,0.13,'smarty','0','testing new Grapher system.',1085646153,3,'24.10.220.247','<div id=\"chunk_container\" style=\"width:750px;\">\r\n	<h1 class=\"pageHead2\">Example Graph</h1>\r\n	<span class=\"pageIntro2\">Click the \'Next\' button to reload this page and see the graph re-plot itself randomly.</span>\r\n\r\n	<div id=\"chunk_0\" style=\"margin:10px 0px 0px 20px; float:left;\">\r\n		<a href=\"?pg=start_join\"><img src=\"{$skinFolder}images/btn_home.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n		<a href=\"?pg=start\"><img src=\"{$skinFolder}images/btn_back.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n		<a href=\"?pg=graph\"><img src=\"{$skinFolder}images/btn_next.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n		<a href=\"javascript:showHelp();\"><img src=\"{$skinFolder}images/btn_help.gif\" style=\"margin-bottom:10px;\" border=\"0\" /></a><br />\r\n	</div>\r\n	\r\n	<div id=\"chunk_4\" class=\"box1\" style=\"width:600px; height:200px; float:left;\">\r\n		<h2>Random Points</h2>\r\n		<br />\r\n		{swf src=\"$skinFolder/flash/grapher.swf\" width=\"550\" height=\"195\" bgcolor=\"#FFFFFF\"}\r\n	</div>\r\n</div>\r\n\r\n<script language=\"javascript\">{literal}\r\n	function showHelp() {\r\n		alert(\"This is the help message for this page!\\n\\nI want to find something that will look suitable for a quick help note.\")\r\n	}\r\n{/literal}</script>'),