function showHide(id){var a=$('d_'+id);if(a.style.display=='none')new Ajax.Request(ajax_base,{parameters:{ajax:'menu',type:id.substr(0,1),id:id.substr(4)},onSuccess:function(res){a.update(res.responseText);Effect.BlindDown(a,{duration:0.5})}});else Effect.BlindUp(a,{duration:0.1})}
function getFoto(url,w,h){var a=$$('img.t')
var url=url.substring(url.indexOf('/')+1)
for(var x=0;x<a.length;x++)if(a[x].src.indexOf(url)>0)myId=a[x];if($('pop'+url)){Effect.ScrollTo('pop'+url);Effect.Pulsate('pop'+url,{pulses:2,duration:0.5});return;}
var b=new Element('div',{classname:'popups',id:'pop'+url});g=(myId.up().up())
f=myId;hSpace=20;l=(document.viewport.getWidth()-w)/2-(Math.random()*100)
lb=(document.viewport.getHeight()-x)/2+(Math.random()*100)
b.setStyle('position:absolute;top:'+f.cumulativeOffset()[1]+'px;left:'+f.cumulativeOffset()[0]+'px;width:'+(f.getWidth())+'px;height:'+(f.getHeight())+'px;background:#fff;border:2px solid #333')
b.innerHTML='<p class="popHead" style="height:45px;background:#fff url(\'supp/cristianipp300.jpg\') top right no-repeat"><a onClick=closeThis(\'pop'+url+'\')><img style="margin-left:10px" src="supp/close.png"></a></p><p class=popImage style="margin:0 10px;position:overflow:hidden;text-align:center"><img style="width:100%" src="pail/'+url+'" /></p>';$('container').insert(b)
new Draggable(b)
b.morph('left:'+l+'px;top:'+(f.cumulativeOffset()[1]-Math.random()*100)+'px;width:'+(w+hSpace)+'px;height:'+(h+100)+'px')}
function px(a){return a+'px';}
function closeThis(e){Effect.Fade($(e),{afterFinish:function(){$(e).remove();}})}
