
function setVisible(obj, user, fromdiv, ruser)
{
	obj = document.getElementById(obj);
	if (fromdiv.substr(0,8) == "tworries")
	{
	    positem = document.getElementById("tworries");
	}
	else {
	    positem = document.getElementById(fromdiv.substr(2));
	}
	
	var topValue= 0,leftValue= 0;
    while(positem){
	    leftValue+= positem.offsetLeft;
	    topValue+= positem.offsetTop;
	    positem= positem.offsetParent;
    }
    
	if (fromdiv.substr(0,8) == "tworries")
	{
	    leftValue += 100;
	    var tw_id = fromdiv.substr(9);
	    if (tw_id == "1") {  topValue += 800; }
	    if (tw_id == "2") {  topValue += 700; }
	    if (tw_id == "3") {  topValue += 600; }
	    if (tw_id == "4") {  topValue += 500; }
	    if (tw_id == "5") {  topValue += 400; }
	    if (tw_id == "6") {  topValue += 300; }
	    if (tw_id == "7") {  topValue += 200; }
	    if (tw_id == "8") {  topValue += 100; }
	    if (tw_id == "9") {  topValue += 0; }
	    //topValue += 200;
	}
	else {
	    var c_id = fromdiv.substr(0,1);
	    // move it underneath so the tweet replied to stays visible
	    if (c_id == "1") { topValue += 500; }
	    if (c_id == "2") { topValue += 360; }
	    if (c_id == "3") { topValue += 220; }
	    if (c_id == "4") { topValue += 80; }
	}
	
	obj.style.left = leftValue + "px";
	obj.style.top = topValue + "px";	
	
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
	
	tacct = document.getElementById("t_acct");
	tacct.value = ruser;
	
	rlabel = document.getElementById("r_label");
	rlabel.innerHTML = "Your reply from @" + ruser + "<br />will appear on Twitter in this person's @replies";
	
	texta = document.getElementById("twit-box");
	texta.focus();
	texta.value = "@" + user + " ";		
	

}
