//created by jason 5/7/2007 to add monogramming options to product page on store 0 and 1
//edit by wcd 20080212
function draw_mono()
{
	if (info_attributes.toLowerCase()=="mono1")
	{
		document.write('<br><table width=100% style="border:1px solid #000000"><tr valign=top><td align=left>');
		document.write('<table width=100%><tr valign=top><td align=left colspan=2><input type=checkbox name=monogram id=monogram><font class="mono_header">Check Here to Engrave This Item for an Additional $25.</font><br>');
		document.write('<input type=hidden name=qty id=qty><input type=hidden name=sku id=sku><input type=hidden name=info_attr2 id=info_attr2>');
		document.write('<br/>');
		document.write('<ul><li class="mono_style">Engrave up to 3 lines.</li>');
		document.write('<li class="mono_style">Maximum of 60 characters (including punctuation and spaces).</li>');
		document.write('<li class="mono_style">Items are engraved in Roman font.</li>');
		document.write('<li class="mono_style">Engraving will appear exactly as typed.</li>');
		document.write("<li class=\"mono_style\">See <a href=\"javascript:void(0);\" style=\"text-decoration:underline;\" onclick=\"return(visitargs('dept.asp','dept_id=916','URL'))\">samples</a> of our engraving.</a></li>");
		document.write('</ul></td>');
		document.write('</tr><tr><td>');
		document.write('<strong>To engrave one line larger than the others, click the button in front of the line number.</strong><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 1]" />');
		document.write('Line 1: <input id="monogram1" ><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 2]" />');
		document.write('Line 2: <input id="monogram2" ><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 3]" />');
		document.write('Line 3: <input id="monogram3" ><br />');
		document.write('<input type="radio" name="larger" value="" /> (Click here if you want all lines the same size.)');
		document.write('<input type=hidden id="monogram4" value="">');
		document.write('<input type=hidden id="monogram5" value="">');
		document.write('</td><td align=center>');
		document.write('Sample Font:<br /><img src="assets/images/engraving-font-ex.gif" alt="engraving font example graphic" />');
		document.write('</td></tr></table>');
		document.write('<i>In your shopping cart each line of personalization is shown separated by a dash.  The dash will not be included in your engraving.</i>');		if (s_id == "0")
		{
			document.write('<br><br><b>Questions?</b><br>Call 1-888-851-9088</font></td></tr></table>');
		}
		else
		{
			document.write('<br><br><b>Questions?</b><br>Call 1-866-417-2355</font></td></tr></table>');
		}
	}
	else if (info_attributes.toLowerCase()=="mono2")
	{
		document.write('<br><table width=100% style="border:1px solid #000000"><tr valign=top><td align=left>');
		document.write('<table width=100%><tr valign=top><td align=left colspan=2><font class="mono_header"><input type=checkbox name=monogram id=monogram>Check Here to Engrave This Item for an Additional $40.</font><br>');
		document.write('<input type=hidden name=qty id=qty><input type=hidden name=sku id=sku><input type=hidden name=info_attr2 id=info_attr2>');
		document.write('<br/>');
		document.write('<ul><li class="mono_style">Engrave up to 5 lines.</li>');
		document.write('<li class="mono_style">Maximum of 60 characters (including punctuation and spaces).</li>');
		document.write('<li class="mono_style">Items are engraved in Roman font.</li>');
		document.write('<li class="mono_style">Engraving will appear exactly as typed.</li>');
		document.write("<li class=\"mono_style\">See <a href=\"javascript:void(0);\" style=\"text-decoration:underline;\" onclick=\"return(visitargs('dept.asp','dept_id=916','URL'))\">samples</a> of our engraving.</a></li>");
		document.write('</ul></td>');
		document.write('</tr><tr><td>');
		document.write('<strong>To engrave one line larger than the others, click the button in front of the line number.</strong><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 1]" />');
		document.write('Line 1: <input id="monogram1" ><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 2]" />');
		document.write('Line 2: <input id="monogram2" ><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 3]" />');
		document.write('Line 3: <input id="monogram3" ><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 4]" />');
		document.write('Line 4: <input id="monogram4"><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 5]" />');
		document.write('Line 5: <input id="monogram5"><br />');
		document.write('<input type="radio" name="larger" value="" /> (Click here if you want all lines the same size.)');
		document.write('</td><td align=center>');
		document.write('Sample Font:<br /><img src="assets/images/engraving-font-ex.gif" alt="engraving font example graphic" />');
		document.write('</td></tr></table>');
		document.write('<i>In your shopping cart each line of personalization is shown separated by a dash.  The dash will not be included in your engraving.</i>');		if (s_id == "0")
		{
			document.write('<br><br><b>Questions?</b><br>Call 1-888-851-9088</font></td></tr></table>');
		}
		else
		{
			document.write('<br><br><b>Questions?</b><br>Call 1-866-417-2355</font></td></tr></table>');
		}
	}
	if (info_attributes.toLowerCase()=="eng1") {
		document.write('<br><table width=100% style="border:1px solid #000000"><tr valign=top><td align=left>');
		document.write('<table width=100%><tr valign=top><td align=left colspan=2><input type=checkbox name=monogram id=monogram><font class="mono_header">Check Here to Engrave This Item for an Additional  $15.</font><br>');
		document.write('<input type=hidden name=qty id=qty><input type=hidden name=sku id=sku><input type=hidden name=info_attr2 id=info_attr2>');
		document.write('<ul>');
		document.write('<li class="mono_style">Engrave up to 3 lines.</li>');
		document.write('<li class="mono_style">Maximum of 50 characters (including punctuation and spaces).</li>');
		document.write('<li class="mono_style">Items are engraved in Roman font.</li>');
		document.write('<li class="mono_style">Engraving will appear exactly as typed.</li>');
		document.write('<li class="mono_style">Nameplates are 1" by 2.5" in size.</li>');
		document.write("<li class=\"mono_style\">See <a href=\"javascript:void(0);\" style=\"text-decoration:underline;\" onclick=\"return(visitargs('dept.asp','dept_id=916','URL'))\">samples</a> of our engraving.</a></li>");
		document.write('</ul></td>');
		document.write('</tr><tr><td>');
		document.write('Line 1: <input id="monogram1" ><br />');
		document.write('Line 2: <input id="monogram2" ><br />');
		document.write('Line 3: <input id="monogram3" ><br />');
		document.write('<input type=hidden id="monogram4" value="">');
		document.write('<input type=hidden id="monogram5" value="">');
		document.write('</td><td align=center>');
		document.write('Sample Font:<br /><img src="assets/images/engraving-font-ex.gif" alt="engraving font example graphic" />');
		document.write('</td></tr></table>');
		document.write('<i>In your shopping cart each line of personalization is shown separated by a dash.  The dash will not be included in your engraving.</i>');		if (s_id == "0")
		{
			document.write('<br><br><b>Questions?</b><br>Call 1-888-851-9088</font></td></tr></table>');
		}
		else
		{
			document.write('<br><br><b>Questions?</b><br>Call 1-866-417-2355</font></td></tr></table>');
		}
} else 	if (info_attributes.toLowerCase()=="handbell")
	{
		document.write('<br><table width=100% style="border:1px solid #000000"><tr valign=top><td align=left>');
		document.write('<table width=100%><tr valign=top><td align=left colspan=2><input type=checkbox name=monogram id=monogram><font class="mono_header">Check Here to Engrave This Item for an Additional $19.</font><br>');
		document.write('<input type=hidden name=qty id=qty><input type=hidden name=sku id=sku><input type=hidden name=info_attr2 id=info_attr2>');
		document.write('<br/>');
		document.write('<ul>');
		document.write('<li class="mono_style">Engrave up to 3 lines.</li>');
		document.write('<li class="mono_style">Maximum of 60 characters (including punctuation and spaces).</li>');
		document.write('<li class="mono_style">Items are engraved in Roman font.</li>');
		document.write('<li class="mono_style">Engraving will appear exactly as typed.</li>');
		document.write('<li class="mono_style">The more that is engraved on the bell, the smaller the font will be.</li>');
		document.write("<li class=\"mono_style\">See <a href=\"javascript:void(0);\" style=\"text-decoration:underline;\" onclick=\"return(visitargs('dept.asp','dept_id=916','URL'))\">samples</a> of our engraving.</a></li>");
		document.write('</ul></td>');
		document.write('</tr><tr><td>');
		document.write('<strong>To engrave one line larger than the others, click the button in front of the line number.</strong><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 1]" />');
		document.write('Line 1: <input id="monogram1" ><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 2]" />');
		document.write('Line 2: <input id="monogram2" ><br />');
		document.write('<input type="radio" name="larger" value="[LARGER: LINE 3]" />');
		document.write('Line 3: <input id="monogram3" ><br />');
		document.write('<input type="radio" name="larger" value="" /> (Click here if you want all lines the same size.)');
		document.write('<input type=hidden id="monogram4" value="">');
		document.write('<input type=hidden id="monogram5" value="">');
		document.write('</td><td align=center>');
		document.write('Sample Font:<br /><img src="assets/images/engraving-font-ex.gif" alt="engraving font example graphic" />');
		document.write('</td></tr></table>');
		document.write('<i>In your shopping cart each line of personalization is shown separated by a dash.  The dash will not be included in your engraving.</i>');		if (s_id == "0")
		{
			document.write('<br><br><b>Questions?</b><br>Call 1-888-851-9088</font></td></tr></table>');
		}
		else
		{
			document.write('<br><br><b>Questions?</b><br>Call 1-866-417-2355</font></td></tr></table>');
		}
	}
}

