// JavaScript Document
var VTelem = new Array();
var VTheight = new Array();
var index = 0;
function clip() {
  for (var i=0; i<index; i++) {
   	var id1 = document.getElementById(VTelem[i]);
   	var height = id1.offsetHeight;
   	id1.style.top = parseInt(id1.style.top)-1 + 'px';
   	if(parseFloat(id1.style.top) == -(height)) id1.style.top = VTheight[i];
  }
setTimeout(clip,50)
}

function VClipText(id,height,position) {
   if (index == 0)
     addLoadEvent(function() { clip(); });

   var ct = document.getElementById(id);
   ct.style.position = position;
   ct.style.overflow = 'hidden';
   ct.style.top = height + 15 + 'px';
   ct.style.left = '0px';
   var parent = ct.parentNode;
   parent.style.position = 'relative';
   parent.style.overflow = 'hidden';
   parent.style.height = height + 'px';

   VTelem[index] = id;
   VTheight[index++] = ct.style.top;
}

var HTelem = new Array();
var HTwidth = new Array();
var Hindex = 0;

function Hclip() {
  for (var i=0; i<Hindex; i++) {
   	var id1 = document.getElementById(HTelem[i]);
   	var width = id1.offsetWidth;
   	id1.style.left = parseInt(id1.style.left)-1 + 'px';
   	if(parseFloat(id1.style.left) == -(width)) id1.style.left = HTwidth[i];
  }
setTimeout(Hclip,50)
}
function HClipText(id,width,position) {
   if (index == 0)
     addLoadEvent(function() { Hclip(); });

   var ct = document.getElementById(id);
   ct.style.position = position;
   ct.style.overflow = 'hidden';
   ct.style.top = '0px';
   ct.style.left = width + 15 + 'px';
   var parent = ct.parentNode;
   parent.style.position = 'relative';
   parent.style.overflow = 'hidden';
   parent.style.width = width + 'px';

   HTelem[Hindex] = id;
   HTwidth[Hindex++] = ct.style.left;
}

