// id: id of popup window to show
// clickelement: element where the onclick happend - to get the position of that element
// greyelmement: element to get transparent - attention: needs width and height settings for IE6 to work
// hideelement: optional formelment to hide - IE6 cannot make form elements transparent
function fcshow(id, clickelement, greyelement, hideelement) {
    var f=document.getElementById(id);
    f.style.display="block";
    f.style.left = "320px";
    f.style.top = getTop(clickelement) + "px";
 
    var g=document.getElementById(greyelement);
    g.style.filter='Alpha(opacity=30)'
    g.style.opacity= ".3";

    var h ;
    if (h=document.getElementById(hideelement)){
      h.style.visibility="hidden";
    }
}

// id: id of popup window to hide
// greyelmement: element to remove transparency - attention: needs width and height settings for IE6 to work
// hideelement: optional formelment to hide - IE6 cannot make form elements transparent
function fchide(id, greyelement, hideelement) {
    var f=document.getElementById(id);
    f.style.display='none';

    var g=document.getElementById(greyelement);
    g.style.opacity= '1';
    g.style.filter='none';

    var h;
    if(h==document.getElementById(hideelement)){
       h.style.visibility="visible";
    }
}


function getTop(element){
	var top=0;
	while(element.offsetParent) {
	    top+=element.offsetTop;
	    element=element.offsetParent;
	}
	return top;
}