
// **** Functional Code(3.65K) - NO NEED to Change

function zxcImageExpandMenu(o){
 var tl=o.TopLeft||[0,0];
 var op=o.Opacity||[100,100];
 this.obj=document.getElementById(o.ID);
 this.pobj=this.obj.parentNode;
 this.data=o.Mode.charAt(0).toUpperCase()=='V'?['top','left','height','width',1]:['left','top','width','height',0];
 this.data=this.data.concat([o.MouseDistance||100,((o.Expansion||200)/100)-1,tl[0],tl[1]-tl[0],op[0],op[1]-op[0]]);
 var clds=this.obj.getElementsByTagName('IMG');
 this.ary=[];
 for (var z0=0;z0<clds.length;z0++){
  this.ary.push([clds[z0],this.data[0]=='left'?clds[z0].offsetWidth:clds[z0].offsetHeight,this.data[0]=='left'?clds[z0].offsetHeight:clds[z0].offsetWidth]);
 }
 this.spc=o.Separation||0;
 this.Reset();
 this.obj.style.visibility='visible';
 this.addevt(this.pobj,'mousemove','Expand');
 this.addevt(this.pobj,'mouseout','MseOut');
 return this;
}

zxcImageExpandMenu.prototype={
 Expand:function(e){
  var mse=this.mse(e)[this.data[4]]-this.pos(this.obj)[this.data[4]];
  for (var obj,c,p,exp,lft=0,z0=0;z0<this.ary.length;z0++){
   obj=this.ary[z0][0];
   c=Math.abs((this.sv(obj,this.data[0])+this.sv(obj,this.data[2])/2)-mse);
   if (c<this.data[5]){
    p=(this.data[5]-c)/this.data[5],exp=p*this.data[6];
    obj.style[this.data[1]]=this.data[7]+this.data[8]*p+'px';
    obj.style[this.data[2]]=this.ary[z0][1]*(1+exp)+'px';
    obj.style[this.data[3]]=this.ary[z0][2]*(1+exp)+'px';
    this.opac(obj,this.data[9]+this.data[10]*p);
   }
   else {
    obj.style[this.data[1]]=this.data[7]+'px';
    obj.style[this.data[2]]=this.ary[z0][1]+'px';
    obj.style[this.data[3]]=this.ary[z0][2]+'px';
    this.opac(obj,this.data[9]);
   }
   obj.style[this.data[0]]=lft+'px';
   lft+=this.sv(obj,this.data[2])+this.spc;
  }
  this.obj.style[this.data[2]]=lft-this.spc+'px';
  this.obj.style[this.data[0]]=(this.sv(this.pobj,this.data[2])-lft+this.spc)/2+'px';
 },

 Reset:function(){
  for (var lft=0,z0=0;z0<this.ary.length;z0++){
   var obj=this.ary[z0][0];
   obj.style.position='absolute';
   obj.style[this.data[0]]=lft+'px';
   obj.style[this.data[1]]=this.data[7]+'px';
   obj.style[this.data[2]]=this.ary[z0][1]+'px';
   obj.style[this.data[3]]=this.ary[z0][2]+'px';
   this.opac(obj,this.data[9]);
   lft+=this.ary[z0][1]+this.spc;
  }
  this.obj.style[this.data[2]]=lft-this.spc+'px';
  this.obj.style[this.data[0]]=(this.sv(this.pobj,this.data[2])-lft+this.spc)/2+'px';
 },

 MseOut:function(e){
  var obj=e.relatedTarget||e.toElement;
  if (obj){
   while (obj.parentNode){
    if (obj==this.pobj){
     return false;
    }
    obj=obj.parentNode;
   }
  }
  this.Reset();
 },

 addevt:function(o,t,f,p){
  var oop=this;
  if (o.addEventListener) o.addEventListener(t,function(e){ return oop[f](e,p);}, false);
  else o.attachEvent('on'+t,function(e){ return oop[f](e,p); });
 },

 mse:function(e){
  if (document.all) return [e.clientX+this.docs()[0],e.clientY+this.docs()[1]];
  return [e.pageX,e.pageY];
 },

 docs:function(){
  if (!document.body.scrollTop) return [document.documentElement.scrollLeft,document.documentElement.scrollTop];
  return [document.body.scrollLeft,document.body.scrollTop];
 },

 pos:function(obj){
  var rtn=[0,0];
  while(obj){
   rtn[0]+=obj.offsetLeft;
   rtn[1]+=obj.offsetTop;
   obj=obj.offsetParent;
  }
  return rtn;
 },

 sv:function(obj,par){
  if (obj.currentStyle) return parseInt(obj.currentStyle[par.replace(/-/g,'')]);
  return parseInt(document.defaultView.getComputedStyle(obj,null).getPropertyValue(par.toLowerCase()));
 },

 opac:function(obj,opc){
  obj.style.filter='alpha(opacity='+opc+')';
  obj.style.opacity=obj.style.MozOpacity=obj.style.KhtmlOpacity=opc/100-.001;
 }

}// JavaScript Document
