			var width,height;
			var detail_form_visible  = false;
			var origin_x = 0;
			var origin_y = 0;
			
			function showDetailForm( form_width, form_heigth){
				if($('detail_form').descendants().size()>0){
				//alert($('detail_form').descendants().size());
					// $('detail_form').descendants().each(function(s) {
					// 				  s.remove();
					// 				});
					$('detail_form').innerHTML='';	
				}

				detail_form_visible = true;

				updateWindowDimensions();

				form_margin = 200;
				if( !form_width ) form_width =  700;//.5*width;
				if( !form_heigth ) form_heigth = 600;//.8*height;
				
				origin_x = 0;//Event.pointerX(e);
				origin_y = 0;//Event.pointerY(e);

				$('detail_form').setStyle({left: origin_x + 'px', top: origin_y + 'px', height:'0px', width:'0px'});
				new Effect.Appear('detail_form', { duration: 0.3 });
				
				
				offsets = document.viewport.getScrollOffsets();
				
				
				new Effect.Morph('detail_form',{  duration: 0.3, style:{ left: ((width+form_width)/2)-form_width + 'px', width:form_width+'px',  height:form_heigth+'px', top: ((height+form_heigth)/2)-form_heigth + offsets[1] + 'px' } } );

			}
			
			
			function hideDetailForm(  ){

				
				new Effect.Morph('detail_form',{  duration: 0.3, style:{left:origin_x + 'px', top:origin_y+'px', height:'0px', width:'0px'} } );		
				
				new Effect.Fade('detail_form', { duration: 0.3 });


				detail_form_visible  = false;
			
			}	
			
		


			function updateWindowDimensions(){

				if (self.innerHeight) // all except Explorer
				{
					width = self.innerWidth;
					height = self.innerHeight;
				}
				else if (document.documentElement && document.documentElement.clientHeight) // Explorer 6 Strict Mode
				{
					width = document.documentElement.clientWidth;
					height = document.documentElement.clientHeight;
				}
				else if (document.body) // other Explorers
				{
					width = document.body.clientWidth;
					height = document.body.clientHeight;
				}


			}
			
