function showModal(parameter, width, type) {     
	var v_top = 0; var v_left = 0; var v_p = 'absolute';
	
	if(typeof(parameter)=='object'){
		url=parameter.href;
	}else{
		url=parameter;
	}
	
	if(type=='RELATIVE'){
		var pos = Distance.get(parameter);
		Distance.set('arrow',pos);
		v_left 		= pos.left-50;		
		v_top 		= pos.top-20;
		v_p		 	= 'relative';		
	}
	
	if(typeof(width)== "undefined"){
		width=400;
	}
	
	var myModal = new Control.Modal(false, {   
      
	    contents: function(){ 
		    new Ajax.Request(url,{  
		    	onComplete: function(request){ 
					out='';
					out='<div id="dialog" style="width:'+width+'px"><div class="hd"><a href="#" onclick="parent.Control.Modal.close();return false;"><div class="c"></div></a></div><div class="bd"><div class="c"><div class="s">';
					out=out + request.responseText;
					out=out + '</div></div></div><div class="ft"><div class="c"></div></div></div>';
					myModal.update(out);
		         }.bind(this)  
			});  
			return '<img src="../pics/indicator_snake.gif" border="0" />';  
	    },
		opacity: 0,
		position: v_p,
		offsetTop: v_top,
		offsetLeft: v_left
    
	});    
    myModal.open();    
    return false;
} 
      
function updateModal(parameter, width) {
	if(typeof(parameter)=='object'){
			url=parameter.href;
	}else{
			url=parameter;
	}
	new Ajax.Request(url,{  
             onComplete: function(request){ 
				out='';
				out='<div id="dialog" style="width:'+width+'px"><div class="hd"><a href="#" onclick="parent.Control.Modal.close();return false;"><div class="c"></div></a></div><div class="bd"><div class="c"><div class="s">';
				out=out + request.responseText;
				out=out + '</div></div></div><div class="ft"><div class="c"></div></div></div>';
				parent.Control.Modal.container.update(out);
             }.bind(this)  
         });  
}

function updateModalHTML(htmlCode, width)  {
	out='';
				out='<div id="dialog" style="width:'+width+'px"><div class="hd"><a href="#" onclick="parent.Control.Modal.close();return false;"><div class="c"></div></a></div><div class="bd"><div class="c"><div class="s">';
				out=out + htmlCode;
				out=out + '</div></div></div><div class="ft"><div class="c"></div></div></div>';
	parent.Control.Modal.container.update(out);
}  