<html dir="rtl">
<body id=body >
<script>
var n=(document.all)?0:1;
tr=new Array();
if(n){ document.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN | Event.MOUSEUP)}
document.onmousemove=move;
function getElementByclass(class_name)
{ rt=new Array();
var j,a;
j=0;
a=document.getElementsByTagName('*');
for(i=0;i<a.length;i++)
{
if(a.className==class_name){rt[j]=document.getElementsByTagName('*');j++}
}
return rt;
}
function move(e)
{
if(n){x=e.pageX}else{x=event.x}
if(n){y=e.pageY}else{y=event.y}
movers=getElementByclass('move');
for(i=0;i<movers.length;i++)
{
if(tr[movers.id]){
m=movers;
he=m.offsetHeight;
wi=m.offsetWidth;
m.style.left=x-(wi/2);
m.style.top=y-(he/2);
}
}
}
function add()
{
color=prompt("what is your color?",'black');
init=prompt("what is the passage in it?",' ');
id=prompt("what is its id?",'nothing');
if(!color){color="black";}
if(!init){init=" ";}
if(!id){id="Imam";}
a='<div onmousedown="tr[this.id]=true;" onmouseup="tr[this.id]=false;" class=move id='+id+' style="height:88px;width:204px;background:'+color+';position:absolute;cursor:move;">'+init+'</div>';
document.getElementById('body').innerHTML+=a;
tr[id]=false;
}
function start_move()
{
movers=getElementByclass('move');
for(i=0;i<movers.length;i++)
{
tr[movers.id]=false;
movers.style.position='absolute'
movers.style.cursor='move';
}
}
setTimeout('start_move();',10);
//writen by tabotabdesign
</script>
<div onmousedown='tr[this.id]=true' onmouseup=tr[this.id]=false; id=farshad class=move style="height:88px;width:204px;background:black;">
eraseraser</div>
<div onmousedown='tr[this.id]=true' onmouseup=tr[this.id]=false; id=farzan class=move style="background:red;">
wsadasdfaefwaef</div>
</div>
<div onclick="add();">asdasd
</div>
</body>
</html>