function highLight()
{
	for (var i = 1; i <= document.anchors.length; i ++)
	{
		if (document.anchors[i] == location.href)
		{	
			var id = document.anchors[i].name;
			
			if (id == '')
			{
				continue;
			}
			else
			{
				document.getElementById(id).className = "locationcell";
			}
		
		}
	}
}				

function cellchange(cell, colour)
{
	document.getElementById(cell).style.background = colour;
}

function one2two() {
var m1 = document.theForm.menu1;
var m2 = document.theForm.elements["menu2[]"];

    m1len = m1.length ;
    for ( i=0; i<m1len ; i++){
        if (m1.options[i].selected == true ) {
            m2len = m2.length;
            
			m2.options[m2len]= new Option(m1.options[i].text);
			m2.options[m2len].value= m1.options[i].value;
        }
    }

    for ( i = (m1len -1); i>=0; i--){
        if (m1.options[i].selected == true ) {
            m1.options[i] = null;
        }
    }
		for (i=0; i<m2.length; i++) { 
		m2.options[i].selected = true; 
		} 

}

function two2one() {
var m1 = document.theForm.menu1;
var m2 = document.theForm.elements["menu2[]"];

    m2len = m2.length ;
        for ( i=0; i<m2len ; i++){
            if (m2.options[i].selected == true ) {
                m1len = m1.length;
                m1.options[m1len]= new Option(m2.options[i].text);
            }
        }
        for ( i=(m2len-1); i>=0; i--) {
            if (m2.options[i].selected == true ) {
                m2.options[i] = null;
            }
        }



}


function quickJump()
{	if (document.forms['jump'].url.value == 0)
	{
		return false;
	}
	parent.location = document.forms['jump'].url.value;
}

function calculateQuote(tasterPrice, packPrice, setUpFee, setUpSite, setUpDB, dollarrate, eurorate)
{

	var packs_required   = 0;
	var tasterGrandTotal = 0;
		
	var totalRounds = document.forms['quote'].elements['rounds'].value;
	var totalBreweries = document.forms['quote'].elements['breweries'].value;
	var loop = document.forms['quote'].elements['breweries'].value ;
	var tasterTotal = document.forms['quote'].elements['tasters'].value ;

	packs_required   = Math.round((tasterTotal)/10);

	tasterPrice = tasterPrice * tasterTotal * totalRounds * totalBreweries;
	var setupcost = (setUpSite * totalBreweries) + setUpFee + setUpDB;
	var setupflavours = (packPrice * totalBreweries * totalRounds);


	
	var grand_total1 = setupcost + tasterPrice + setupflavours;
	var grand_total = Math.round(grand_total1);
	var total_ongoing1 = setUpFee + tasterPrice + setupflavours;
	var total_ongoing = Math.round(total_ongoing1);
	var average_site1 = total_ongoing / totalBreweries;
	var average_site = Math.round(average_site1);


	document.forms['quote'].total.value = grand_total;
	document.forms['quote'].total_dollars.value = Math.round(grand_total * dollarrate);
	document.forms['quote'].total_euros.value = Math.round(grand_total * eurorate);

	document.forms['quote'].total_ongoing.value = total_ongoing;
	document.forms['quote'].total_ongoing_dollars.value = Math.round(total_ongoing * dollarrate);
	document.forms['quote'].total_ongoing_euros.value = Math.round(total_ongoing * eurorate);

	document.forms['quote'].average_site.value = average_site;
	document.forms['quote'].average_site_dollars.value = Math.round(average_site * dollarrate);
	document.forms['quote'].average_site_euros.value = Math.round(average_site * eurorate);
	
}

function quoteLoop(lang)
{
	location.href="beer.php?lang="+lang+"&loop="+document.forms['quote'].no_brewery.value+"&page=tasterValQuote";
}

