my js codes doesnt work..
can u pls check whats wrong with my codes...
[quote]//onload handler
function onProfileLoad() {
//insert generated boxes here
var code="<center><embed src=\"http://www.fancygens.com/gens/calendar/show.swf?root=http://www.fancygens.com/gens/calendar/&file=http://www.fancygens.com/gens/calendar/files/anime.xml&rand=1&trans=0&delay=6&frame=0xFF0000&effect=http://www.fancygens.com/gens/calendar/effects/effect11.swf&bgColor=0&textColor=16777215&textColorOver=16711680&textColorSelection=16711680&todayColor=16711680\" quality=\"high\" bgcolor=\"#ffffff\" width=\"245\" height=\"385\" name=\"trailer\" align=\"middle\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed><br><small><a href=\"http://www.fancygens.com/\" target=\"_blank\"></a></small></center>";
addBox(null,code,"custombox_810",/commonbox[\s]*?fanof/i);
var code="<div style='height:444px; width:300px; text-align:center; font-size:11px; color:#333333'><object id=\"JangoJukebox\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"300\" height=\"370\" style=\"undefined\"><param name=\"movie\" value=\"http://swf.jukebox.jango.com/jango.swf\" /><param name=\"bgcolor\" value=\"#ffffff\" /><param name=\"quality\" value=\"high\" /><param name=\"scale\" value=\"noscale\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"allowFullScreen\" value=\"false\" /><param name=\"wmode\" value=\"transparent\" /><param name=\"autoplay\" value=\"false\" /><param name=\"flashvars\" value=\"durl=http://json.jukebox.jango.com/1a52b86db52a796897e5698ac97ae61b.json?1208441404\" /> <embed type=\"application/x-shockwave-flash\" src=\"http://swf.jukebox.jango.com/jango.swf\" width=\"300\" height=\"370\" style=\"undefined\" id=\"JangoJukebox\" name=\"JangoJukebox\" bgcolor=\"#ffffff\" quality=\"high\" scale=\"noscale\" allowScriptAccess=\"always\" allowFullScreen=\"false\" wmode=\"transparent\" autoplay=\"false\" flashvars=\"durl=http://json.jukebox.jango.com/1a52b86db52a796897e5698ac97ae61b.json?1208441404\"></embed></object><div style='height:55px; margin-top:2px 0px; padding: 0x 5px; color: #003399'><span style='float:left' ><a href='http://create.jukebox.jango.com/?source=jukebox' style='text-decoration:none;color: #003399' target='_blank'><img alt=\"free music online\" height=\"55\" src=\"http://cd02.static.jango.com/images/jango_jukebox_get_btn_144x55.jpg\" style=\"border:0\" title=\"Get your own Jango Jukebox!\" width=\"144\" /></a></span><span style='float:right'><a href='http://html.jukebox.jango.com/1a52b86db52a796897e5698ac97ae61b.html' style='text-decoration:none;color: #003399' target='_blank'><img alt=\"internet radio songs\" height=\"55\" src=\"http://cd02.static.jango.com/images/jango_jukebox_pop_btn_144x55.jpg\" style=\"border:0\" title=\"Pop Out This Jukebox\" width=\"144\" /></a></span></div><a href='http://www.jango.com' style='text-decoration:none;color: #003399' target='_blank'></a></div>";
addBox(null,code,"custombox_841",/commonbox[\s]*?fanof/i);
var code="<embed src=\"http://www.fancygens.com/gens/bannermaker/show.swf?baseURL=http://www.fancygens.com/gens/bannermaker/&clickURL=http://www.fancygens.com/&clickLABEL=fancygens.com&flashLABEL=undefined&url=http://www.fancygens.com/&txt=im%20coming%20back%2C%20but%20not%20that%20early&card=http://www.fancygens.com/gens/bannermaker//banner_images/photo/15.jpg&tc=16711680&sc=0&font=http://www.fancygens.com/gens/bannermaker/fonts/plainn_lib18.swf&tr=0&ts=100&tx=0&ty=0&glitter=0&rounded=0&bevel=0&sepia=0&theme=http://www.fancygens.com/gens/bannermaker/themes/matrix.swf&theme_al=100\" quality=\"high\" bgcolor=\"#ffffff\" width=\"468\" height=\"60\" name=\"show\" align=\"middle\" allowScriptAccess=\"always\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed><br><small><a href=\"http://www.fancygens.com/\" target=\"_blank\"><a/></small></center>";
addBox(null,code,"custombox_8",/commonbox[\s]*?photos/i);
var code="<object width=\"300\" height=\"80\"><param name=\"movie\" value=\"http://media.imeem.com/m/1WbRXEd11s\"></param><param name=\"wmode\" value=\"transparent\"></param><embed src=\"http://media.imeem.com/m/1WbRXEd11s\" type=\"application/x-shockwave-flash\" width=\"300\" height=\"110\" wmode=\"transparent\"></embed></object>";
addBox(null,code,"custombox_56",/commonbox[\s]*?photos/i);
var header="Navigation";
var code="<div id=\"form1\" align=\"center\"><br><select onchange=\"jumpMenu('parent',this,0);\" style=\"width: 75%; font-family:'Courier New'; color:#000000; background-color:#ffffff; font-size:10pt;\"><option value= \"onclick=\"return false;\">NAVIGATION</option><option value=\"http://www.friendster.com\">Home</option><option value=\"http://profiles.friendster.com/user.php\">My Profile</option><option value=\"http://www.friendster.com/editprofile.php\">-- Edit Profile</option><option value=\"http://www.friendster.com/viewphotos.php\">-- Photos</option><option value=\"http://www.friendster.com/review.php\">-- Reviews</option><option value=\"http://www.friendster.com/blogs.php\">-- Blogs</option><option value=\"http://www.friendster.com/featuredfriends.php\">-- Featured Friends</option><option value=\"http://www.friendster.com/video.php\">-- Video</option><option value=\"http://www.friendster.com/bulletinboard.php\">-- Bulletin Board</option><option value=\"http://www.friendster.com/friends.php\">My Connections</option><option value=\"http://www.friendster.com/editcollege.php?A=s\">-- Schools</option><option value=\"http://www.friendster.com/friends.php?action=spusers\">-- I'm a Fan of...</option><option value=\"http://www.friendster.com/bookmarks.php\">-- Bookmarks</option><option value=\"http://www.friendster.com/group/mygroup.php\">-- Groups</option><option value=\"http://www.friendster.com/explore.php\">Explore</option><option value=\"http://www.friendster.com/userlist.php?list=newusers\">-- People</option><option value=\"http://www.friendster.com/photolist.php?list=mostrecent\">-- Photos</option><option value=\"http://www.friendster.com/video.php\">-- Video</option><option value=\"http://www.friendster.com/userlist.php?list=feat_profile\\\">-- Featured Fan Profiles</option><option value=\\\"http://www.friendster.com/widgetdirectory.php\\\">-- Widget Directory</option></select><br><br></div>";
addBox(header,code,"custombox_366",/commonbox[\s]*?friends/i);
var code="<div align=\"center\"><embed wmode=\"transparent\" allowscriptaccess=\"never\"pluginspage=\"http://www.macromedia.com/go/getflashplayer\" src=\"http://www.fancygens.com/gens/fancyclocks/clock14.swf\" width=\"200\" height=\"50\" type=\"application/x-shockwave-flash\" quality=\"high\"></embed><br><small><a href=\"http://www.fancygens.com/\"></a></small></div>";
addBox(null,code,"custombox_861",/commonbox[\s]*?friends/i);
}
if (!attachOnLoadHandler(function(){onProfileLoad()})) window.onload = function(){onProfileLoad()};
function addBox(head,code,id,siblingafter) {
/*
head:
html string title
null - no header bar
code:
html string content
id:
unique string css pointer
siblingafter:
regexp classname
'left' - mainbar column end
'right' - sidebar column end
*/
try {
var li=document.createElement("li");
} catch(e) {
var li=document.createElement("<li>");
}
if(!head) head="";
else head="<h2>"+head+"</h2>";
li.innerHTML="<div id=\""+id+"\" class=\"commonbox "+id+"\">"+
head+
"<div id=\"content_"+id+"\">"+
code+
"</div>"+
"</div>";
if(siblingafter=="left") getElementsByClass(/commonbox[\s]*?controlpanel/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else if(siblingafter=="right") getElementsByClass(/commonbox[\s]*?friends/i,null,"DIV")[0].parentNode.parentNode.appendChild(li);
else {
var si=getElementsByClass(siblingafter,null,"DIV")[0];
si.parentNode.parentNode.insertBefore(li,si.parentNode);
}
}
function getElementsByClass(searchClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp(searchClass);
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}
document.getElementById("0").getElementsByTagName("ul")[1].innerHTML+="My YM Status:<br><a href=\"ymsgr:sendim?eng_anthony07\"><img src=\"http://opi.yahoo.com/online?u=eng_anthony07&m=g&t=2\" border=\"0\"></a><br><br>";
function subnav() {
var x; var t;
x = document.getElementById("cpShoutoutBox").parentNode;
t = document.getElementById("subnav");
x.appendChild(t);
}
setTimeout("subnav()",2000);
var penyuberenang;
try {penyuberenang = document.createElement("div");}
catch (e) {penyuberenang = document.createElement("<div>");}
penyuberenang.innerHTML = '<center><a href="http://www.histats.com" alt="frontpage hit counter"><embed src="http://s10.histats.com/422.swf" flashvars="jver=1&acsid=264695&domi=4&cpagid=0" quality="high" width="112" height="75" name="422.swf" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" /></a><br><a href=http://www.glitter-graphics.com><img src=http://dl9.glitter-graphics.net/pub/14/14669g62rgkgooz.gif width=130 height=87 border=0></br></a></center>';
penyuberenang.setAttribute("style","text-align:center;padding-top:10px");
document.getElementById("controlPanelButtons").parentNode.appendChild(penyuberenang);
dude="<div id='divStayTopLeft' style='position:absolute;z-index:50;'><font color=red font size=2><img src=http://dl9.glitter-graphics.net/pub/830/830089ew0r4hg5kr.gif width=100 height=100 border=0></a></div>";
flow=document.getElementById('flo_wrapper');
river=document.createElement("div");
river.innerHTML=dude;
flow.parentNode.insertBefore(river,flow);
//in this part you can change it into "frombottom" or "fromtop"
var verticalpos="frombottom"
function BoyantDiv()
{
var startX = 15;
var startY = 170;
function ml(id)
{
if (document.getElementById)
{
var wek=document.getElementById(id);
}
else if (document.all)
{
var wek=document.all[id];
}
else
{
var wek=document.layers[id];
}
if(document.layers)
{
wek.style=wek;
}
wek.sP = function(x,y) {shino(x,y);};
function shino(x,y)
{
wek.style.left=x;
wek.style.top=y;
}
wek.x = startX;
if (verticalpos=="fromtop")
{
wek.y = startY;
}
else{
if (navigator.appName.indexOf("Netscape") != -1)
{
wek.y = pageYOffset + innerHeight;
}
else
{
wek.y = document.body.scrollTop + document.body.clientHeight;
}
wek.y -= startY;
}
return wek;
}
window.stayTopLeft = function () {boyant();};
function boyant()
{
if (verticalpos=="fromtop"){
if (navigator.appName.indexOf("Netscape") != -1)
{
var tenten = pageYOffset;
}
else
{
var tenten = document.body.scrollTop;
}
ftlObj.y += (tenten + startY - ftlObj.y)/8;
}
else{
if (navigator.appName.indexOf("Netscape") != -1)
{
var tenten = pageYOffset + innerHeight;
}
else
{
var tenten = document.body.scrollTop + document.body.clientHeight;
}
ftlObj.y += (tenten - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
wakoko=setTimeout("stayTopLeft()", 50);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
BoyantDiv();
var fcontent=new Array();
begintag='<div style="font: #ff3300 normal 20px papyrus; padding: 1px;">';
fcontent[0]="I'm Always Here For You";
closetag='</div>';
//No need to edit below this line//
var delay = 1000;
var maxsteps=20;
var stepdelay=20;
var startcolor= new Array(255,255,255);
var endcolor=new Array(0,0,0);
var fwidth='150px';
var fheight='300px';
var fadelinks=1;
var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("cpShoutoutBox").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
document.getElementById("cpShoutoutBox").innerHTML=begintag+fcontent[index]+closetag
if (fadelinks)
linkcolorchange(1);
colorfade(1, 15);
}
else if (ie4)
document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
index++
}
function linkcolorchange(step){
var obj=document.getElementById("cpShoutoutBox");
if (obj.length>0){
for (i=0;i<obj.length;i++)
obj[i].style.color=getstepcolor(step);
}
}
var fadecounter;
function colorfade(step) {
if(step<=maxsteps) {
document.getElementById("cpShoutoutBox").style.color=getstepcolor(step);
if (fadelinks)
linkcolorchange(step);
step++;
fadecounter=setTimeout("colorfade("+step+")",stepdelay);
}else{
clearTimeout(fadecounter);
document.getElementById("cpShoutoutBox").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
setTimeout("changecontent()", delay);
}
}
function getstepcolor(step) {
var diff
var newcolor=new Array(3);
for(var i=0;i<3;i++) {
diff = (startcolor[i]-endcolor[i]);
if(diff > 0) {
newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
} else {
newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
}
}
return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}
if (ie4||DOM2)
document.write('<div id="cpShoutoutBox" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></div>');
if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent
//by marfillaster
if (!attachOnLoadHandler(function(){bryan()})) parent.onload = function(){bryan()};
//load script
function attachOnLoadHandler(func)
{
if(parent.attachEvent)
{
//win 5.0-6.0
parent.attachEvent('onload',func);
return true;
}
if(parent.addEventListener)
{
//moz,opera & safari
parent.addEventListener('load',func,false);
return true;
}
return false;
}[/quote]
i really need ur help guys..