object = new Array()
K = Math.PI / 180
N = 0
xm = 0
ym = 0
mx = 0
my = 0
ax = 0
ay = 0
nx = 168
ny = 102
function CObj(x,y,z,myl){
o = document.createElement("
")
window.document.all("HeaderWindow").appendChild(o)
this.obj = o.style
this.z = Math.round(z * ny * .25)
this.x = Math.round(x * ny * .25)
this.y = Math.round(y * ny * .15)
this.zOOm = 1
this.anim = function () {
with(this){
xP = z * Math.sin(my * K) + x * Math.cos(my * K)
zP = z * Math.cos(my * K) - x * Math.sin(my * K)
yP = y * Math.cos(mx * K) - zP * Math.sin(mx * K)
zP = y * Math.sin(mx * K) + zP * Math.cos(mx * K)
w = (zP*.25 + ny*.25 )
maxx = xP + nx * .5 - w * .5
maxy = yP + ny * .5 - w * .5
if (maxx<0) {
maxx = 0
}
if (maxx>(nx-30) ) {
maxx = nx -30
}
if (maxy<0) {
maxy = 0
}
if (maxy>(ny-30) ) {
maxy = ny -30
}
with(obj){
left = maxx
top = maxy
zIndex = Math.round(zP * 100)
}
}
}
N++
}
function run(){
dx = xm - mx
dy = ym - my
mx+= dx / 10
my+= dy / 10
for(var i=0 in object)object[i].anim()
setTimeout("run()", 16)
}
HeaderWindow.onmousemove = function (){
xm = window.event.x
ym = window.event.y
}
function zyva(){
object[0] = new CObj(-2,-2,-2,'h')
object[1] = new CObj(-1,-1,-1,'a')
object[2] = new CObj(0,0,0,'m')
object[3] = new CObj(1,1,1,'d')
object[4] = new CObj(2,2,2,'y')
run()
}