var uniqueSeed = 0;
var glob = null;
var icons = new Array();
for(var i=1;i<=5;i++)
{
 icons.push("icon"+i+".png");
}

function delt(n)
{
 n.parentNode.removeChild(n);
}

function deltItem()
{
if(glob!=null && globI!=null)
{
 delt(glob);
 delt(globI);
}
}

function newImg(url)
{
var o = document.createElement("IMG");
o.src = url;
o.style.position = "absolute";
o.style.left = 0;
o.onmouseup = function()
{
 glob = o;
 globI = o.inp;
}
o.style.top = 0;
document.getElementById("jsgd_box").appendChild(o);
var dob = DragHandler.attach(o);
var inp = document.createElement("INPUT");
inp.type = "hidden";
inp.setAttribute("name","i"+uniqueSeed);
inp.setAttribute("id","i"+uniqueSeed);
o.inp = inp;
document.getElementById("jsgd_box").appendChild(inp);
var iX = parseInt(o.style.left);
var iY = parseInt(o.style.top);
var iWidth;
var iHeight; 
inp.value = url + ":" + iWidth + ":" + iHeight + ":" + iX + ":" + iY;
uniqueSeed++;
}
function setCS()
{
 document.getElementById("jsgd_box").style.width = document.getElementById("cw").value + "px";
 document.getElementById("jsgd_box").style.height = document.getElementById("ch").value + "px";
}

function execAcIn()
{
$(function() {
 $("#accordion").tabs("#accordion div.pane", {tabs: 'h2', effect: 'slide', initialIndex: 0});
});
}

function initAccordion()
{
$(function() { 
 $("#accordion").tabs("#accordion div.pane", {tabs: 'h2', effect: 'slide', initialIndex: 0});
});
}

$(document).ready(function()
{
setCS();load('http://www.geradordecamisas.com/gerador/acc.php','acc','topdir='+topdir);
});
