<%
'***********************************
'Função: BBIMG (L1, MaximGhight, Maximgwidth)
Parâmetros: L1, caminho da imagem; MaximGhEight, altura máxima permitida da imagem; Maximgwidth, largura máxima permitida da imagem
'Autor: Alixi
Data: 2007/7/12
'Descrição: limite a altura e largura máxima da imagem da página
'Exemplo: <%= bbimg ("alixixi.gif", 300.100)%>
'***********************************
functionbbimg (L1, MaximGhight, Maximgwidth)
DIML2, I2: L2 = L1
seti2 = newRegexp
I2.global = true
I2.ignorecase = true
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*"& maximghight &")/this.Height; "" // this.Height; "" ///
BBIMG = L2
seti2 = nada
Função final
%>