function quoteSystem(tasters, loop, lang)
{
	document.write("<select name='no_brewery' class='formtextselect' onchange='quoteLoop(\""+lang+"\")'>");
	
	for (i = 2; i <= 200; i ++)
	{
		if (i == loop)
		{
			document.write("<option value='"+i+"' selected>"+i+"</option>");
			continue;
		}
		document.write("<option value='"+i+"'>"+i+"</option>");
	}
		
		document.write("</select></td></tr>");
		
	for (i = 1; i <= loop; i ++)
	{	
		
		document.write("<tr><td class='tdwhite' style='background-color:#e8e8e8'>"+tasters+" "+i+"</td>");
		document.write("<td class='tdwhite' style='background-color:#e8e8e8'><select class='formtextselect' name='no_tasters"+i+"'>");
		
		for (j = 6; j <= 100; j ++)
		{
			document.write("<option value='"+j+"'>"+j+"</option>");
		}
		
		document.write("</select></td></tr>");
	}
}

function quizScore(w,c)
{	
	var msg     = "";
	var score   = 0;
	var correct = new Array(1, 8, 11, 15, 20, 28, 31, 36, 40, 48, 51, 58, 60, 66, 72, 76, 82, 86, 91, 93);
	
		
	for (i = 0, j = 1; i < correct.length; i ++, j ++)
	{
		if (document.forms['quiz'].elements[correct[i]].checked == true)
		{
			score += 1;
			msg   += j + ")\t= " + c + "\n";
		}
		else
		{
			msg   += j + ")\t= " + w + "\n";
		}
	}
	
	msg += "_______________\n";
	msg += Math.ceil(score * 100 / (correct.length)) + " %" + " " + c + "\n";
	msg += "_______________\n";
	
	alert(msg);
}



	/* globals */
	counter = 2;
	function duplicate(copyRef)
	{	
		var formName = 'courseReg';
		var pasteRef = copyRef+1;
		var status   = 'sameAs[' +copyRef+  ']';
		var pasteRef =       '[' +pasteRef+ ']';
		var copyRef  =       '[' +copyRef+  ']';
		
					
		var copy     = new Array();
		copy[0]      = 'nameCompany'  + copyRef;
		copy[1]      = 'address1' 	+ copyRef;
		copy[2]      = 'address2'     + copyRef;
		copy[3]      = 'city'         + copyRef;
		copy[4]      = 'stateCounty'  + copyRef;
		copy[5]      = 'zipPost'      + copyRef;
		copy[6]      = 'country'      + copyRef;
		copy[7]      = 'phone'        + copyRef;
		copy[8]      = 'fax'          + copyRef;
				
		var paste    = new Array();
		paste[0]     = 'nameCompany'  + pasteRef;
		paste[1]     = 'address1'     + pasteRef;
		paste[2]     = 'address2'     + pasteRef;
		paste[3]     = 'city'         + pasteRef;
		paste[4]     = 'stateCounty'  + pasteRef;
		paste[5]     = 'zipPost'      + pasteRef;
		paste[6]     = 'country'      + pasteRef;
		paste[7]     = 'phone'        + pasteRef;
		paste[8]     = 'fax'          + pasteRef;
	
		if (document.forms[formName].elements[status].checked)
		{
			for (i = 0; i < copy.length; i ++)
			{
				document.forms[formName].elements[paste[i]].value = document.forms[formName].elements[copy[i]].value;
			}
		}
		else
		{	
			for (i = 0; i < copy.length; i ++)
			{	
				document.forms[formName].elements[paste[i]].value = '';
			}	
		}
		
		
	}

function cellColour(cell,style,colour)
{
/* table cell */
	document.getElementById(cell).className = style;
	
	
/* text within cell */
	document.getElementById(cell+'T').className = colour;
}

function cellLink(path)
{
	parent.location = path;
}

