function clickItem(item)
{
var isTable = item.getAttribute("TableName");
if(document.Event.ReadOnly)
{
// Do Nothing
return;
}
var seatcount = parseInt(item.getAttribute("seatcount"));
var available = parseInt(item.getAttribute("available"));
var selected = parseInt(item.getAttribute("selected"));
if(seatcount > ((seatcount-available)+selected))
{
// Available - Allocate
reserveSeatAtTable(isTable);
}
else
{
alert("Selected Seats Are Not Available");
}
}
function clickItem(item,count)
{
//alert('clickItem 2 vars: '+item+" -> "+count);
var isTable = item.getAttribute("TableName");
if(document.Event.ReadOnly)
{
// Do Nothing
return;
}
var seatcount = parseInt(item.getAttribute("seatcount"));
var available = parseInt(item.getAttribute("available"));
var selected = parseInt(item.getAttribute("selected"));
//if(seatcount > ((seatcount-available)+count))
if(count <= available)
{
// Available - Allocate
reserveSeatAtTable(isTable,count);
}
else
{
alert("Selected Seats Are Not Available");
}
}
function clickSeat(item,count)
{
var isTable = item.getAttribute("SeatName");
// alert('clickSeat 2 vars: '+item+" -> "+count+", *"+isTable);
if(document.Event.ReadOnly)
{
// Do Nothing
return;
}
var seatcount = parseInt(item.getAttribute("seatcount"));
var available = parseInt(item.getAttribute("available"));
var selected = parseInt(item.getAttribute("selected"));
//if(seatcount > ((seatcount-available)+count))
if(count <= available)
{
// Available - Allocate
//reserveSeatAtTable(isTable,count);
reserveSeat(isTable,count);
}
else
{
alert("Selected Seat Is Not Available");
}
}
function allocateSuccess(itemname)
{
var item = document.getElementById(itemname);
var isTable = item.getAttribute("TableName");
var seatcount = parseInt(item.getAttribute("seatcount"));
var available = parseInt(item.getAttribute("available"));
var selected = parseInt(item.getAttribute("selected"));
selected++;
item.innerHTML = '
' + selected;
item.setAttribute("selected",selected);
//alert(item.className);
if(item.className.indexOf('seat')==0){
item.className = "seatselected";
}else{
item.className = "tableselected";
}
}
function allocateSuccess(itemname,count)
{
var item = document.getElementById(itemname);
var oldClass = item.className;
var selected = parseInt(item.getAttribute("selected"));
selected=count;
var x = item.innerHTML;
// x = x.toLowerCase();
x = x.replace('DIV','div');
// alert(x);
var ptr1 = x.indexOf('