
addEvent(window, 'load', envelopesSetup, false);
addEvent(window, 'load', cardTextNodeCollapse, false);

function envelopesSetup(){
	var ep=document.forms.printThis.elements.epsPrinting;//this is a checkbox
	addEvent(ep, 'click', epsNodeCollapse, false);//that should be valid...
	epsNodeCollapse();
	}

function epsNodeCollapse(){
	try{
	//envelope printing
	var ep=document.forms.printThis.elements.epsPrinting;//this is a checkbox
	var containerDiv = document.getElementById('collapsible');
	containerDiv.style.display = ep.checked?'block':'none';
	//allTheAction();
	//alert('is that you calling?');
	}catch(err){alert(err);}
}

function cardTextNodeCollapse(){
	//card printing
	try{
		//old version was based on a checkbox.
		var cp = document.getElementById('cardTextOpt');
		var colorSelection = document.forms.printThis.elements.colors;
		if(colorSelection.value != '4/1'){
			cp.style.display = 'none';
			}else{
				cp.style.display = 'block';
				}
		//var fullColorNote = document.getElementById('fullColorOption');	//i appear to have erased this.
		//if(colorSelection.value == '4/4'){fullColorNote.style.display = 'none';}
		colorSelection.onchange=function(){
			if(colorSelection.value == '4/1'){cp.style.display='block';}else{cp.style.display="none";}
			//if(colorSelection.value == '4/4'){fullColorNote.style.display = 'block'}else{fullColorNote.style.display = 'none';}
			}	//[colorSelection.selectedIndex]
	}catch(e){alert(e);}
}
