var thePopup;
function findPos( obj )
{
var curleft = 0;
var curtop = 0;
if( obj.offsetParent )
{
curleft = obj.offsetLeft;
curtop = obj.offsetTop;
while( obj = obj.offsetParent )
{
curleft += obj.offsetLeft;
curtop += obj.offsetTop;
}
}
return [curleft, curtop];
}
function showPopup( caller )
{
var popup = document.getElementById( "popuplogin" );
var pos = findPos( caller );
popup.style.left = pos[ 0 ];
popup.style.top = pos[ 1 ] + caller.offsetHeight - 1;
popup.style.display = "";
thePopup = -1;
}
function hidePopup()
{
if( thePopup == -1 )
{
thePopup = 0;
setTimeout( "hidePopup();", 10 );
return;
}
if( thePopup == 1 )
{
return;
}
var popup = document.getElementById( "popuplogin" );
popup.style.display = "none";
}
function add2favorites()
{
var save = top.document.getElementById( "add2favorites" );
save.src = "/cgi-bin/portfolio/art/favorites/add2favorites.cgi?url=" + window.location;
}
document.write( ' ' );
document.write( 'add to artist friends
(you are logged in)' );