function formValidator(form)
{
/*methods*/
this.emailCheck   		= emailCheck;
this.numericCheck   	= numericCheck;
this.emptyCheck			= emptyCheck;
this.stringLengthCheck  = stringLengthCheck;
this.selectedCheck  	= selectedCheck;
this.checkBoxCheck		= checkBoxCheck;
this.errors				= errors;
/*form path*/
this.form     			= form;
 
/*error messages*/
this.errorList = '';

this.msgEmail   		= "Your email address is invalid.\n";
this.msgNameFirst  	= "Your first name is invalid.\n";
this.msgNameLast  	= "Your last name is invalid.\n";
this.msgPostCode  	= "Your post code is invalid.\n";
this.msgPassword  	= "Your password is invalid.\n";
this.msgRePassword  	= "Your password and re-entered password are not the same.\n";
this.msgComments  	= "The message field cannot be left blank.\n";
this.msgPhoneNumber  	= "Your phone number is invalid.\n";
this.msgNumber   		= "This field has to be numeric.\n";
this.msgLength   		= "This field has to be x charachters long.\n";
this.msgSelect   		= "Please make a selection.\n";
this.msgDate   		= "You must select a date.\n";

/*form element highlight colour*/
this.colour    		= '#e8e8e8';
 
}

function checkBoxCheck(message)
{
	var flag = 0;
	
	for (i = 0; i < this.form.elements.length; i ++ )
	{
		if (this.form.elements[i].checked)
		{
			var flag = 1;
		}
	}

	if (flag == 0)
	{
		this.errorList += message;
		
		return false;
	}
	else
	{
		return true;
	}
}

function emptyCheck(elNum, message)
{
	if (this.form.elements[elNum].value == '' || this.form.elements[elNum].value == 0)
	{
		this.errorList += message;
		
		this.form.elements[elNum].style.background = this.colour;
		
		return false;
	}
	else
	{
		return true;
	}
	
}

function emailCheck(elNum, message)
{
emailValue = this.form.elements[elNum].value;
 
	if ((emailValue.indexOf('@') < 0) || ((emailValue.charAt(emailValue.length-4) != '.') && (emailValue.charAt(emailValue.length-3) != '.')))
 	{
 	this.errorList += message;
 
 	//this.form.elements[elNum].focus();
 	this.form.elements[elNum].style.background = this.colour;
 
 	return false;
 	}
	else
	{
	return true;
	}
}
 
function numericCheck(elNum, message)
{
	var oldstring = this.form.elements[elNum].value;
	var newstring = parseFloat(oldstring).toString();
 
 	if (oldstring.length != newstring.length && newstring == 'NaN') 
 	{
 	//alert(this.msgNumber);
 	this.errorList += message;
 
 	this.form.elements[elNum].focus();
 	this.form.elements[elNum].style.background = this.colour;
 
 	return false;
 }
 
 	else
 	{
 	return true;
 	}
}
 
function stringLengthCheck(elNum, amount, message)
{
 	if(this.form.elements[elNum].value.length < amount)
 	{
 	this.errorList += message;
  
 	//this.form.elements[elNum].focus();
 	this.form.elements[elNum].style.background = this.colour;
 
 	return false;
 	}
 
 	else
 	{
 	return true;
 	}
}
 
function selectedCheck(elNum, message)
{
 	if(this.form.elements[elNum].value == 'none')
 	{
  	this.errorList += message;
 
 
 	this.form.elements[elNum].focus();
 	this.form.elements[elNum].style.background = this.colour;
 
 	return false;
 	}
 
 	else
 	{
 	return true;
 	}
}

function errors()
{
	if(this.errorList)
	{
	alert(this.errorList);
	
	return false;
	}
	
	else
	{
	return true;
	}

}


/* globals */
pack_20_total	= 0;
pack_5_total 	= 0;
TIB_total		= 0;
TTT_total 		= 0;
total 		= 0;
total_dollars	= 0;
total_euros	= 0;



