<!--

			function controlConfigViewMinAll(){
				for (i=0;i<TxIDs.length;i++){
					document.getElementById('Table'+TxIDs[i]).style.display='none';
					document.getElementById('Img'+TxIDs[i]).innerHTML='<img onclick="controlConfigView(\''+TxIDs[i]+'\')" src="<!--{$IMAGES_PATH}-->/config_maximise.gif" alt="Maximise" width="10" height="11" border="0" />';
				}
			}
			function controlConfigViewMaxAll(){
				for (i=0;i<TxIDs.length;i++){
					document.getElementById('Table'+TxIDs[i]).style.display='block';
					document.getElementById('Img'+TxIDs[i]).innerHTML='<img onclick="controlConfigView(\''+TxIDs[i]+'\')" src="<!--{$IMAGES_PATH}-->/config_minimise.gif" alt="Minimise" width="10" height="11" border="0" />';
				}
			}
			function controlConfigView(FXID){
				if (document.getElementById('Table'+FXID).style.display!='none'){
					document.getElementById('Table'+FXID).style.display='none';
					document.getElementById('Img'+FXID).innerHTML='<img onclick="controlConfigView(\''+FXID+'\')" src="<!--{$IMAGES_PATH}-->/config_maximise.gif" alt="Maximise" width="10" height="11" border="0" />';
				}else{
					document.getElementById('Table'+FXID).style.display='block';
					document.getElementById('Img'+FXID).innerHTML='<img onclick="controlConfigView(\''+FXID+'\')" src="<!--{$IMAGES_PATH}-->/config_minimise.gif" alt="Minimise" width="10" height="11" border="0" />';
				}
			}
			function qtyI() {
				if (document.getElementById('QTY').value){
					document.getElementById('QTY').value++;
					document.getElementById('VISIBLEQTY').innerHTML=document.getElementById('QTY').value;
					updateConfigs();
				}
			}
			function qtyD() {
				if (document.getElementById('QTY').value >=2){
					document.getElementById('QTY').value--;
					document.getElementById('VISIBLEQTY').innerHTML=document.getElementById('QTY').value;
					updateConfigs();
				}
			}
			function updateConfigs(CLICKBOX){
				if (CLICKBOX){
					(document.getElementById(CLICKBOX).checked==true)? VAT=true : VAT=false;
				}else{
					(document.getElementById('VAT').checked==true)? VAT=true : VAT=false;
				}
				if (VAT){
					document.getElementById('VAT').checked=true;
					document.getElementById('VAT2').checked=true;
				}else{
					document.getElementById('VAT').checked=false;
					document.getElementById('VAT2').checked=false;
				}
				START_COST = Math.abs(document.getElementById('subTotalPriceHidden').value);
				var featureSelectedPrice=new Array();
				for (FEA=0;FEA<featureNamesArray.length;FEA++){
					for (TOT=0;TOT<featuresArray[featureNamesArray[FEA]].length;TOT++){
						if (document.getElementById(featureNamesArray[FEA]+'_!_'+featuresArray[featureNamesArray[FEA]][TOT]).checked==true){
							document.getElementById(featureNamesArray[FEA]+'_!_'+featuresArray[featureNamesArray[FEA]][TOT]+'_!_td_text').className="optionTextBold";

							if (document.getElementById(featureNamesArray[FEA]+'_!_'+featuresArray[featureNamesArray[FEA]][TOT]+'_COST').value<0){
							START_COST-=Math.abs(document.getElementById(featureNamesArray[FEA]+'_!_'+featuresArray[featureNamesArray[FEA]][TOT]+'_COST').value);
							}else{
							START_COST+=Math.abs(document.getElementById(featureNamesArray[FEA]+'_!_'+featuresArray[featureNamesArray[FEA]][TOT]+'_COST').value);
							}
							if (VAT){
								thisAdd=(document.getElementById(featureNamesArray[FEA]+'_!_'+featuresArray[featureNamesArray[FEA]][TOT]+'_COST').value*1.2).toFixed(2);
								featureSelectedPrice[featureNamesArray[FEA]]=thisAdd;
							}else{
								featureSelectedPrice[featureNamesArray[FEA]]=document.getElementById(featureNamesArray[FEA]+'_!_'+featuresArray[featureNamesArray[FEA]][TOT]+'_COST').value;
							}
						}else{
							document.getElementById(featureNamesArray[FEA]+'_!_'+featuresArray[featureNamesArray[FEA]][TOT]+'_!_td_text').className="optionText";
						}
						
						
					}
				}
				for (FEA2=0;FEA2<featureNamesArray.length;FEA2++){
					currentVal=featureSelectedPrice[featureNamesArray[FEA2]];
					for (TOT2=0;TOT2<featuresArray[featureNamesArray[FEA2]].length;TOT2++){
						if (VAT){
							thisAdd2=(document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_COST').value*1.2).toFixed(2);
							if (currencyOn && returnFormattedString((thisAdd2-currentVal).toFixed(2),1) != ""){
							    document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_!_PRICE').innerHTML=returnFormattedString((thisAdd2-currentVal).toFixed(2),1) +' or '+returnFormattedString(((thisAdd2-currentVal)*currencyRate).toFixed(2), 0);
							} else {
								document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_!_PRICE').innerHTML=returnFormattedString((thisAdd2-currentVal).toFixed(2),1);
							}
						}else{
						    if (currencyOn && returnFormattedString((document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_COST').value-currentVal).toFixed(2),1) != ""){
                                document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_!_PRICE').innerHTML=returnFormattedString((document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_COST').value-currentVal).toFixed(2),1) +' or '+returnFormattedString(((document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_COST').value-currentVal)*currencyRate).toFixed(2), 0);
							} else {
								document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_!_PRICE').innerHTML=returnFormattedString((document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_COST').value-currentVal).toFixed(2),1);
							}
						}
						
						// Finance string
						if (configFinanceOn && !currencyOn) {
							document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_!_FINANCE_PRICE').innerHTML=returnFormattedString(returnFinanceCost((document.getElementById(featureNamesArray[FEA2]+'_!_'+featuresArray[featureNamesArray[FEA2]][TOT2]+'_COST').value-currentVal).toFixed(2)),1,1);
						}
					}
				}
				document.getElementById('subTotal').innerHTML	= '&pound;'+START_COST.toFixed(2);
				document.getElementById('Total').innerHTML		= '&pound;'+(START_COST*document.getElementById('QTY').value).toFixed(2);
				document.getElementById('TotalVAT').innerHTML	= '&pound;'+((START_COST*document.getElementById('QTY').value)*1.2).toFixed(2);

if (configFinanceOn && !currencyOn) {
				a = ((START_COST*document.getElementById('QTY').value)*1.2)*configFinanceDepositFactor
				b = ((START_COST*document.getElementById('QTY').value)*1.2)-a;
				c = b*configFinancePayFactor;
				
				document.getElementById('TotalVATmonth').innerHTML='&pound;'+c.toFixed(2);
}
				if (document.getElementById('CURR_Total')){
				    document.getElementById('CURR_Total').innerHTML=((START_COST*document.getElementById('QTY').value)*currencyRate).toFixed(2);
				}

				if (document.getElementById('CURR_TotalVAT')){
				    document.getElementById('CURR_TotalVAT').innerHTML=(((START_COST*document.getElementById('QTY').value)*1.2)*currencyRate).toFixed(2);
				}
				checkRestricted();
			}
			
			function returnFinanceCost(PRICE) {
				deposit = Math.ceil(PRICE*configFinanceDepositFactor);
				priceexdeposit = PRICE-deposit;
				monthly = (priceexdeposit*configFinancePayFactor).toFixed(2);
				return monthly;
			}
			
			function checkRestricted(){
				stayRestricted=new Array();
				for (res=0;res<restrictions.length;res++){
					restrictionParts=restrictions[res].split('~');
					if ((document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]))&&(document.getElementById(restrictionParts[0]+'_!_'+restrictionParts[1]).checked==true)){
						stayRestricted.push(restrictionParts[2]+'_!_'+restrictionParts[3]);
						document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]).disabled=true;
						document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]+'_!_alert').innerHTML='<BR>Option not available with '+restrictionParts[4]+' selected';
						document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]+'_!_td_radio').className='optionRadioDisabled';
						document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]+'_!_td_text').className='optionTextDisabled';
					} else {
						var thismiss="no";
						for (ar=0;ar<stayRestricted.length;ar++){
							if (stayRestricted[ar]==restrictionParts[2]+'_!_'+restrictionParts[3]){
								thismiss="yes";
							}
						}
						if ((thismiss!="yes")&&(document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]))){
							document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]).disabled=false;
							document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]+'_!_alert').innerHTML='';
							document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]+'_!_td_radio').className='optionRadio';
							document.getElementById(restrictionParts[2]+'_!_'+restrictionParts[3]+'_!_td_text').className='optionText';
						}
					}
				}
			}
			
			
			
			function returnFormattedString(STRINGIN, SIGN, FIN){
			
				if (STRINGIN=='NaN'){
					return '';
				}
				if (STRINGIN==0){
					return '';
				}
				if (STRINGIN<0){
					PriceIn = ((STRINGIN-STRINGIN)-STRINGIN);
					PriceIn = PriceIn.toFixed(2);
					if (SIGN){
							if (FIN && configFinanceOn) {
								return '';
							}else{
					    		return '[-&pound;'+PriceIn+']';
					    	}
					}else{
					    	return '[-'+PriceIn+' '+currencyExt+']';
					}
				}
				PriceIn = STRINGIN;
				if (SIGN) {
					if (FIN && configFinanceOn) {
						return '&nbsp;or&nbsp;[+&pound;'+Math.ceil(PriceIn*1.2)+'/month*]';
					}else{
						return '[+&pound;'+PriceIn+']';
					}
				}else{
				    return '[+'+PriceIn+' '+currencyExt+']';
				}
			}
			function updateVatSession(){
				(document.getElementById('VAT').checked)?checked="ON":checked="OFF";
				url='turnOnVAT.php?VAT='+checked;
				req = false;
				if(window.XMLHttpRequest) {
					try {
						req = new XMLHttpRequest();
					} catch(e) {
						req = false;
					}
				} else if(window.ActiveXObject) {
					try {
						req = new ActiveXObject("Msxml2.XMLHTTP");
					} catch(e) {
						try {
							req = new ActiveXObject("Microsoft.XMLHTTP");
						} catch(e) {
							req = false;
						}
					}
				}
				if(req) {
					req.onreadystatechange = function() {
						if (req.readyState == 4) {
							if (req.status == 200) {
								return true;
							} else {
								return false;
							}
						}
					}
					req.open("GET", url, true);
					req.send("");
				}
			}
//-->
