var pageposx, pageposy;

switch (pagetype) {
	case 'configurator':
		pageposx = 398;
		pageposy = 156;
		break;
	case 'reviewer':
		pageposx = 347;
		pageposy = 97;
		break;
	case 'admin':
		pageposx = 20;
		pageposy = 400;
		break;
	default:
		pageposx = 21;
		pageposy = 130;
		break;
}


// Set the coordinates for the marbles

var marblecoords = new Array('52|53','78|53','104|53','130|53','156|53','182|53','208|53','234|53','260|53','52|79','78|79','104|79','130|79','156|79','182|79','208|79','234|79','260|79','52|105','78|105','104|105','130|105','156|105','182|105','208|105','234|105','260|105','52|131','78|131','104|131','130|131','156|131','182|131','208|131','234|131','260|131','52|157','78|157','104|157','130|157','156|157','182|157','208|157','234|157','260|157','52|183','78|183','104|183','130|183','156|183','182|183','208|183','234|183','260|183','52|209','78|209','104|209','130|209','156|209','182|209','208|209','234|209','260|209','52|235','78|235','104|235','130|235','156|235','182|235','208|235','234|235','260|235','52|261','78|261','104|261','130|261','156|261','182|261','208|261','234|261','260|261');


// Set the shape and size

var shape = 'square';
var size = '16';


// Modifiers for admin tool

var shapewidth = 333;
var marblewidth = 23;
var adminscalex = 4.708;
var adminscaley = 4.650;


// Templates for this fixture

var template = new Array();
var templatefinish = new Array();

template[0] = '2,2,9,8,9,7,5,2,3,5,1,3,1,4,2,3,7,9,8,4,7,9,5,3,9,2,4,2,3,5,1,2,9,7,5,2,1,7,8,8,4,1,8,4,5,3,2,9,5,2,4,7,3,9,7,4,8,3,4,1,5,8,2,2,8,1,7,5,2,8,4,1,5,3,4,2,3,1,7,3,7';
templatefinish[0] = 0;

template[1] = '1,0,1,1,1,0,1,1,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,7,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,1,1,1,0,0';
templatefinish[1] = 1;

template[2] = '2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,2,2,2,0,0,0,0,0,0,2,2,2,0,2,0,0,0,0,2,2,2,2,2,0,0,0,0,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2,2,2';
templatefinish[2] = 1;

template[3] = '0,1,0,0,1,0,0,1,0,1,1,1,1,1,1,1,1,1,0,1,0,0,1,0,0,1,0,0,5,0,0,5,0,0,5,0,5,5,5,5,5,5,5,5,5,0,5,0,0,5,0,0,5,0,0,9,0,0,9,0,0,9,0,9,9,9,9,9,9,9,9,9,0,9,0,0,9,0,0,9,0';
templatefinish[3] = 0;

template[4] = '0,4,4,4,0,0,0,0,0,0,4,4,4,0,0,2,2,2,0,4,4,4,0,0,2,2,2,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,0,2,2,0,0,0,7,7,7,7,2,2,0,4,0,7,7,7,7,2,2,0,4,0,7,7,7,7,2,2,0,4,0,0,0,0,0';
templatefinish[4] = 0;

template[5] = '1,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1';
templatefinish[5] = 2;

template[6] = '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,9,9,9,9,0,0,0,0,0,9,9,9,9,0,0,0,0,0,9,9,9,9,0,0,0,0,0';
templatefinish[6] = 2;

template[7] = '0,0,0,0,0,0,0,0,0,2,2,2,8,8,8,8,8,8,2,2,2,9,9,9,9,9,9,2,2,2,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0';
templatefinish[7] = 1;