function numItem(element, action, type)
{	
	var path 		= document.forms['order'].elements[element].value;

		
	if (action == 'add')
	{
		path = document.forms['order'].elements[element].value = parseInt(path) + 1;
	
		if (type == 5)
		{
			pack_5_total ++;
		}
		else if (type == 20)
		{
			pack_20_total ++;
		}
		else if (type == 'TTT')
		{
			TTT_total ++;
		}
		else if (type == 'TIB')
		{
			TIB_total ++;
		}
		
	}
	if (action == 'minus')
	{
		if (path == 0)
	 	{
	 		return false;
	 	}
		else
		{
			document.forms['order'].elements[element].value --;
		}
		if (type == 5)
		{
			pack_5_total --;
		}
		else if (type == 20)
		{
			pack_20_total --;
		}
		else if (type == 'TTT')
		{
			TTT_total --;
		}
		else if (type == 'TIB')
		{
			TIB_total --;
		}
	}
	/* flavour stands running total */
	if (type == 20 || type == 5)
	{		
		var pack_20_price	= document.forms['order'].price_20.value;
		var pack_5_price	= document.forms['order'].price_5.value;
		var dollarrate	= document.forms['order'].dollarrate.value;
		var eurorate	= document.forms['order'].eurorate.value;


		
		document.forms['order'].elements['total'].value = Math.round(pack_20_price * pack_20_total + pack_5_price * pack_5_total);
		document.forms['order'].elements['total_dollars'].value = Math.round(pack_20_price * pack_20_total + pack_5_price * pack_5_total * dollarrate);
		document.forms['order'].elements['total_euros'].value = Math.round(pack_20_price * pack_20_total + pack_5_price * pack_5_total * eurorate);

		if (document.forms['order'].elements['total'].value <= 0 && document.forms['order'].elements['total'].value != 0)
		{
			location.reload();
		}

	}
	
	/* flavour stands running total */
	else if (type == 'TTT')
	{
		var TTT_price	= document.forms['order'].priceTTT.value;
		var dollarrate	= document.forms['order'].dollarrate.value;
		var eurorate	= document.forms['order'].eurorate.value;
		
		document.forms['order'].elements['total'].value = Math.round(TTT_price * TTT_total);
		document.forms['order'].elements['total_dollars'].value = Math.round(TTT_price * TTT_total * dollarrate);
		document.forms['order'].elements['total_euros'].value = Math.round(TTT_price * TTT_total * eurorate);

		if (document.forms['order'].elements['total'].value <= 0 && document.forms['order'].elements['total'].value != 0)
		{
			location.reload();
		}	
	}
	
	else if (type == 'TIB')
	{
		var TIB_price	= document.forms['order'].priceTIB.value;
		var dollarrate	= document.forms['order'].dollarrate.value;
		var eurorate	= document.forms['order'].eurorate.value;
		
		document.forms['order'].elements['total'].value = Math.round(TIB_price * TIB_total);
		document.forms['order'].elements['total_dollars'].value = Math.round(TIB_price * TIB_total * dollarrate);
		document.forms['order'].elements['total_euros'].value = Math.round(TIB_price * TIB_total * eurorate);

		if (document.forms['order'].elements['total'].value <= 0 && document.forms['order'].elements['total'].value != 0)
		{
			location.reload();
		}
	}
}
/* globals */
band_a20_total	= 0;
band_b20_total 	= 0;
band_c20_total	= 0;
band_e20_total 	= 0;
band_f20_total	= 0;
band_g20_total	= 0;
band_h20_total 	= 0;
band_i20_total	= 0;
band_j20_total	= 0;
band_k20_total 	= 0;
band_l20_total	= 0;
band_m20_total	= 0;
band_n20_total 	= 0;
band_o20_total	= 0;
band_p20_total	= 0;
band_q20_total 	= 0;
band_r20_total	= 0;
band_s20_total	= 0;
band_t20_total 	= 0;
band_u20_total	= 0;
band_v20_total	= 0;
band_w20_total	= 0;
band_x20_total	= 0;
band_y20_total	= 0;

band_a5_total	= 0;
band_b5_total 	= 0;
band_c5_total	= 0;
band_d5_total	= 0;
band_e5_total 	= 0;
band_f5_total	= 0;
band_h5_total 	= 0;
band_i5_total	= 0;
band_j5_total	= 0;
band_k5_total 	= 0;
band_l5_total	= 0;
band_m5_total	= 0;
band_n5_total 	= 0;
band_o5_total	= 0;
band_p5_total	= 0;
band_q5_total 	= 0;
band_r5_total	= 0;
band_s5_total	= 0;


