var createtable_loaded=true;
function f51570(v12475,v12294)
{
var v12382=document.getElementsByTagName("body")[0];
var v12384=document.createElement("table");
var v12385=document.createElement("tbody");
for(var j=0;j<10;j++)
{
v15878=document.createElement("tr");
for(var i=0;i<10;i++)
{
v15877=document.createElement("td");
v15877.setAttribute("align","center");
v15879=document.createElement("input");
v15879.setAttribute("type","button");
v15879.setAttribute("value",""+(j+1)+"x"+(i+1)+"");
v15879.onclick=function(v10296){f51544(this);};
v15877.appendChild(v15879);
v15877.setAttribute("borderColor","#BB804B");
v15878.appendChild(v15877);
}
v12385.appendChild(v15878);
}
v12384.appendChild(v12385);
v12382.appendChild(v12384);
v12384.setAttribute("border","2");
v12384.setAttribute("borderColor","#6D4929");
v12384.onclick=function(v10296){f51580(this);}
}
function f51544(button)
{
var value=button.value;
var v11253=new Array();
v11253=value.split('x');
var v13268=v11253[0];
var Cols=v11253[1];
f51568(v13268,Cols);
}
function f51568(v12475,v12294)
{
var v12304=document.getElementsByTagName("body")[0];
var v12308=document.createElement("table");
v12308.setAttribute("style","table-layout:fixed");
var v12309=document.createElement("tbody");
for(var j=0;j<v12475;j++)
{
v10186=document.createElement("tr");
for(var i=0;i<v12294;i++)
{
v15805=document.createElement("td");
v15805.setAttribute("width","50");
v15805.setAttribute("borderColor","#BB804B");
CurrentDiv=document.createElement("span");
CurrentDiv.setAttribute("contentEditable","false");
v15805.appendChild(CurrentDiv);
v10186.appendChild(v15805);
}
v12309.appendChild(v10186);
}
v12308.appendChild(v12309);
v12304.appendChild(v12308);
v12308.setAttribute("border","2");
v12308.setAttribute("borderColor","#6D4929");
return(v12308);
}
function f51580(table)
{
v12423=table.rows.length;
for(var i=v12423;i>0;i--)
{
table.deleteRow(i-1);
}
}
function f51652(table)
{
v12423=table.rows.length;
v12422=table.rows[v12423-1].cells.length;
var x=table.insertRow(v12423);
for(var j=0;j<v12422;j++)
{
v15892=document.createElement("div");
v15892.setAttribute("contentEditable","true");
v12412=x.insertCell(j);
v15891=document.createTextNode(" ");
v12412.setAttribute("width","50");
v15892.appendChild(v15891);
v12412.appendChild(v15892);
v12412.setAttribute("borderColor","#BB804B");
}
}
function f51908(table)
{
v12423=table.rows.length;
table.deleteRow(v12423-1);
}
function f51770(table)
{
var v12476;
v12423=table.rows.length;
v12422=table.rows[v12423-1].cells.length;
for(var i=0;i<v12423;i++)
{
v12476=table.rows[i];
v12476.deleteCell([v12422-1])
}
}
function f51650(table)
{
var rows;
v12423=table.rows.length;
v12422=table.rows[v12423-1].cells.length;
for(var i=0;i<v12423;i++)
{
v15892=document.createElement("div");
v15892.setAttribute("contentEditable","true");
rows=table.rows[i];
v15890=document.createElement("td");
v15890=rows.insertCell([v12422]);
v15890.setAttribute("width","50");
v15890.appendChild(v15892);
v15890.setAttribute("borderColor","#BB804B");
}
}
function f51821(v12743)
{
var v12723=v12743.cells.length;
var v12732=v12743.insertCell(v12723);
v12732.innerHTML="&nbsp;"
}
function f51819(v12743)
{
var v12723=v12743.cells.length;
v12743.deleteCell(v12723-1);
}
function f51847(v12608)
{
v12423=v12608.rows.length;
if(v12608.caption!=null)
{
v12608.deleteCaption();
}
for(var i=v12423;i>0;i--)
{
v12608.deleteRow(i-1);
}
}
function f51835(v12608)
{
v12423=v12608.rows.length;
v12422=v12608.rows[v12423-1].cells.length;
for(var i=0;i<v12423;i++)
{
if(v12608.rows[i].uniqueID==v12738.uniqueID)
{
var v12736;
v12736=i+1;
var x=v12608.insertRow(v12736);
}
}
for(var j=0;j<v12422;j++)
{
v12412=x.insertCell(j);
v12412.innerHTML="&nbsp";
v12412.setAttribute("valign","top");
}
}
function f51843(v12608)
{
v12423=v12608.rows.length;
for(var i=0;i<v12423;i++)
{
if(v12608.rows[i]!=null||v12608.rows[i]=='undefined')
{
if(v12608.rows[i].uniqueID==v12738.uniqueID)
{
var v12736;
v12736=i;
v12608.deleteRow(v12736);
}
}
}
}
function f51822(v12608)
{
var v12476;
v12423=v12608.rows.length;
v12422=v12608.rows[v12423-1].cells.length;
for(var i=0;i<v12423;i++)
{
v12476=v12608.rows[i];
v12476.deleteCell([v12422-1])
}
}
function f51832(v12608)
{
var rows;
v12423=v12608.rows.length;
v12422=v12608.rows[v12423-1].cells.length;
for(var i=0;i<v12423;i++)
{
rows=v12608.rows[i];
v15890=document.createElement("td");
v15890.setAttribute("valign","top");
v15890=rows.insertCell([v12422]);
v15890.innerHTML="&nbsp";
}
}
var v12742;
var v12737;
var v12738;
try
{
var TablePopup;
if(f50482())
{
TablePopup=window.createPopup();
}
}
catch(v12703)
{
TablePopup=null;
}
function f51842(e)
{
var TablePopupBody=TablePopup.document.body;
TablePopupBody.style.border="ridge 3 eeeeee";
TablePopupBody.style.backgroundColor="#F0F0F0";
TablePopupBody.style.textAlign="left";
TablePopupBody.style.width="100%";
TablePopupBody.style.height="100%";
TablePopupBody.style.fontFamily="tahoma";
TablePopupBody.style.fontSize="10pt";
TablePopupBody.style.overflow="auto";
if(e.srcElement.tagName=='td'||e.srcElement.tagName=='TD')
{
v12737=e.srcElement.offsetParent;
v12738=e.srcElement.parentElement;
TablePopupBody.innerHTML="<DIV  style='align=center;width:150px;height:150px;filter:progid:DXImageTransform.Microsoft.gradient(gradientType=1,startColorstr=skyblue, endColorstr=dodgerblue)	progid:DXImageTransform.Microsoft.Shadow(color=#444444, Direction=135, Strength=1);'><div style='border-bottom: 1px solid #eeeeee;margin: 2px;'>Table Menu</div><a  style='cursor:hand' onclick='parent.f51834()'><img src='http://images.zcubes.com/zboxdev/editor/Insert-Row.gif'>Insert Row</a><br><a  style='cursor:hand' onclick='parent.f51909()'><img src='http://images.zcubes.com/zboxdev/editor/Delete-Row.gif'>Delete Row</a><div style='border-top: 1px solid #999999;border-bottom: 1px solid #eeeeee;margin: 2px;'></div><a  style='cursor:hand' onclick='parent.f51833()'><img src='http://images.zcubes.com/zboxdev/editor/insert-column.gif'>Insert Column</a><br><a  style='cursor:hand' onclick='parent.f51825()'><img src='http://images.zcubes.com/zboxdev/editor/delete-column.gif'>Delete Column</a><div style='border-top: 1px solid #999999;border-bottom: 1px solid #eeeeee;margin: 2px;'></div><a  style='cursor:hand' onclick='parent.f51820()'><img src='http://images.zcubes.com/zboxdev/editor/insert-cell.gif'>Insert Cell</a><br><a  style='cursor:hand' onclick='parent.f51818()'><img src='http://images.zcubes.com/zboxdev/editor/delete-cell.gif'>Delete Cell</a><div style='border-top: 1px solid #999999;border-bottom: 1px solid #eeeeee;margin: 2px;'></div><a  style='cursor:hand' onclick='parent.f51846()'><img src='http://images.zcubes.com/zboxdev/editor/delete-table.gif'>Delete Table</a><div style='border-top: 1px solid #999999;border-bottom: 1px solid #eeeeee;margin: 2px;'></div><a  style='cursor:hand' onclick='parent.TableProperties()'><img src='http://images.zcubes.com/zboxdev/editor/table-properties.gif'>Table Properties</a></DIV>";
TablePopup.show(25,-3,160,280,e.srcElement);
}
if(e.srcElement.tagName=='table'||e.srcElement.tagName=='TABLE')
{
v12737=e.srcElement;
TablePopupBody.innerHTML="<DIV  style='align=center;width:150px;height:150px;filter:progid:DXImageTransform.Microsoft.gradient(gradientType=1,startColorstr=skyblue, endColorstr=dodgerblue)	progid:DXImageTransform.Microsoft.Shadow(color=#444444, Direction=135, Strength=1);'><br><div style='border-top: 1px solid #999999;border-bottom: 1px solid #eeeeee;margin: 2px;'></div><a  style='cursor:hand' onclick='parent.f51846()'><img src='http://images.zcubes.com/zboxdev/editor/delete-table.gif'>Delete Table</a><div style='border-top: 1px solid #999999;border-bottom: 1px solid #eeeeee;margin: 2px;'></div><a  style='cursor:hand' onclick='parent.TableProperties()'><img src='http://images.zcubes.com/zboxdev/editor/table-properties.gif'>Table Properties</a></DIV>";
TablePopup.show(135,5,160,50,e.srcElement);
}
f50345(e);
}
function f51831()
{
try
{
TablePopup.hide();
}
catch(v12703)
{
}
}
function f51820()
{
f51821(v12738);
f51831();
}
function f51818()
{
f51819(v12738);
f51831();
}
function f51834()
{
f51835(v12737);
f51831();
}
function f51833()
{
f51832(v12737);
f51831();
}
function f51909()
{
if(!(v12737.rows.length==1))
{
f51843(v12737);
f51831();
}
}
function f51825()
{
if(!(v12737.rows[v12737.rows.length-1].cells.length==1))
{
f51822(v12737);
f51831();
}
}
function f51846()
{
f51847(v12737);
f51831();
}
function TableProperties()
{
DisplayTableProperties(v12737);
f51831();
}
var v12701;
function DisplayTableProperties(v12608)
{
v12701=f50609(ZMakeSystemBox(f50005(ThisServer+'/DisplayTableProperties.aspx?SomeTableCode='+v12608.uniqueID),'Table Properties'),438,194,312,243)
}
function CreateTable(v12475,v12294,somewidth,someheight,v12722,v12733,somespacing,v12721,somecaption,v12740)
{
var TableWidth,TableHeight,TableBorder,TableCellPadding,TableCellSpacing,TableAlign,TableCaption,TableSummary;
if(typeof somewidth=='undefined')
{
TableWidth="150px";
}
else
{
TableWidth=somewidth+"px";
}
if(typeof someheight=='undefined')
{
TableHeight="100px";
}
else
{
TableHeight=someheight+"px;"
}
if(typeof v12722=='undefined')
{
TableBorder="1";
}
else
{
TableBorder=v12722;
}
if(typeof v12733=='undefined')
{
TableCellPadding="1";
}
else
{
TableCellPadding=v12733;
}
if(typeof somespacing=='undefined')
{
TableCellSpacing="1";
}
else
{
TableCellSpacing=somespacing;
}
if(typeof v12721=='undefined')
{
TableAlign="Left";
}
else
{
TableAlign=v12721;
}
if(typeof somecaption=='undefined')
{
TableCaption="";
}
else
{
TableCaption=somecaption;
}
if(typeof v12740=='undefined')
{
TableSummary="";
}
else
{
TableSummary=v12740;
}
var v12304=document.getElementsByTagName("body")[0];
var v12308=document.createElement("table");
v12308.setAttribute("width",TableWidth);
v12308.setAttribute("height",TableHeight);
v12308.setAttribute("cellPadding",TableCellPadding);
v12308.setAttribute("cellSpacing",TableCellSpacing);
v12308.setAttribute("align",TableAlign);
v12308.setAttribute("summary",TableSummary);
if(TableCaption!="")
{
var v12741=v12308.createCaption();
v12741.innerText=TableCaption;
}
var v12309=document.createElement("tbody");
for(var j=0;j<v12475;j++)
{
v10186=document.createElement("tr");
for(var i=0;i<v12294;i++)
{
v15805=document.createElement("td");
v15805.setAttribute("valign","top");
v15805.setAttribute("style","border-style: solid");
v15805.setAttribute("style","border-width: 1px");
v15805.innerHTML="&nbsp;";
v10186.appendChild(v15805);
}
v12309.appendChild(v10186);
}
v12308.appendChild(v12309);
v12304.appendChild(v12308);
if(TableBorder!='0')
{
v12308.setAttribute("border",TableBorder);
}
else
{
v12308.setAttribute("border","1");
v12308.setAttribute("borderColor","#DFDFFF");
}
return(v12308.outerHTML);
}

