<%
'**********************************
'Función: BBIMG (L1, Maximgheight, MaximgWidth)
'Parámetros: L1, ruta de imagen; Maximgheight, altura de imagen máxima permitida; maximgwidth, ancho de imagen máximo permitido
'Autor: Alixi
'Fecha: 2007/7/12
'Descripción: limite la altura y el ancho máximos de la imagen de la página
'Ejemplo: <%= bbimg ("alixixi.gif", 300,100)%>
'**********************************
functionBbimg (L1, Maximgheight, MaximgWidth)
diml2, i2: l2 = l1
seti2 = newregexp
I2.global = verdadero
I2.ignorecase = verdadero
I2.pattern = "<img. [^>]*(Src =" ". [^>]+?"). [^>]*> "
l2 = i2.replace (l2, "<img $ 1onload =" "javaScript: if (this.width>" & maximgwidth & ") this.style.width =" & maximgwidth & "; if (( this.height> "& maximgheight &") this.style.width = (this.width*"& maximgheight &")/this.height; "" // this.height; "" //> ")
bbimg = L2
seti2 = nada
Función final
%>