function check_mono()
{
	if (info_attributes.toLowerCase()=="mono1" || info_attributes.toLowerCase()=="mono2" || info_attributes.toLowerCase()=="eng1" || info_attributes.toLowerCase()=="handbell")
	{
		if (info_attributes.toLowerCase()=="mono1"){var mono_sku = "5650"}
		if (info_attributes.toLowerCase()=="mono2"){var mono_sku = "1167"}
		if (info_attributes.toLowerCase()=="eng1"){var mono_sku = "5655"}
		if (info_attributes.toLowerCase()=="handbell"){var mono_sku = "3549"}
		if (document.getElementById("monogram").checked==true)
		{
			var monogram_text = document.getElementById("monogram1").value;
			for (j=2;j< 6 ;j++)
			{
				if (document.getElementById("monogram"+j).value!="")
				{
					monogram_text += " - "+document.getElementById("monogram"+j).value;
				}
			}
			//alert(document.form1.larger.length);
			if (info_attributes.toLowerCase()!="eng1"){ //There are no radio buttons on eng1 so don't execute this code
				for(var rb = document.form1.larger.length-1; rb >= 0; rb--) { //iterate through the radio buttons, looking for which line is supposed to be larger
				//alert(rb);
					if(document.form1.larger[rb].checked == true){
						//alert("Number " + rb + " is checked");
						if (document.form1.larger[rb].value!="" && document.form1.larger[rb].value!="undefined"){  //ignore it if it's empty
							//alert(document.form1.larger[rb].value);
							monogram_text += " " + document.form1.larger[rb].value;  //write it to the attribute string
						}
					}
				}
			} // End If
			
			document.getElementById('qty').value = '1,1';
			document.getElementById('sku').value = product_var[0].sku+','+mono_sku;
			document.getElementById('info_attr2').value = 'personalization selected,' + monogram_text.split(",").join(";");
		}
	}
}