	/* lyrparent - Parent layer, area clicked to toggle show/hide  */
	/* lyrid - ID for the hidden layer */
	/* lyrrow - Rows with hidden layers (if multiple hidden rows are available for parent) */
	/* lyrcol - Columns with hiden layers (if multiple hidden columns are available for parent) */
	/* lyrcoln - Number of columns with hidden layers (looped through to close all open ones before opening another) */
	
	function toggle(lyrparent,lyrid,lyrrow,lyrcol,lyrcoln)
	{	
	
		var id = lyrid + "-" + lyrrow + "-" + lyrcol;
		var obj = document.getElementById(id);
		var id2 = lyrparent + "-" + lyrrow + "-" + lyrcol;
		var obj2 = document.getElementById(id2);
	
		if (obj.style.display == '')
		{
			obj.style.display='none';
			obj2.className='tc-row-link';
		}
		else
		{
			for(i=1; i<=lyrcoln; i++) {
				idclose = lyrid + "-" + lyrrow + "-" + i;
				idclose2 = lyrparent + "-" + lyrrow + "-" + i;
			 	document.getElementById(idclose).style.display='none';
				document.getElementById(idclose2).className='tc-row-link';
			}
			obj.style.display='';
			obj2.className='tc-row-selected';
		}
	}
	
	
	function toggle_simple(id)
	{
		var obj = document.getElementById(id);
		if (obj.style.display == '')
		{
			obj.style.display='none';
		}
		else
		{
			obj.style.display='';
		}
	}
	
	function toggle_rows(id,rows)
	{	
		for(i=1; i<=rows; i++) {
			row_id = id + "-" + i;
			obj = document.getElementById(row_id);
			if (obj.style.display == '') {
			 	obj.style.display='none';
			}
			else {
				obj.style.display='';
			}
		}
	}
	
	function toggle_rows_cols(id,cols,rows)
	{	
		for(ic=1; ic<=cols; ic++) {
			for(ir=1; ir<=rows; ir++) {
				row_id = id + "-" + ic + "-" + ir;
				obj = document.getElementById(row_id);
				if (obj.style.display == '') {
				 	obj.style.display='none';
				}
				else {
					obj.style.display='';
				}
			}
		}
	}
	
	function site_popup(URL,wwd,wht,scr) {
		var winleft = (screen.width - wwd) / 2;
		var wintop = (screen.height - wht) / 2;
		window.open(URL,'','toolbar=0,scrollbars='+scr+',location=0,statusbar=0,menubar=0,resizable=0,width='+wwd+',height='+wht+',top='+wintop+',left='+winleft);
	}
	
	function select_option(option_value,option_highlight,option_display) {
		
		// number of options clickable, required when not 1:1 with actual product option
		product_option_row_count = document.getElementById('product_option_clickable_count').value;
		// number of options to display
		product_option_dsp_count = document.getElementById('product_option_display_count').value;
		
		// set form product_signature value
		product_signature = 'product_signature_' + product_signature_id;
		product_signature_option = 'product_signature_option_' + option_value;
		document.getElementById(product_signature).value=eval(product_signature_option);
		
		// reset selected style on all, highlight current selection
		for(i1=1; i1<=product_option_row_count; i1++) {
			document.getElementById('option_selected_' + i1).className='';
		}
		document.getElementById('option_selected_' + option_highlight).className='selected';
		
		// display highlight option content
		if (option_display > 0) {
			for(i2=1; i2<=product_option_dsp_count; i2++) {
				document.getElementById('option_display_' + i2).style.display='none';
			}
			document.getElementById('option_display_' + option_display).style.display='';
		}
	}
	
	function show_testimonial(beforeafter,testimonial) {
		document.getElementById('beforeafter_img_swap').src = beforeafter;
		document.getElementById('testimonial_img_swap').src = testimonial;
		document.getElementById('testimonial_group').style.display = '';
	}
	
	function toggle_switch(show_id,hide_id) {
	document.getElementById(show_id).style.display = 'none';
	document.getElementById(hide_id).style.display = '';
}