var a;
var b;
var c;

function wopen(a,b,c)
{
temp="pages/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function winopen(a,b,c)
{
temp="thankyou_images/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function wopennow(a,b,c)
{
temp="cat5/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function wopennew(a,b,c)
{
temp="new_cards/1/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function fopen(a,b,c)
{
temp="new_cards/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function fopen_1(a,b,c)
{
temp="new_cat1_pages/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function wopen_1(a,b,c)
{
temp="new_cards/2/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function wopen_2(a,b,c)
{
temp="new_cat1_pages/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function wopen_3(a)
{
temp="hmp_swatches/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+750+',height='+560)
}

function wopen01(a)
{
temp="../hmp_swatches/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+750+',height='+560)
}

function wopen_x(a,b,c)
{
temp=a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function wopen_y(a,b,c)
{
temp="tassels/pages/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function cat9(a,b,c)
{
temp="cat9/"+a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

function winpopup(a,b,c)
{
temp=a;
window.open(temp,'Popup_Window','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width='+b+',height='+c)
}

c=0
function check(a)
{
	// a is the current checkbox
	if(a.checked==false)
	{
		c--;
	}
	if(a.checked==true)
	{
		c++;
	}
	if(document.tassels.type[0].checked)
	{
		if(c>1)
		{
			alert("You cannot select more than one thread")
			a.checked=false;
			c--;
		}
	}
	else
	{
		if(c>2)
		{
		alert("You cannot select more than two threads")
		a.checked=false;
		c--;
		}
	}
}

var len;
var aa;
var ch="";
function check1()
{
	len=tassels.elements.length;

	for(i=6;i<=len-2;i++)
	{
		if(tassels.elements[i].checked)
		{
			aa=tassels.elements[i].value;
			ch=ch+" "+aa;
		}
	}
	tassels.chk.value=ch;

	tassels.submit();
}