function flavBand(element, action, band)
{
	
	
	var path 	= document.forms['order'].elements[element].value;

	if (action == 'add')
	{
		path = document.forms['order'].elements[element].value = parseInt(path) + 1;
	
		if (band == 'A5')
		{
			band_a5_total ++;
		}
		if (band == 'B5')
		{
			band_b5_total ++;
		}
		if (band == 'C5')
		{
			band_c5_total ++;
		}
		if (band == 'D5')
		{
			band_d5_total ++;
		}
		if (band == 'E5')
		{
			band_e5_total ++;
		}
		if (band == 'F5')
		{
			band_f5_total ++;
		}
		if (band == 'H5')
		{
			band_h5_total ++;
		}
		if (band == 'I5')
		{
			band_i5_total ++;
		}
		if (band == 'J5')
		{
			band_j5_total ++;
		}
		if (band == 'K5')
		{
			band_k5_total ++;
		}
		if (band == 'L5')
		{
			band_l5_total ++;
		}
		if (band == 'M5')
		{
			band_m5_total ++;
		}
		if (band == 'N5')
		{
			band_n5_total ++;
		}
		if (band == 'O5')
		{
			band_o5_total ++;
		}
		if (band == 'P5')
		{
			band_p5_total ++;
		}
		if (band == 'Q5')
		{
			band_q5_total ++;
		}
		if (band == 'R5')
		{
			band_r5_total ++;
		}
		if (band == 'S5')
		{
			band_s5_total ++;
		}		
	
	
		if (band == 'A20')
		{
			band_a20_total ++;
		}
		if (band == 'B20')
		{
			band_b20_total ++;
		}
		if (band == 'C20')
		{
			band_c20_total ++;
		}
		if (band == 'E20')
		{
			band_e20_total ++;
		}		
		if (band == 'F20')
		{
			band_f20_total ++;
		}		
		if (band == 'G20')
		{
			band_g20_total ++;
		}		
		if (band == 'H20')
		{
			band_h20_total ++;
		}		
		if (band == 'I20')
		{
			band_i20_total ++;
		}		
		if (band == 'J20')
		{
			band_j20_total ++;
		}		
		if (band == 'K20')
		{
			band_k20_total ++;
		}		
		if (band == 'L20')
		{
			band_l20_total ++;
		}		
		if (band == 'M20')
		{
			band_m20_total ++;
		}		
		if (band == 'N20')
		{
			band_n20_total ++;
		}		
		if (band == 'O20')
		{
			band_o20_total ++;
		}		
		if (band == 'P20')
		{
			band_p20_total ++;
		}		
		if (band == 'Q20')
		{
			band_q20_total ++;
		}		
		if (band == 'R20')
		{
			band_r20_total ++;
		}		
		if (band == 'S20')
		{
			band_s20_total ++;
		}		
		if (band == 'T20')
		{
			band_t20_total ++;
		}		
		if (band == 'U20')
		{
			band_u20_total ++;
		}		
		if (band == 'V20')
		{
			band_v20_total ++;
		}	
		if (band == 'W20')
		{
			band_w20_total ++;
		}
		if (band == 'X20')
		{
			band_x20_total ++;
		}	
		if (band == 'Y20')
		{
			band_y20_total ++;
		}		

	}

	if (action == 'minus')
	{
		if (path == 0)
	 	{
	 		return false;
	 	}
		else
		{
			document.forms['order'].elements[element].value --;
		}

		if (band == 'A5')
		{
			band_a5_total --;
		}
		if (band == 'B5')
		{
			band_b5_total --;
		}
		if (band == 'C5')
		{
			band_c5_total --;
		}
		if (band == 'D5')
		{
			band_d5_total --;
		}
		if (band == 'E5')
		{
			band_e5_total --;
		}
		if (band == 'F5')
		{
			band_f5_total --;
		}		
		if (band == 'H5')
		{
			band_h5_total --;
		}
		if (band == 'I5')
		{
			band_i5_total --;
		}		
		if (band == 'J5')
		{
			band_j5_total --;
		}
		if (band == 'K5')
		{
			band_k5_total --;
		}
		if (band == 'L5')
		{
			band_l5_total --;
		}		
		if (band == 'M5')
		{
			band_m5_total --;
		}
		if (band == 'N5')
		{
			band_n5_total --;
		}
		if (band == 'O5')
		{
			band_o5_total --;
		}		
		if (band == 'P5')
		{
			band_p5_total --;
		}
		if (band == 'Q5')
		{
			band_q5_total --;
		}
		if (band == 'R5')
		{
			band_r5_total --;
		}		
		if (band == 'S5')
		{
			band_s5_total --;
		}

		
		
	
		if (band == 'A20')
		{
			band_a20_total --;
		}
		if (band == 'B20')
		{
			band_b20_total --;
		}
		if (band == 'C20')
		{
			band_c20_total --;
		}
		if (band == 'E20')
		{
			band_e20_total --;
		}
		if (band == 'F20')
		{
			band_f20_total --;
		}
		if (band == 'G20')
		{
			band_g20_total --;
		}
		if (band == 'H20')
		{
			band_h20_total --;
		}
		if (band == 'I20')
		{
			band_i20_total --;
		}
		if (band == 'J20')
		{
			band_j20_total --;
		}
		if (band == 'K20')
		{
			band_k20_total --;
		}
		if (band == 'L20')
		{
			band_l20_total --;
		}
		if (band == 'M20')
		{
			band_m20_total --;
		}
		if (band == 'N20')
		{
			band_n20_total --;
		}
		if (band == 'O20')
		{
			band_o20_total --;
		}
		if (band == 'P20')
		{
			band_p20_total --;
		}
		if (band == 'Q20')
		{
			band_q20_total --;
		}
		if (band == 'R20')
		{
			band_r20_total --;
		}
		if (band == 'S20')
		{
			band_s20_total --;
		}
		if (band == 'T20')
		{
			band_t20_total --;
		}
		if (band == 'U20')
		{
			band_u20_total --;
		}
		if (band == 'V20')
		{
			band_v20_total --;
		}
		if (band == 'W20')
		{
			band_w20_total --;
		}
		if (band == 'X20')
		{
			band_x20_total --;
		}
		if (band == 'Y20')
		{
			band_y20_total --;
		}
	}

		var band_a_price_20_pot	= document.forms['order'].price_a_price_20_pot.value;
		var band_b_price_20_pot	= document.forms['order'].price_b_price_20_pot.value;
		var band_c_price_20_pot	= document.forms['order'].price_c_price_20_pot.value;
		var band_e_price_20_pot	= document.forms['order'].price_e_price_20_pot.value;
		var band_f_price_20_pot	= document.forms['order'].price_f_price_20_pot.value;
		var band_g_price_20_pot	= document.forms['order'].price_g_price_20_pot.value;
		var band_h_price_20_pot	= document.forms['order'].price_h_price_20_pot.value;
		var band_i_price_20_pot	= document.forms['order'].price_i_price_20_pot.value;
		var band_j_price_20_pot	= document.forms['order'].price_j_price_20_pot.value;
		var band_k_price_20_pot	= document.forms['order'].price_k_price_20_pot.value;
		var band_l_price_20_pot	= document.forms['order'].price_l_price_20_pot.value;
		var band_m_price_20_pot	= document.forms['order'].price_m_price_20_pot.value;
		var band_n_price_20_pot	= document.forms['order'].price_n_price_20_pot.value;
		var band_o_price_20_pot	= document.forms['order'].price_o_price_20_pot.value;
		var band_p_price_20_pot	= document.forms['order'].price_p_price_20_pot.value;
		var band_q_price_20_pot	= document.forms['order'].price_q_price_20_pot.value;
		var band_r_price_20_pot	= document.forms['order'].price_r_price_20_pot.value;
		var band_s_price_20_pot	= document.forms['order'].price_s_price_20_pot.value;
		var band_t_price_20_pot	= document.forms['order'].price_t_price_20_pot.value;
		var band_u_price_20_pot	= document.forms['order'].price_u_price_20_pot.value;
		var band_v_price_20_pot	= document.forms['order'].price_v_price_20_pot.value;
		var band_w_price_20_pot	= document.forms['order'].price_w_price_20_pot.value;
		var band_x_price_20_pot	= document.forms['order'].price_x_price_20_pot.value;
		var band_y_price_20_pot	= document.forms['order'].price_y_price_20_pot.value;

		var band_a_price_5_pot	= document.forms['order'].price_a_price_5_pot.value;
		var band_b_price_5_pot	= document.forms['order'].price_b_price_5_pot.value;
		var band_c_price_5_pot	= document.forms['order'].price_c_price_5_pot.value;
		var band_d_price_5_pot	= document.forms['order'].price_d_price_5_pot.value;
		var band_e_price_5_pot	= document.forms['order'].price_e_price_5_pot.value;
		var band_f_price_5_pot	= document.forms['order'].price_f_price_5_pot.value;		
		var band_h_price_5_pot	= document.forms['order'].price_h_price_5_pot.value;
		var band_i_price_5_pot	= document.forms['order'].price_i_price_5_pot.value;		
		var band_j_price_5_pot	= document.forms['order'].price_j_price_5_pot.value;
		var band_k_price_5_pot	= document.forms['order'].price_k_price_5_pot.value;
		var band_l_price_5_pot	= document.forms['order'].price_l_price_5_pot.value;		
		var band_m_price_5_pot	= document.forms['order'].price_m_price_5_pot.value;
		var band_n_price_5_pot	= document.forms['order'].price_n_price_5_pot.value;
		var band_o_price_5_pot	= document.forms['order'].price_o_price_5_pot.value;		
		var band_p_price_5_pot	= document.forms['order'].price_p_price_5_pot.value;
		var band_q_price_5_pot	= document.forms['order'].price_q_price_5_pot.value;
		var band_r_price_5_pot	= document.forms['order'].price_r_price_5_pot.value;		
		var band_s_price_5_pot	= document.forms['order'].price_s_price_5_pot.value;

		var dollarrate		= document.forms['order'].dollarrate.value;

		var eurorate		= document.forms['order'].eurorate.value;
		
		//alert(band_a5_total);

		money_total = document.forms['order'].elements['total'].value = Math.round(band_a_price_20_pot * band_a20_total + band_a_price_5_pot * band_a5_total + band_b_price_20_pot * band_b20_total + band_b_price_5_pot * band_b5_total + band_c_price_20_pot * band_c20_total + band_c_price_5_pot * band_c5_total
		+ band_d_price_5_pot * band_d5_total + band_e_price_20_pot * band_e20_total + band_e_price_5_pot * band_e5_total + band_f_price_20_pot * band_f20_total + band_f_price_5_pot * band_f5_total
		+ band_g_price_20_pot * band_g20_total + band_h_price_20_pot * band_h20_total + band_h_price_5_pot * band_h5_total + band_i_price_20_pot * band_i20_total + band_i_price_5_pot * band_i5_total
		+ band_j_price_20_pot * band_j20_total + band_j_price_5_pot * band_j5_total + band_k_price_20_pot * band_k20_total + band_k_price_5_pot * band_k5_total + band_l_price_20_pot * band_l20_total + band_l_price_5_pot * band_l5_total
		+ band_m_price_20_pot * band_m20_total + band_m_price_5_pot * band_m5_total + band_n_price_20_pot * band_n20_total + band_n_price_5_pot * band_n5_total + band_o_price_20_pot * band_o20_total + band_o_price_5_pot * band_o5_total
		+ band_p_price_20_pot * band_p20_total + band_p_price_5_pot * band_p5_total + band_q_price_20_pot * band_q20_total + band_q_price_5_pot * band_q5_total + band_r_price_20_pot * band_r20_total + band_r_price_5_pot * band_r5_total
		+ band_s_price_20_pot * band_s20_total + band_s_price_5_pot * band_s5_total + band_t_price_20_pot * band_t20_total + band_u_price_20_pot * band_u20_total + band_v_price_20_pot * band_v20_total
		+ band_w_price_20_pot * band_w20_total + band_x_price_20_pot * band_x20_total + band_y_price_20_pot * band_y20_total);

		money_total_dollars = document.forms['order'].elements['total_dollars'].value = Math.round(money_total * dollarrate);

		money_total_euros = document.forms['order'].elements['total_euros'].value = Math.round(money_total * eurorate);

			if (money_total <= 0 && document.forms['order'].elements['total'].value != 0)
		{
			location.reload();
		}	

}




