
window.addEvent('domready', function() {   
    //time to implement fancy show / hide   
    Element.implement({   
        //implement show   
        fancyShow: function() {   
                this.fade('in');   
        },   
        //implement hide   
        fancyHide: function() {   
           this.fade('out');   
        }   
    });   
});  


function show_panel_info(x,y,s,desc,url,src) 
{ 
if (!$('quilt_map')) return false;
mapPos = $('quilt_map').getPosition();
x = x + mapPos.x + 1;
//document.write('*'+x);
//$('xpos').value=x;
//$('mappos').value=mapPos.x;
x=x-mapPos.x;
mpsh= -1; mpsw = 1;
mph= 0; mpw = 0;
vt = -3;
if(Browser.Engine.trident) { mpsh=0; mpsw = 0; mph=1; mpw = 0; vt = 0; $('tiptextinc').style.height="43"; }
origY = y;

var y = y - $('quilt_map').getSize().y-vt;

if (s == "square_sml") 
{ 
	var width = 40+mpsw;
	var height = 41+mpsh;	
}

if (s == "square_med") 
{ 
	var width = 86+mpw;
	var height = 86+mph;	
}



//alert(mapPos.x + " " + mapPos.y + " " + x + " " + y);
//alert(width + " " + height);

xPos = mapPos.x + x - 240 / 2 + width / 2;

if(xPos < 0) {
	xPos = 0;
}

if(xPos + 247 > window.getSize().x) {
	xPos = window.getSize().x - 247;
}




$('quilttip').style.zIndex = "100000";
$('quilttip').style.position= "absolute"; 
$('quilttip').style.left=xPos + "px"; 
$('quilttip').style.top=(mapPos.y + origY - 70) + "px"; 
$('tiptextinc').innerHTML = desc;



$('quilthover').style.height = height + "px";
$('quilthover').style.width = width + "px";
$('quilthover').style.zIndex = "10000";
$('quilthover').style.position= "relative"; 
$('quilthover').style.left= x + "px"; 
$('quilthover').style.top= y + "px"; 
$('quilthover').style.borderStyle= "solid"; 
$('quilthover').style.borderColor= "#FD4C54";
$('quilthover').style.borderWidth= "2px";
//$('quilthover_link').addEvent('click', function() { popAjaxPrompt('/PROMPT-webpage.php?ui='+url,'920','600'); });
$('quilthover_link').href="javascript:popAjaxPrompt('/PROMPT-MatchImage.php?ui="+url+"&src="+src+"','800','512');";
$('quilttip').style.display="block";
$('quilthover').fancyShow();
} 


