function nextSibling (o) {
var nextSibling;
if (navigator.userAgent.indexOf('MS') != -1) {
nextSibling = o.nextSibling;
} else {
nextSibling = o.nextSibling.nextSibling;
}
return nextSibling;
}
function makeFakeLinks (o,imgPath) {
var headigns = $(o);
if (!imgPath) {
imgPath = "";
}
for (i=0; i < headigns.length; i++) {
if (!/no_collapse/.test(headigns[i].className)) {
var toggleObject;
var objImage = document.createElement("img");
objImage.setAttribute('src',imgPath+'http://www.yellowdisclosure.com/resources/img/trigger.gif');
headigns[i].appendChild(objImage);
objImage.setAttribute('class','fakeLink');
objImage.className = "fakeLink";
objImage.onclick = function () {
if (navigator.userAgent.indexOf('MS') != -1) {
toggleObject = this.parentNode.nextSibling;
} else {
toggleObject = this.parentNode.nextSibling.nextSibling;
}
$(toggleObject).slideToggle("normal",setCapsules);
}
}
}
}
function setCapsules() {
string ='&'+this.id+'='+this.style.display ;
request('set_capsules.php',string,false,donothing);
}
function swfWrite(data,width,height) {
var body = "" ;
body += '' ;
document.write(body) ;
}
function wordWrap(){
/******
* wordWrap to firefox for big words
* Creative Commons license * Version: 1.0 - 26/04/2006
* Autor: Micox - Náiron J.C.G - micoxjcg@yahoo.com.br - http://elmicoxcodes.blogspot.com
* Uso: call the function on onload of body element.
* put the class "descrip" on elements to wordwrap
*******/
var larg_total,larg_carac,quant_quebra,pos_quebra;
var elementos,quem, caracs, texto, display_orig;
elementos = document.getElementsByTagName("div")
for(var i=0; ilarg_oficial){
quant_quebra = parseInt(larg_oficial/larg_carac)
quant_quebra = quant_quebra - (parseInt(quant_quebra/6)) //quanto menor o num, maior a garantia;
quem.innerHTML = ""
while(pos_quebra<=caracs){
quem.innerHTML = quem.innerHTML + texto.substring(pos_quebra,pos_quebra + quant_quebra) + " "
pos_quebra = pos_quebra + quant_quebra;
}
}else{
quem.innerHTML = texto;
}//end if do larg_total>larg_oficial
quem.style.display = display_orig;
}//end if do word wrap
}//end for loop dos elementos
}