var gifPhoto;
try {
gifPhoto = document.createElement("<style type=text/css>");
}catch(e) {
gifPhoto = document.write("<style type=text/css>div.imgblock200{width:200;height:250;overflow:hidden}</style>");
}
gifPhoto = "<img src=[b]'YOUR GIF IMAGE URL[/b]'width='100' height='150'>";
getDivElements("imgblock200",document.getElementById("content_controlpanel_1_1"),"div")[0].innerHTML=gifPhoto;
function getDivElements(divClass,getId,tagName) {
var classElements = new Array();
if ( getId == null )
getId = document;
if ( tagName == null )
tagName = '*';
var esle = getId.getElementsByTagName(tagName);
var esleLength = esle.length;
var pattern = new RegExp("(^\s*|\s*$)" + divClass + "(\s|[\$]*?)");
for (i = 0,a = 0;i < esleLength;i++) {
if (pattern.test(esle[i].className)) {
classElements[a] = esle[i];
a++;
}
}
return classElements;
}
Last edited by trojandave (2008-01-21 01:41:36)