Tuesday, 2018-12-11, 10:17 AM
MaLuFeT Layouts
Main | floating image - Forum | Registration | Login
[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Forum moderator: malufet  
Forum » Tips and Tricks » Friendster Overlay Profiles » floating image
floating image
niloDate: Friday, 2008-11-07, 11:19 AM | Message # 1
Colonel general
Group: ML` Members
Messages: 15
Reputation: 4
Status: Offline
put the code bellow to your js(javascript) and change url pic!

Code
var currentTime = new Date();
var hours = currentTime.getHours();
var minutes = currentTime.getMinutes();

if (minutes < 10)
minutes = "0" + minutes;
var jamenit = (hours + ":" + minutes + " ");

if(hours > 11){
var ampm = ("PM");
} else {
var ampm = ("AM");
}

dude="<div id='divStayTopLeft' style='position:absolute;z-index:50;'><b><font color='red'>Hi..</b></font><br><div id='mainpic'></div><br><img src='url pic'><br><img src='url pic'><br><b><font color='red'>Logged in as</font> <font color='white'> "+pageViewerFName+" </font></b><br>"+
"<b><font color='red'>Last visit</font><font color='white'>: Today "+jamenit+ampm+" </font></b><br></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();

add to ur css box

Code
#mainpic img {
height: 75px;
width: 65px;
border: 2px #000000 solid;
}


 
Forum » Tips and Tricks » Friendster Overlay Profiles » floating image
  • Page 1 of 1
  • 1
Search:

Copyright MyCorp © 2018