// You may edit these comments at your own risk
// We suggest making a backup copy of this document before editing.
// The variables used in the comments are changed from the originals for security 


var com_shadow  = "url('functions/images/trans_bg.png')";// png image that creates shadow effect - for more colors visit www.demonwares.com/customer_files/shadows
var com_header  = '<div id="demon_title">Discount Code Entry</div>'; // The header on alert
var com_headx   = '<div id="demon_close" onclick="demon_hide()"></div>';// the X on the header
var com_info    = "url('functions/images/info.jpg')"; // The blue i image seen in the message
var com_error   = "url('functions/images/error.jpg')"; // the red x image seen in the message
var com_buttons = '<input type="button" value="OK" style="width:100px" onclick="demon_hide()">'; // ok button shown under message


/* Variables listed below are available for use in comments
	 com_code = The discount code used
	 com_code2 = The discount code from a previous entry
	 com_dis_amt = The amount the discount is worth
	 com_buy = The number of items they have to purchas to get one free
	 com_get = The number of free items they get by purchasing comm_buy
*/
var d_com       = new Array();
//Displayed when a someone enters a bad code
d_com[0] = '"Error:<br> The code you entered " + document.getElementById(\'discount\').value + " is not valid.<br><br> Possible Reasons:<br><br>Codes are case sensitive<br>You have used the code.<br>The code has expired."';

//Displayed when a smaller code is entered and the discount is a $ amount
d_com[1] = '"You have entered " + com_code + ".<br><br>Error:<br> The value of the code you entered is smaller than one entered earlier.<br><br> Code:"+com_code2+ " will stay in effect.<br><br> Code Value:<br>" + "$" + com_dis_amt + " discount is now in effect."';

//Displayed when a smaller code is entered and the discount is a % off
d_com[2] = '"You have entered " + com_code + ".<br><br>Error:<br> The value of the code you entered is smaller than one entered earlier.<br><br> Code:"+com_code2+ " will stay in effect.<br><br> Code Value:<br>" + com_dis_amt + "%" + " discount is now in effect."';

//Displayed when a smaller code is entered and the discount is a $ amount
d_com[3] = '"You have entered " + com_code + ".<br><br>Error:<br> The value of the code you entered is smaller than one entered earlier.<br><br> Code:"+com_code2+ " will stay in effect.<br><br> Code Value:<br>" + "$" + com_dis_amt + " discount on all times added to cart after code entry."';

//Displayed when a smaller code is entered and the discount is a % off
d_com[4] = '"You have entered " + com_code + ".<br><br>Error:<br> The value of the code you entered is smaller than one entered earlier.<br><br> Code:"+com_code2+ " will stay in effect.<br><br> Code Value:<br>" + com_dis_amt + "%" + " discount on all times added to cart after code entry."';

//Displayed when the code applies to all items being added to cart and discount is a $ amount
d_com[5] = '"You have entered " + com_code + ".<br><br>Code Value:<br> All items added to cart after this code entry will receive a " + "$" + com_dis_amt + " discount."';

//Displayed when the code applies to all items being added to cart and discount is a % off
d_com[6] = '"You have entered " + com_code + ".<br><br>Code Value:<br> All items added to cart after this code entry will receive a " + com_dis_amt + "%" + " discount."';

//Displayed when the code entered only applies to the current item and discount is a $ amount
d_com[7] = '"You have entered " + com_code + ".<br><br>Code Value:<br>" + "$" + com_dis_amt + " discount is now in effect."';

//Displayed when the code entered only applies to the current item and discount is a % off
d_com[8] = '"You have entered " + com_code + ".<br><br>Code Value:<br>" + com_dis_amt + "%" + " discount is now in effect."';

//Displayed when the code entered is restricted to one use per customer and has been entered a second time
d_com[9] = '"You have entered " + com_code + ".<br><br>Error:<br> You have already used this code."';

//Displayed when the code box is left empty
d_com[10] = '"Please enter a code before submitting form."';

//Displayed when the code entered is already in use.
d_com[11] = '"The code you entered is already active."';

//Displayed when someone uses the buy 1 get 1 Free code
d_com[12] = '"You have entered " + com_code + ".<br><br>Code Value:<br>Buy 1 get 1 free.<br>You will receive a free item with your purchase."';

//Displayed when someone enteres a code that is valid but not for this product.
d_com[13] ='"You have entered " + com_code + ".<br><br>Error:<br>Sorry The code you entered does not apply to this product.<br>"';

//Displayed when the form/s on your page are not formatted correctly and the javascript fails.
d_com[14] ='"Error:<br>We apologise for this error. There may be something wrong with our button please notify us of this error.<br>"';

//Displayed when someone enters a buy __ get __ Free code with multiple items on the same page
d_com[15] ='"You have entered " + com_code + ".<br><br>Code Value:<br>Buy "+com_buy+" get "+ com_get +" free.<br>You must purchase "+com_buy+" of the same product in order to get your free item/s."';

//Displayed when someone enters a code with multiple items on the same page and it is a $ amount off
d_com[16] = '"You have entered " + com_code + ".<br><br>Code Value:<br>" + "$" + com_dis_amt + " discount is now in effect."';

//Displayed when someone enters a code with multiple items on the same page and it is a % amount off
d_com[17] = '"You have entered " + com_code + ".<br><br>Code Value:<br>" + com_dis_amt + "%" + " discount is now in effect."';

//Displayed when someone uses a buy__ get_ free code greater than b1g1f
d_com[18] = '"You have entered " + com_code + ".<br><br>Code Value:<br>Buy "+com_buy+" get "+ com_get +" free.<br>You must purchase "+com_buy+" of the same item in order to get your free item."';