all
liatin deh fs gw
[url]http://profiles.friendster.com/user.php?uid=48097221[/url]
kok min-max padenya ga jalan(yg cp)??
bener bukan kodenya sperti yg di bawah?
[spoiler]/**
* Min/Max Fade Box v1.1
* Copyright (c) FeRuZZ <http://profiles.friendster.com/feruzz>
* Support:
http://tempek.net78.net
* Updates: August 26, 2008
**/
/*global MinMax, window, event, document*/
(function () {
MinMax = {
$fx: null,
$box: null,
$fader: 1000.0,
$ie: /*@cc_on!@*/false,
ownername: document.getElementById("controlpanel_header").innerHTML.replace(/(<a[\S\s]*?><\/a>)/g, ""),
image: {
"MinMaxbox": ["http://i94.photobucket.com/albums/l116/feruzz/show.png",
"http://i94.photobucket.com/albums/l116/feruzz/hide.png"]
},
addEvent: function (obj, type, fn) {
if (typeof obj === "string") {
obj = MinMax.$(obj);
}
if (!obj) {
return;
}
if (obj.addEventListener) {
obj.addEventListener(type, fn, false);
} else if (obj.attachEvent) {
obj["e" + type + fn] = fn;
obj[type + fn] = function () {
obj["e" + type + fn](window.event);
};
obj.attachEvent("on" + type, obj[type + fn]);
} else {
obj["on" + type] = obj["e" + type + fn];
}
},
toggleHide: function (obj) {
var el = MinMax.$(obj);
MinMax.setStyles(el, {
display: "none"
});
return el;
},
init: function () {
var cb = ["0", "1", "13", "12", "6", "18", "10", "14", "2", "7", "8"], x, k, val;
if (![].push) {
Array.prototype.push = function () {
for (k in arguments) {
if (Object.hasOwnProperty.call(arguments, k)) {
this[this.length] = arguments[k];
}
}
return this.length;
};
}
try {
for (x in cb) {
if (Object.hasOwnProperty.call(cb, x)) {
MinMax.toggleHide("content_" + cb[x]);
//transparency for IE
MinMax.$box = MinMax.$("content_" + cb[x]);
MinMax.setStyles(MinMax.$box, {
width: "100%",
height: "100%"
});
}
}
} catch (e) {}
for (val in MinMax.image) {
if (Object.hasOwnProperty.call(MinMax.image, val)) {
try {
//Controlpanel
MinMax.$fx = MinMax.elmsByClass("commonbox controlpanel")[0].getElementsByTagName("h1")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_0','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Controlpanel\"></a></div>" + MinMax.ownername);
} catch (Controlpanel) {}
try {
//Photos
MinMax.$fx = MinMax.elmsByClass("commonbox photos")[0].getElementsByTagName("h2")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_1','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Photos\"></a></div>" + MinMax.ownername + "'s Photo Gallery");
} catch (Photos) {}
try {
//Blogs
MinMax.$fx = MinMax.elmsByClass("commonbox blogs")[0].getElementsByTagName("h2")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_13','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Blogs\"></a></div>" + MinMax.ownername + "'s Blogs");
} catch (Blogs) {}
try {
//Reviews
MinMax.$fx = MinMax.elmsByClass("commonbox reviews")[0].getElementsByTagName("h2")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_12','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Reviews\"></a></div>" + MinMax.ownername + "'s Reviews");
} catch (Reviews) {}
try {
//Moreabout
MinMax.$fx = MinMax.elmsByClass("commonbox moreabout")[0].getElementsByTagName("h2")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_6','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Moreabout\"></a></div>More About " + MinMax.ownername);
} catch (Moreabout) {}
try {
//Publiccomments
MinMax.$fx = MinMax.elmsByClass("commonbox publiccomments")[0].getElementsByTagName("h2")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_18','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Publiccomments\"></a></div>Testimonials and Comments for " + MinMax.ownername);
} catch (Publiccomments) {}
try {
//Media Box
MinMax.$fx = MinMax.elmsByClass("commonbox scrapbook")[0].getElementsByTagName("h2")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_10','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Media Box\"></a></div>" + MinMax.ownername + "'s Media Box");
} catch (Media) {}
try {
//Friends
MinMax.$fx = MinMax.elmsByClass("commonbox friends")[0].getElementsByTagName("h2")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_2','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Friends\"></a></div>" + MinMax.ownername + "'s Friends");
} catch (Friends) {}
try {
//Fan of
MinMax.$fx = MinMax.elmsByClass("commonbox fanof")[0].getElementsByTagName("h2")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_7','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Fan of\"></a></div>" + MinMax.ownername + "'s a Fan Of...");
} catch (Fan) {}
try {
//Groups
MinMax.$fx = MinMax.elmsByClass("commonbox groups")[0].getElementsByTagName("h2")[0];
MinMax.$fx = MinMax.replaceHtml(MinMax.$fx, "<div style=\"float:right;padding:4px 11px;\" class=\"" + val + "\">" +
"<a href=\"#null\" onclick=\"MinMax.boxFX(this,'content_8','" + MinMax.image[val][0] + "','" + MinMax.image[val][1] + "');\">" +
"<img src=\"" + MinMax.image[val][0] + "\" title=\"Groups\"></a></div>" + MinMax.ownername + "'s Groups");
} catch (Groups) {}
}
}
MinMax.$fx = null;
MinMax.$box = null;
},
$: function (e) {
var n;
if (e && document && typeof e === "string") {
n = e;
e = document.getElementById(e);
if (e && e.id !== n) {
return document.getElementsByName(n)[1];
}
}
return e;
},
replaceHtml: function (el, html) {
var oe = typeof el === "string" ? MinMax.$(el) : el, ne;
/*@cc_on
@if (@_win32 || @_win64)
oe.innerHTML = html;
return oe;
@end
@*/
ne = oe.cloneNode(false);
ne.innerHTML = html;
oe.parentNode.replaceChild(ne, oe);
return ne;
},
setStyles: function (el, styles) {
for (var x in styles) {
if (Object.hasOwnProperty.call(styles, x)) {
try {
if (MinMax.$ie && x === "opacity") {
if (styles[x] > 0.99) {
el.style.removeAttribute("filter");
} else {
el.style.filter = "alpha(opacity=" + (styles[x] * 100) + ")";
}
} else {
el.style[x] = styles[x];
}
} catch (e) {}
}
}
},
boxFX: function (se, eid, fm, sm) {
var elem = MinMax.$(eid), ts = new Date(),
im = se.getElementsByTagName("img")[0];
im.src = im.src.match(fm) ? sm : fm;
if (!elem) {
return;
}
if (!elem.Tempek) {
if (!elem.style.opacity || elem.style.opacity === "" || elem.style.opacity === "1") {
elem.Tempek = -2;
} else {
elem.Tempek = 2;
}
}
if (elem.Tempek !== 1 || elem.Tempek === -1) {
elem.Tempek = elem.Tempek === 2 ? -1 : 1;
elem.Maut = MinMax.$fader;
window.setTimeout(function () {
MinMax.animFade((ts).getTime(), eid);
}, 33);
} else {
elem.Tempek = elem.Tempek === 1 ? -1 : 1;
elem.Maut = MinMax.$fader - elem.Maut;
}
if (elem.style.display !== "none") {
window.setTimeout(function () {
MinMax.setStyles(MinMax.$(eid), {
display: "none"
});
}, MinMax.$fader);
} else {
window.setTimeout(function () {
MinMax.setStyles(MinMax.$(eid), {
display: ""
});
}, 33);
}
},
animFade: function (lt, eid) {
var ts = new Date(), ct = (ts).getTime(),
et = ct - lt, no,
elem = MinMax.$(eid);
if (elem.Maut <= et) {
MinMax.setStyles(elem, {
opacity: elem.Tempek === 1 ? "1": "0"
});
MinMax.setStyles(elem, {
opacity: "alpha(opacity = " + (elem.Tempek === 1 ? "100": "0") + ")"
});
elem.Tempek = elem.Tempek === 1 ? 2 : -2;
return;
}
elem.Maut -= et;
no = elem.Maut / MinMax.$fader;
if (elem.Tempek === 1) {
no = 1 - no;
}
MinMax.setStyles(elem, {
opacity: no
});
MinMax.setStyles(elem, {
filter: "alpha(opacity = " + (no * 100) + ")"
});
window.setTimeout(function () {
MinMax.animFade((ts).getTime(), eid);
}, 33);
},
elmsByClass: function (sc, st, oce) {
st = st || "*";
oce = oce || document;
var oc = oce.getElementsByTagName(st), arr = [], dl, ac, aoc, c, i, j, k, l, m, n;
if (!oc.length && st === "*" && oce.all) {
oc = oce.all;
}
dl = sc.indexOf("|") !== -1 ? "|": " ";
ac = sc.split(dl);
for (i = 0, j = oc.length; i < j; i += 1) {
aoc = oc[i].className.split(" ");
if (dl === " " && ac.length > aoc.length) {
continue;
}
c = 0;
cl:
for (k in aoc) {
if (Object.hasOwnProperty.call(aoc, k)) {
for (m in ac) {
if (Object.hasOwnProperty.call(ac, m)) {
if (ac[m] === aoc[k]) {
c += 1;
}
if ((dl === "|" && c === 1) || (dl === " " && c === ac.length)) {
arr.push(oc[i]);
break cl;
}
}
}
}
}
}
return arr;
}
};
})();
MinMax.addEvent(window, "load", MinMax.init);
//--------------------------[/spoiler]
atau ada kesalahan di kode cpnya?
help yahh