quantity1	= 0;
function spiritBand(element, action)
{
	
	
	var path 	= document.forms['order'].elements[element].value;

	if (action == 'add')
	{
		path = document.forms['order'].elements[element].value = parseInt(path) + 1;
	
		quantity1 ++;

	}

	if (action == 'minus')
	{
		if (path == 0)
	 	{
	 		return false;
	 	}
		else
		{
			document.forms['order'].elements[element].value --;
		}

		quantity1 --;
	}



		var priceSK	= document.forms['order'].priceSK.value;

		var dollarrate		= document.forms['order'].dollarrate.value;

		var eurorate		= document.forms['order'].eurorate.value;
		

		money_total = document.forms['order'].elements['total'].value = Math.round(priceSK * quantity1);

		money_total_dollars = document.forms['order'].elements['total_dollars'].value = Math.round(money_total * dollarrate);

		money_total_euros = document.forms['order'].elements['total_euros'].value = Math.round(money_total * eurorate);

			if (money_total <= 0 && document.forms['order'].elements['total'].value != 0)
		{
			location.reload();
		}	

}


quantity1	= 0;
function enthBand(element, action)
{
	
	
	var path 	= document.forms['order'].elements[element].value;

	if (action == 'add')
	{
		path = document.forms['order'].elements[element].value = parseInt(path) + 1;
	
		quantity1 ++;

	}

	if (action == 'minus')
	{
		if (path == 0)
	 	{
	 		return false;
	 	}
		else
		{
			document.forms['order'].elements[element].value --;
		}

		quantity1 --;
	}

		var priceEnth		= document.forms['order'].priceEnth.value;


		var dollarrate		= document.forms['order'].dollarrate.value;

		var eurorate		= document.forms['order'].eurorate.value;
		

		money_total = document.forms['order'].elements['total'].value = Math.round(priceEnth * quantity1);

		money_total_dollars = document.forms['order'].elements['total_dollars'].value = Math.round(money_total * dollarrate);

		money_total_euros = document.forms['order'].elements['total_euros'].value = Math.round(money_total * eurorate);

			if (money_total <= 0 && document.forms['order'].elements['total'].value != 0)
		{
			location.reload();
		}	

}




quantity1	= 0;
function TIBBand(element, action)
{
	
	
	var path 	= document.forms['order'].elements[element].value;

	if (action == 'add')
	{
		path = document.forms['order'].elements[element].value = parseInt(path) + 1;
	
		quantity1 ++;

	}

	if (action == 'minus')
	{
		if (path == 0)
	 	{
	 		return false;
	 	}
		else
		{
			document.forms['order'].elements[element].value --;
		}

		quantity1 --;
	}



		var priceTIB	= document.forms['order'].priceTIB.value;

		var dollarrate		= document.forms['order'].dollarrate.value;

		var eurorate		= document.forms['order'].eurorate.value;
		

		money_total = document.forms['order'].elements['total'].value = Math.round(priceTIB * quantity1);

		money_total_dollars = document.forms['order'].elements['total_dollars'].value = Math.round(money_total * dollarrate);

		money_total_euros = document.forms['order'].elements['total_euros'].value = Math.round(money_total * eurorate);

			if (money_total <= 0 && document.forms['order'].elements['total'].value != 0)
		{
			location.reload();
		}	

}