function clearAll() {
	if (confirm('Are you sure you want to erase everything from the label sheet?'))	{
		for (i=1; i<=45; i++) {
			useID = 'dropContent'+i;
			document.getElementById(useID).innerHTML = "";
			sheet[i]="";
			which = "x"+i;
			document.getElementById(which).style.visibility = "hidden";
		}
		buildStr();
	}


}

function clearCell(cell) {
		useID = 'dropContent'+cell;
		document.getElementById(useID).innerHTML = "";
		sheet[cell]="";
		buildStr();
		which = "x"+cell;
		document.getElementById(which).style.visibility = "hidden";
}

sheet = new Array(45);

function init() {
	for (i=1; i<=45; i++) {
		sheet[i] = "";
	}
}

function buildStr() {
	str = "";
	for (i=1; i<=45; i++) {
		str+= sheet[i]+"|*|";
	}
	document.labels.sstr.value = addslashes(str);
}

function showX(z) {
	which = "x"+z;
	document.getElementById(which).style.visibility = "visible";
}

function swapFont(font) {
	for (i=1; i<=45; i++) {
		useID = 'dropContent'+i;
		document.getElementById(useID).style.fontFamily= font;
	}
}

function swapSize(fsize) {
	for (i=1; i<=45; i++) {
		useID = 'dropContent'+i;
		document.getElementById(useID).style.fontSize= fsize+"px";
	}
	if (fsize==13){
		which = "fontwarn";
		document.getElementById(which).style.visibility = "visible";
	}
	else {
		document.getElementById(which).style.visibility = "hidden";
	}

}







function addslashes(str) {
	str=str.replace(/\\/g,'\\\\');
	str=str.replace(/\'/g,'\\\'');
	str=str.replace(/\"/g,'\\"');
	str=str.replace(/\0/g,'\\0');
	return str;
}
function stripslashes(str) {
	str=str.replace(/\\'/g,'\'');
	str=str.replace(/\\"/g,'"');
	str=str.replace(/\\0/g,'\0');
	str=str.replace(/\\\\/g,'\\');
	return str;
}

init();

