// Checks if the browsers is IE or another.
// document.all will return true or false depending if its IE
// If its not IE then it adds the mouse event
if (!document.all)
document.captureEvents(Event.MOUSEMOVE)

// On the move of the mouse, it will call the function getPosition
document.onmousemove = getPosition;

// These varibles will be used to store the position of the mouse
var X = 0
var Y = 0
// This is the function that will set the position in the above varibles 
function getPosition(args) 
{
  // Gets IE browser position
  if (document.all) 
  {
    X = event.clientX + document.body.scrollLeft;
    Y = event.clientY + document.body.scrollTop;
  }
  // Gets position for other browsers
  else 
  {  
    X = args.pageX
    Y = args.pageY
  }  
 
}


function popUp3(username,member_id)
{
    var div;
    
    if(document.getElementById)
    // Standard way to get element
    div = document.getElementById('popupWindow3'); 
    else if(document.all) 
    // Get the element in old IE's 
    div = document.all['popupWindow3']; 
    
    // if the style.display value is blank we try to check it out here 
    if(div.style.display==''&&div.offsetWidth!=undefined&&div.offsetHeight!=undefined)
    {
        div.style.display = (div.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; 
    }
    
    // If the PopUp is hidden ('none') then it will display it ('block').
    // If the PopUp is displayed ('block') then it will hide it ('none').
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
	
	img = document.getElementById('abou_me_text'); 
	var DivWidth = parseInt(img.width)+150;
	var DivHeight = parseInt(img.height)+200;
    
    // Off-sets the X position by 15px
    X = X + 15;
	
	if(X+DivWidth>screen.width){
		X -= X+DivWidth-screen.width+60;
	}
	
	if(Y+DivHeight>screen.height){
		Y -= Y+DivHeight-screen.height+100;
	}
    
    // Sets the position of the DIV
    div.style.left = X+'px';
    div.style.top = Y+'px';
	
	new Ajax.Request('/mypage_edit.php',
	{
	method: 'get',
	parameters: {username: username, member_id: member_id, mode: 'EditAboume'},
	onSuccess: function(transport){
			var response = transport.responseText || "no response text";
			
			 var results = new Array();
			 results =response.split("|");
			 alert(results);
			 document.getElementById('aboutme_id').value = results[0];
			 document.getElementById('about_me').value = results[1];
			}
	});

}

