//javascript:
// -----------------------------------------------------------------------
// 2004 Código creado por: 
// 
// Modificaciones: Manuel de la Herrán Gascón 
// -----------------------------------------------------------------------

	function menu(){
				op = window.parent.almacena("pide");
				//alert(op);
				document.menufla.setVariable("op","00"+op);
		}


function abrirVentana2(nombreVentana, url,img,width, height) {
  // Ejemplos de uso:
  // En href javascript:abrirVentana('medialab_v','http://www.dng81.com/', '560', '430');
	//v=window.open (url,'ventana_'+nombreVentana,'toolbar=no,location=no,directories=no,menubar=no,scrollbars=auto,status=no,resizable=no,width='+width+',height='+height);
	//v=window.open (url,'ventana_'+nombreVentana,'toolbar=no,location=no,directories=no,menubar=no,scrollbars=auto,status=no,resizable=no,width='+width+',height='+height);

}
function cargada(){
		v.resizeTo(foto.width+30,foto.height+55);
		}
var ancho=screen.availWidth;
var alto=screen.availHeight;
var foto;
var v;
function abrirVentana(nombreVentana,url,width, height){
		foto= new Image();
		foto.src=url;
		foto.onload=cargada;
		w=foto.width+20;
		h=foto.height+25;
		v=window.open (url,'ventana_'+nombreVentana,'toolbar=no,location=no,directories=no,menubar=no,scrollbars=auto,status=no,resizable=no,width='+w+',height='+h);
		v.moveTo(parseInt((ancho/2)-(w/2)),parseInt((alto/2)-(h/2)));
		v.document.write("<head><title>medialabmadrid -</title></head><body onload='redi()'><img src='"+url+"'></body>");
		
}
function f_imgs(img){
	document.getElementById('imgs').src =""+img;
	}
// -----------------------------------------------------------------------
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
// -----------------------------------------------------------------------
function envia(){
	if (document.form1.correu.value != "" && document.form1.correu.value != undefined && document.form1.correu.value != null && document.form1.correu.value != "e-mail" ){
	toSend = false;
	for (i=0;i<=document.form1.correu.value.length;i++){
		if(document.form1.correu.value.charAt(i)=="@"){
			toSend = true
			break
		}	
	}
	if(toSend){
		document.form1.submit();
	}else{
		document.form1.correu.value = "e-mail error";
		ust = false;
	}
	}else{
		document.form1.correu.value = "e-mail error";
		ust = false;
		//document.location = "error.htm"
	}

}
ust = false;
// -----------------------------------------------------------------------
function duc(){
	if (ust == false){
		document.form1.correu.value=''
		ust = true
	}
}
rutaBase = "img_articulos/";
// -----------------------------------------------------------------------
function cambiaFoto(ob, nom){
	document["im"+ob].src = rutaBase+nom;
}
// -----------------------------------------------------------------------
//gsus functions..............
function vacia(caja){
	eval(caja).value="";
}
