/*
 * This file is part of the FSdocu distribution.
 * Detailed copyright and licensing information can be found
 * in the doc/COPYRIGHT and doc/LICENSE files which should be
 * included in the distribution.
 *
 * @package docu
 *
 * @author Fabio Saitta <fabio@saitta.it>
 *
 * @copyright (c)2000-2004 http://www.saitta.it
 * @license http://www.opensource.org/licenses/sleepycat.php
 *
 * @version $Revision: 0.99 $
 * $Id: web.js,v 0.99 2006/11/07 15:48:00 fabio Exp $
 */


fsc=0;

function fs_add(element)
{ 
if(fsc==0) {
 Droppables.add('ar_image', {onDrop:fs_drop});
 el1=document.getElementById("fs_timbro"); 
 };
fsc=fsc+1;
var newdiv=document.createElement("div");
var newtext=document.createTextNode("Campo"+fsc);
newdiv.appendChild(newtext);
newdiv.id="fs_div"+fsc;
newdiv.alt="campo"+fsc;
newdiv.title="Drag me over the form!";
newdiv.style.textAlign="center";
newdiv.style.color="#ffffff";
newdiv.style.backgroundColor="#7f9f50";
newdiv.style.fontFamily="Lucida Grande, Verdana, Arial, Helvetica, sans serif";  
newdiv.style.fontSize="11px";
newdiv.style.width="70px";
newdiv.style.position="absolute";
newdiv.style.top=(el1.offsetTop)+"px";
newdiv.style.left=(el1.offsetLeft+85)+"px";
el=document.body; 
el.appendChild(newdiv);
new Draggable("fs_div"+fsc);
}

function fs_pos(name,x,y)
{ 
if(fsc==0) {
 Droppables.add('ar_image', {onDrop:fs_drop});
 el1=document.getElementById("fs_timbro"); 
 };
fsc=fsc+1;
var newdiv=document.createElement("div");
var newtext=document.createTextNode(name);
newdiv.appendChild(newtext);
newdiv.id="fs_div"+fsc;
newdiv.alt=name;
newdiv.title="Drag me over the form!";
newdiv.style.textAlign="center";
newdiv.style.color="#ffffff";
newdiv.style.backgroundColor="#7f9f50";
newdiv.style.fontFamily="Lucida Grande, Verdana, Arial, Helvetica, sans serif";  
newdiv.style.fontSize="11px";
newdiv.style.width="70px";
newdiv.style.position="absolute";
newdiv.style.top=(x)+"px";
newdiv.style.left=(y)+"px";
el=document.body; 
el.appendChild(newdiv);
new Draggable("fs_div"+fsc);
}

function showResponse (originalRequest) {
	$('loading').style.display = "none";
}
function showLoad () {
	$('loading').style.display = "inline";
}


function fs_drop(element,droppableElement)
{ 
}
