//    ##################################################################################
//    ##																				##
//    ##  	Geek Autolink 4.5c 		                                        			##
//    ##	installer, upgrader, uninstaller and dishwasher								##
//    ##  	Stick this file in your forums/clientscript folder	 		                ##
//    ##	You could be scolded and publicly humiliated by altering or stealing my code##
//    ##	Copyright 2005 by The Geek. Code may not be used in whole                 	##
//    ##	or part without my written permission. You may not distribute this          ##
//    ##	or any of my files without my written permission. If you do,                ##
//    ##	you could face imprisonment on some desolate island far from civilization   ##
//    ##	dweeb.                                                                      ##
//    ##	This pretty box for example is mine. If you copy or modify this pretty box, ##
//    ##  	my suits will be on you like... well - like suits. Only poorly tailored     ##
//    ##	cheap suits. People may make fun of you for such cheap suits.				##
//    ##                                                                              	##
//	  ##	gal_popup.js              		                                            ##
//    ##	Last file chage 11.10.05                                                    ##
//    ##                                                                              	##
// 	  ## Copyright ©2005 vBGeek. All Rights Reserved.                                 	##
// 	  ## This file may not be redistributed in whole or significant part. 				##
//    ## ---------------- GEEK AUOTLINK IS NOT FREE SOFTWARE ---------------- 			##
//	  ## http://www.thevbgeek.com  														##
//    ##################################################################################

function GAL_popup(e,offset,width, box_style, value,value_style, title, title_style)
{
    if (!offset)
    {
    	offset = 1;
    }
	var leftpx 	= e.offsetLeft;
	var toppx 	= e.offsetTop;
	while ((e = e.offsetParent) != null)
	{
		leftpx 	+= e.offsetLeft;
		toppx	+= e.offsetTop;
	}
    if (is_ie)
	{
    	toppx	+=19;
    }
    else
    {
        toppx 	+=19;
    }

	var dest = fetch_object("GALBox");
    toppx=toppx-offset;
    dest.style.left = leftpx + "px";
    dest.style.top  = toppx + "px";
    if (width)
    {
    	width = " Width='" + width + "' ";
    }
    else
    {
    	width = " Width='300px' ";
    }

    var innerhtml="<table border='0' cellpadding='0' cellspacing='0' " + width + "><tr><td onmouseover=\"this.style.visibility='visible';\" onmouseout=\"this.style.visibility='hidden';\"><div " + box_style + width + " >";
    if (title)
    {
    	innerhtml=innerhtml + "<div " + title_style + "' >" + title + "</div>";
    }
    innerhtml= innerhtml + "<div " + value_style + "' >" + value + "</div></div></td><tr></table>";
    dest.innerHTML=innerhtml;
    if ((window.document.body.clientWidth-dest.offsetWidth)<leftpx)
    {
        leftpx=window.document.body.clientWidth-dest.offsetWidth;
        dest.style.left = leftpx + "px";
    }
    //alert(innerhtml);
	dest.style.visibility='visible';
}

function GAL_hidepopup(){
	fetch_object("GALBox").style.visibility='hidden';
}