// JavaScript Document

	var OptVal1;
	function GetOptVal1(OptVal1){ /*Set OptVal1 Form Elements*/
		size = document.attributes.size;
		mat_outer_11x14 = document.attributes.mat_outer_11x14;
		mat_inner_11x14 = document.attributes.mat_inner_11x14;
		mat_outer_16x20 = document.attributes.mat_outer_16x20;
		mat_inner_16x20 = document.attributes.mat_inner_16x20;
		frame_color = document.attributes.frame_color;

		/*Begin Element Toggles*/
		if(OptVal1=='11x14' || OptVal1=='16x20') { /*Toggles Framing Options (visible/hidden)*/
			frame_color.disabled=false;
			document.getElementById('section_frame').className='visible';
		}
		else {
			frame_color.value=null;
			frame_color.disabled=true;
			document.getElementById('section_frame').className='hidden';
		}
		if(OptVal1=='11x14') { /*11x14 Toggle for Matting Attributes (visible/hidden)*/
			mat_outer_11x14.disabled=false;
			document.getElementById('section_mat_outer_11x14').className='visible';
			mat_inner_11x14.disabled=false;
			document.getElementById('section_mat_inner_11x14').className='visible';
		}
		else {
			mat_outer_11x14.value=null;
			mat_outer_11x14.disabled=true;
			document.getElementById('section_mat_outer_11x14').className='hidden';
			mat_inner_11x14.value=null;
			mat_inner_11x14.disabled=true;
			document.getElementById('section_mat_inner_11x14').className='hidden';
		}
		if(OptVal1=='16x20') { /*16x20 Toggle for Matting Attributes (visible/hidden)*/
			mat_outer_16x20.disabled=false;
			document.getElementById('section_mat_outer_16x20').className='visible';
			mat_inner_16x20.disabled=false;
			document.getElementById('section_mat_inner_16x20').className='visible';
		}
		else {
			mat_outer_16x20.value=null;
			mat_outer_16x20.disabled=true;
			document.getElementById('section_mat_outer_16x20').className='hidden';
			mat_inner_16x20.value=null;
			mat_inner_16x20.disabled=true;
			document.getElementById('section_mat_inner_16x20').className='hidden';
		}
	}
function checkSize() {
	if (document.attributes.size.value=='0') {
		alert('You must select a print size before you can see it framed');
		returnval = false;
	}
	else {
	 returnval = true;
	}
	return returnval;
}
function checkSelect() {
	if ((document.attributes.mat_inner_11x14.value > '' && document.attributes.mat_outer_11x14.value == '') || (document.attributes.mat_inner_16x20.value > '' && document.attributes.mat_outer_16x20.value == '')) {
		alert('You must select a Single Mat and Frame option to have Double Matting');
		returnval = false;
	}
	else {
	 returnval = true;
	}
	return returnval;
}
function checkOuterMat() {
	if (document.attributes.size.value == '11x14'){
		if (document.attributes.mat_outer_11x14.value == '' && document.attributes.frame_color.value > '') {
			alert('You must select a matting option to have an item framed');
			returnval = false;
		}
		else {
			returnval = true;
		}
		return returnval;
	}
	else if (document.attributes.size.value == '16x20'){
		if (document.attributes.mat_outer_16x20.value == '' && document.attributes.frame_color.value > '') {
			alert('You must select a matting option to have an item framed');
			returnval = false;
		}
		else {
			returnval = true;
		}
		return returnval;
	}
}
function checkFrame() {
	if (document.attributes.size.value == '11x14'){
		if (document.attributes.mat_outer_11x14.value > '' && document.attributes.frame_color.value == '') {
			alert('You have choosen a matting option. Please select your frame choice.');
			returnval = false;
		}
		else {
			returnval = true;
		}
		return returnval;
	}
	else if (document.attributes.size.value == '16x20'){
		if (document.attributes.mat_outer_16x20.value > '' && document.attributes.frame_color.value == '') {
			alert('You have choosen a matting option. Please select your frame choice.');
			returnval = false;
		}
		else {
			returnval = true;
		}
		return returnval;
	}
}


/* ORIGINAL WITH MULTIPLE OPTIONS
	var OptVal1;
	function GetOptVal1(OptVal1){ /*Set OptVal1 Form Elements*//*
		size = document.attributes.size;
		mat_style_11x14 = document.attributes.mat_style_11x14;
		mat_style_16x20 = document.attributes.mat_style_16x20;
		mat_color = document.attributes.mat_color;
		inner_mat_color = document.attributes.inner_mat_color;
		frame_color = document.attributes.frame_color;
		/*Begin Element Toggles*//*
		if(OptVal1=='11x14') { /*11x14 Toggle for Matting Attributes (visible/hidden)*//*
			mat_style_11x14.disabled=false;
			document.getElementById('section_mat_style_11x14').className='visible';
		}
		else {
			mat_style_11x14.value=null;
			mat_style_11x14.disabled=true;
			document.getElementById('section_mat_style_11x14').className='hidden';
		}
		if(OptVal1=='16x20') { /*16x20 Toggle for Matting Attributes (visible/hidden)*//*
			mat_style_16x20.disabled=false;
			document.getElementById('section_mat_style_16x20').className='visible';
		}
		else {
			mat_style_16x20.value=null;
			mat_style_16x20.disabled=true;
			document.getElementById('section_mat_style_16x20').className='hidden';
		}
		if(OptVal1=='11x14' || OptVal1=='16x20') { /*Toggles Framing Options (visible/hidden)*//*
			frame_color.disabled=false;
			document.getElementById('section_frame').className='visible';
		}
		else {
			frame_color.value=null;
			frame_color.disabled=true;
			document.getElementById('section_frame').className='hidden';
		}
		if(OptVal1=='11x14' || OptVal1=='16x20') { /*Toggles Single or Outer Mat Options (visible/hidden)*//*
			mat_color.disabled=false;
			document.getElementById('section_mat_color').className='visible';
		}
		else {
			mat_color.value=null;
			mat_color.disabled=true;
			document.getElementById('section_mat_color').className='hidden';
		}
		if(OptVal1=='11x14' || OptVal1=='16x20') { /*Toggles Inner Mat Options (visible/hidden)*//*
			inner_mat_color.disabled=true;
			document.getElementById('section_inner_mat_color').className='hidden';
		}
		else {
			inner_mat_color.value=null;
			inner_mat_color.disabled=true;
			document.getElementById('section_inner_mat_color').className='hidden';
		}
	}
	var OptVal2;
	function GetOptVal2(OptVal2){ /*Set OptVal2 Form Elements*//*
		mat_color = document.attributes.mat_color;
		inner_mat_color = document.attributes.inner_mat_color;
		if(OptVal2=='single_11x14' || OptVal2=='single_16x20') { /*Toggles Single or Outer Mat Options (visible/hidden)*//*
			inner_mat_color.disabled=true;
			inner_mat_color.value=null;
			document.getElementById('section_inner_mat_color').className='hidden';
		}
		if(OptVal2=='double_11x14' || OptVal2=='double_16x20') { /*Toggles Single or Outer Mat Options (visible/hidden)*//*
			inner_mat_color.disabled=false;
			document.getElementById('section_inner_mat_color').className='visible';
		}
	}
*/

