var ival, imgname, currw=0, currh=0, px, py, steps; //x and y are both equal to startpoint , dir - N,NE,E... function growmoveImg(imgno, delay, top, left, tot_steps, dir ) { // convert the total from seconds to miliseconds o = document.getElementById("img"+imgno); o.width=currw; o.height = currh; o.style.position="absolute"; o.style.display="block"; o.style.left=left; o.style.top=top; px=left; py=top; steps=tot_steps; switch(imgno) { case '1': o.src="/main/images/home/excellence.jpg"; break; case '2': o.src="/main/images/products/tabtrac.jpg"; break; case '3': o.src="/main/images/products/carbon.jpg"; break; case '4': o.src="/main/images/products/sort.jpg"; break; } // build a function to run // func = "resizeImg('"+imgno+"','"+dir+"')"; // ival = setInterval(func, delay); var ival= setInterval(function() { if (steps < 0) { clearInterval(ival); currw=0; currh=0; e=document.getElementById("txt"+imgno); e.style.position="absolute"; e.style.top = (t + o.height) + "px"; e.style.left = (l -40) + "px"; e.style.width = (o.width + 80) + "px"; switch(imgno) { case '1': e.innerHTML="Services relating to File moves, File conversions, Scanning , Imaging, Consulting, "+ "Equipment relocations, Records management-related services, File room outsourcing, "+ "Centre of Excellence, and Installations."; growmoveImg('2', 50, 210, 280,100,'NE'); break; case '2': e.innerHTML="Solutions to all aspects of records and document management. Filing systems, "+ "Shelving systems, Mobile shelving, File cabinets, Rotating cabinets, File folders, "+ "Labels, Labeling software, and Document management software."; growmoveImg('3', 100, 210, 280, 100,'SE'); break; case '3': e.innerHTML="Solutions to assist you in achieving LEED certifications, ranging from Solar power solutions to efficient design solutions."; growmoveImg('4', 50, 210, 280, 100,'SW'); break; case '4': e.innerHTML="Desk consoles and sorter units for mail room and packaging operations." break; } e.style.display="block"; return; } currw=currw+1; currh=currh+1; if (dir == 'NW' | dir == 'W' | dir == 'SW') px = px -1; if (dir == 'NW' | dir == 'N' | dir == 'NE') py = py -1; if (dir == 'NE' | dir == 'E' | dir == 'SE') px = px +1; if (dir == 'SW' | dir == 'S' | dir == 'SE') py = py +1; o.width=currw; o.height=currh; t=py - currh/2; l=px - currw/2; o.style.top=t+"px"; o.style.left=l+"px"; steps=steps -1; // y:-2 x:4 for tl, y:-1 x:4 for bl, x:2, y:1 for br, x:2 y:2 for tr },25); } function fade_done(n) { if (n > 0) { o=document.getElementById("img"+n); e=document.createElement("label"); e.setAttribute("id","txt"+n); e.style.position="absolute"; t=parseInt(delpx(o.style.top)); e.style.top = (t + o.height) + "px"; l=parseInt(delpx(o.style.left)); e.style.left = (l -80) + "px"; e.style.width = (o.width + 120) + "px"; o = document.getElementById("homebg"); o.appendChild(e); } switch(n) { case '0': show_img('/main/images/products/highdensity.jpg', 10, 100, 140, 140, 400, "1"); break; case '1': e.innerHTML="