var ajx1=new ajax(true); function cllbckdialogo(){} function mostrarimagen(idtipoarchivo,maxx,maxy,p){ dialogo_abrir(maxx+70,maxy+75,'http://www.neopromociones.com/net/imagenif.asp','idusuario='+user_id+'&id=' + idtipoarchivo + '&p=' + p,cllbckdialogo); } function allimgs(d,t,p){ ajx1.cargar('http://www.neopromociones.com/net/aj_allimgs.asp?d='+d+'&t='+t+'&p='+p,cllbckimgs); } function cllbckimgs(ajx,status){ var a,img,cv,t,n,d,i; if(status==200 && ajx.result()>0){ t=ajx.result(); ajx.preg(); ocultarelemento('mi'+t); ci=document.getElementById('ci'+t); i=5; do{ i=i+1; n=ajx.valor('nombre'); d=ajx.valor('descripcion'); a=document.createElement('A'); a.href='#'; a.title=d; a.id=n.replace('.',''); a.style.display='none'; a.onclick=new Function('event','mostrarimagen('+ajx.valor('idtipoarchivo')+','+ajx.valor('maxx')+','+ajx.valor('maxy')+','+i+');return false;'); img=document.createElement('IMG'); img.className='miniatura'; img.alt=d; img.src='http://www.neopromociones.com/userdata/'+user_id+'/'+n; a.appendChild(img); ci.appendChild(a); $('#'+a.id).fadeIn('slow'); }while(ajx.sreg()!=null); ocultarmensaje(); } else mostrarmensaje('error'); } function allvids(d,p){ ajx1.cargar('http://www.neopromociones.com/net/aj_allvids.asp?d='+d+'&p='+p,cllbckvids); } function cllbckvids(ajx,status){ var cv,cont,ytt,yti; if(status==200 && ajx.result()>0){ cv=document.getElementById('cv'); ocultarelemento('mv'); cont=cv.innerHTML; ajx.preg(); do{ ytt=ajx.valor('yttitle'); yti=ajx.valor('ytid'); cont=cont+'
'; }while(ajx.sreg()!=null); cv.innerHTML=cont; document.getElementById('mv').style.display='none'; ocultarmensaje(); } else mostrarmensaje('error'); } function posicionar(){ var re=/#([A-Z0-9]+)/gi; var temp,id; temp=re.exec(window.location); if(temp){ switch(temp[1]){ case 'info': id='a1'; break; case 'videos': id='a200'; break; case 'noticias': id='a500'; break; case 'peticiones': case 'ofertas': id='a600'; break; case 'fotos': case 'rider': case 'dossier': case 'documentos': id='a700'; break; case 'catalogo': case 'productos': case 'roster': id='a400'; break; case 'eventos': case 'estadillo': case 'cuadrante': id='a300'; break; } temp=document.getElementById(id); if(temp) $('html, body').animate({scrollTop:$('#'+id).offset().top},1500); } }