/* js/templates.js
 * A listing of the available templates in the designer, as well as
 * functions to load them.
 */

var Templates = {
    "13_inch_tiles": {
	"20x20": {
	    "display": "20' x 20'",
	    "templates": [ { "index": 58, "image": "img/templates/58.gif", alt="black border, grey interior, red trim" } ]
	},
	"24x24": {
	    "display": "24' x 24'",
	    "templates": []
	}
    }
};

function templates_for_tile(tile_name)
{
    if (tile_name == 'diamondtrax' ||
	tile_name == 'floortrax' ||
	tile_name == 'cointrax' || 
	tile_name == 'sportrax') {
	return Templates["13_inch_tiles"];
    } else if (tile_name == 'ribtrax') {
	return Templates["15_inch_tiles"];
    } else {
	return null;
    }
}

function list_template_sizes(template_collection, parent)
{
    for (var size in template_collection)
    {
	var s = "<option value=" + size + ">" + size.display + "</option>";
	parent.append(s);
    }
}

    