var left = 0;
var top = 0;
function GetPosition(obj)
{
left = 0;
top = 0;
while(obj != document.body){
left += obj.offsetLeft;
top += obj.offsetTop;
obj = obj.offsetParent;
}
left += obj.offsetLeft;
top += obj.offsetTop;
}
var sent = document.getElementById("s"+index+"s");
GetPosition(sent);
var top = 0;
function GetPosition(obj)
{
left = 0;
top = 0;
while(obj != document.body){
left += obj.offsetLeft;
top += obj.offsetTop;
obj = obj.offsetParent;
}
left += obj.offsetLeft;
top += obj.offsetTop;
}
var sent = document.getElementById("s"+index+"s");
GetPosition(sent);