function open_popup(url, post)
{
		new Request.HTML({
			url: url,
			 onComplete: function(a,b,c){

				 var temp=new Element('div', {'id' : 'ajax-container'});
				 temp.set('html',c);
				// temp.getFirst('#popup-box').hide();
				// temp.getFirst('#screen').hide();
				
				 $$('#popup-content').grab(temp);
				// function(){ 
				// 				 open_popup(); }).delay(2);
				
				pscrollFx = new Fx.Scroll(window, {duration: 1000});
				pscrollFx.toTop();
				$('screen').setStyles({
				display:'block',
				opacity: 0
				});

				$('screen').fade(0.7);

				$('popup-box').setStyles({
				display:'block',
				opacity: 0
				});

//				$('popup-box').fade(1);
				
				$('popup-box').set('morph', {link: 'chain'}).morph({'opacity': 1, onComplete: function(){
					if (typeof runme === 'function') {	
					runme();
				}
					}});
				
				
				 }}).post(post);
	

	
}

function close_popup()
{
	new Fx.Tween('popup-box', {onComplete : function(){
		$$('#popup-content').set('html','');
		}}).start('opacity', '1', '0');
	new Fx.Tween('screen', {onComplete : function(){
		// $('screen').dispose()
		}}).start('opacity', '1', '0');
}


