//Creates a popup of the label on the lebeltype page
function popupLabel(template, label)
{
	var windowlocation = 'templates/' + template + '/' + label + '.jpg';
	NewWindow = window.open(windowlocation,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,height=275,width=700,screenX=300,screenY=200,top=300,left=300');
}

//Sets the template and labename hidden fields on the label selection pages before submit
function setTemplateLabel(template, label, lineonex, lineoney, linetwox, linetwoy)
{
	document.forms[0].template.value = template;
	document.forms[0].label.value = label;
	document.forms[0].lineonex.value = lineonex;
	document.forms[0].lineoney.value = lineoney;
	document.forms[0].linetwox.value = linetwox;
	document.forms[0].linetwoy.value = linetwoy;
	document.forms[0].submit();
}

//Checks which box to change the color of
function theColor(cvalue) {
	var controlname = document.forms[0].TextBoxName.value;

	if (controlname == 'LineOneColor') {
		parent.document.forms[0].ctl00$ContentPlaceHolder1$LineOneColor.value = cvalue;
		//parent.document.getElementById(window.name).style.display="none";
	} else if (controlname == 'LineTwoColor') {
		parent.document.forms[0].ctl00$ContentPlaceHolder1$LineTwoColor.value = cvalue;
		//parent.document.getElementById(window.name).style.display="none";
	}
}
