	//sIFR.replace({ src: 'halvetica-neue-lt-thin-ext.swf', selector: 'h2' });
	//sIFR.debug.ratios({ src: 'halvetica-neue-lt-thin-ext.swf', selector: 'h2' });
	
	var hal = {
	src: 'sIFR/halvetica-neue-lt-thin-ext.swf'
	,ratios: [6,1.32,7,1.35,8,1.31,9,1.28,10,1.26,11,1.25,12,1.24,13,1.23,14,1.25,15,1.23,16,1.23,17,1.22,18,1.21,19,1.21,20,1.2,21,1.21,22,1.2,23,1.2,24,1.2,25,1.19,26,1.19,27,1.18,28,1.19,29,1.19,30,1.19,31,1.19,32,1.18,33,1.18,34,1.19,35,1.18,36,1.18,37,1.18,38,1.18,39,1.18,40,1.17,41,1.18,42,1.18,43,1.17,44,1.17,45,1.17,46,1.17,47,1.17,48,1.18,49,1.17,50,1.17,51,1.17,52,1.17,53,1.17,54,1.17,55,1.17,56,1.17,57,1.17,58,1.17,59,1.17,60,1.17,61,1.16,62,1.17,63,1.17,64,1.17,65,1.17,66,1.16,67,1.16,68,1.17,69,1.17,70,1.16,71,1.16,72,1.16,73,1.16,74,1.16,75,1.17,76,1.16,77,1.16,78,1.16,79,1.16,80,1.16,81,1.16,82,1.16,83,1.16,84,1.16,85,1.16,86,1.16,87,1.16,88,1.16,89,1.16,90,1.16,91,1.16,92,1.16,93,1.16,94,1.16,95,1.16,96,1.16,97,1.16,98,1.16,99,1.16,100,1.16,101,1.16,102,1.16,103,1.16,104,1.16,105,1.16,106,1.16,107,1.16,108,1.16,109,1.16,110,1.16,111,1.16,113,1.16,114,1.16,115,1.16,116,1.16,117,1.16,118,1.16,119,1.16,120,1.16,121,1.16,122,1.16,123,1.16,124,1.16,1.16]
	};	
	
	sIFR.delayCSS  = true;
	sIFR.activate(hal);
	
	sIFR.replace(hal, {
	selector: 'h2'
	,css: [
	  '.sIFR-root { text-align: left; font-weight: bold; }'
	  ,'a { text-decoration: none; }'
	  ,'a:link { color: #000000; }'
	  ,'a:hover { color: #CCCCCC; }'
	  
	]	
	});	
	
function myGrowColour(selection)
{	
	//alert(selection);
	element = $('embossText');	
	
	if(window.document.order.colour){
	
		myElement = document.getElementById('colour');	
		
		
		  var dimensions = Element.getDimensions( 'colour' );	  
	  
		//alert(dimensions.width);
		
		if(selection.search('Black') == -1 ){		
			// not black	
			if(dimensions.width < 200)	
			Effect.SlideDown('colour');	
		}	
		else{
			if(dimensions.width > 200)
				Effect.SlideUp('colour');
		}	
	}
}

function myGrowEmboss(selection)
{
	//alert(selection);	
	element = $('embossText');	
	 
	if(selection == 'No Embossing (£0.00)' || selection.search('Logo') != -1 ) {		
		// not embossing
		Effect.SlideUp('embossText');
		Effect.Fade('embossText');		
	}		
	else{
		if(element.style.display == 'none'){
			Effect.SlideDown('embossText');
			Effect.Appear('embossText');	
		}
	}	
}

function setOptionText(the_select, the_array)
{
	for (loop=0; loop < the_select.options.length; loop++)
	{
		the_select.options[loop].text = the_array[loop];
	}
}

function trimAll(sString)
{
	while (sString.substring(0,1) == ' '){
		sString = sString.substring(1, sString.length);
	}
	while (sString.substring(sString.length-1, sString.length) == ' '){
		sString = sString.substring(0,sString.length-1);
	}
	return sString;
}

function myChange(object) {
	pages.change(object);
}

window.onload=function(){	
	//Element.hide( 'colour' );	
	//Element.hide( 'embossText' );
	

	initDynamicOptionLists();	
	
	element = $('jsError');
	if(element){
		Element.hide('jsError');
	}
	
	if(window.document.order){
		selection = window.document.order.size.options[0].text;
		if(selection.search('Black') == -1 ){		
			// not black
			//Effect.show('colour');
		}	
		else{
			Element.hide('colour');
		}
		
		if(window.document.order.embossing){	
			selection = window.document.order.embossing.options[0].text;
			element = $('embossText');
			if(selection == 'No Embossing (£0.00)'){		
				// not embossing
				Element.hide('embossText');			
			}	
		}
		
	}	
}
