// FUNCIONES PARA LA ASOCIACION ESPAŅOLA DE ANUNCIANTES
//
// By Pepus - 2001
// Performed by Search 2 

function scrollIt() {
  if ( Texto.active ) {
    if ( (Texto.dir == 0 && Texto.y < Texto.yinit ) || (Texto.dir == 1 && Texto.y > Texto.yfinal) ) {
      if ( Texto.dir == 0 ) {
        Texto.moveBy(null,Texto.vel);
      } else {
        Texto.moveBy(null,(Texto.vel*-1));
      }
    }
  }
}

function gotoInicio() {
  Texto.moveTo(null,Texto.yinit);
}

function gotoFin() {
  Texto.moveTo(null,Texto.yfinal);
}

function Play(direct) {
  Texto.dir = direct;
  Texto.active = true;
}

function Stop() {
  Texto.active = false;
}

function flotante(pagina,titulo,ancho,largo,xpos,ypos,scr,resize){
  var Ventana= 'toolbar=0,location=0,directories=0,scrollbars='+scr+',screenX='+xpos+',screenY='+ypos+',status=0,menubar=0,resizable='+resize+',width='+ancho+',height='+largo;
  open(pagina,titulo,Ventana);

}

function layerWrite(id,nestref,text) {
	if (is.ns4) {
		var lyr = (nestref)? eval('document.'+nestref+'.document.'+id+'.document') : document.layers[id].document
		lyr.open()
		lyr.write(text)
		lyr.close()
	}
	else if (is.ie4) document.all[id].innerHTML = text
}

function tancales(imatge) {
//   MM_showHideLayers('mnu106?3topFrame','','hide','mnu206?3topFrame','','hide','mnu206cc?3topFrame','','hide','mnu306?3topFrame','','hide','mnu307?3topFrame','','hide','mnu406?3topFrame','','hide','mnu607?3topFrame','','hide','mnu806?3topFrame','','hide','top106?3topFrame','','hide','top206?3topFrame','','hide','top206cc?3topFrame','','hide','top306?3topFrame','','hide','top307?3topFrame','','hide','top406?3topFrame','','hide','top607?3topFrame','','hide','top806?3topFrame','','hide','topacc?3topFrame','','hide','fotos?3topFrame','','show');
   MM_showHideLayers('top106?3topFrame','','hide','top206?3topFrame','','hide','top206cc?3topFrame','','hide','top306?3topFrame','','hide','top307?3topFrame','','hide','top406?3topFrame','','hide','top607?3topFrame','','hide','top806?3topFrame','','hide','topacc?3topFrame','','hide','fotos?3topFrame','','show');
   MM_changeProp('foto?3topFrame','','src',imatge,'IMG')

}
function MM_changeProp(objName,x,theProp,theValue) { //v3.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)) eval("obj."+theProp+"='"+theValue+"'");
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}


function contacta(){
   var Ventana= 'toolbar=0,location=0,directories=0,scrollbars=1,screenX=10,screenY=10,status=0,menubar=0,resizable=0,width=500,height=500'
   open('../contacta.html','contact',Ventana);
}

function contacta_from_juampa(){
   var Ventana= 'toolbar=0,location=0,directories=0,scrollbars=1,screenX=10,screenY=10,status=0,menubar=0,resizable=0,width=500,height=500'
   open('http://www.peugeot.es/contacta.html','contact',Ventana);
}

