/*<![CDATA[*/



// function call to function zxcInitBorderGrp(zxcid,zxcmde,zxctag,zxctimeover,zxctimeout,zxcsrt,zxcfin,zxcborder){
// Called by an 'onload' event.
//
// parameter 0 = the unique ID name of the parent element. (string)
// parameter 1 = the default item. (string)
// parameter 2 = the the tag Name of the child elements to apply the effect.     (object or string)
// parameter 3 = the duration in milli seconds to apply the  effect.    (digits)
// parameter 4 = for color the start color in HEX.                               (string, prefix '#')
//               for size the start size in px (digits).                         (digits)
// parameter 5 = for color the finish color in HEX.                              (string, prefix '#')
//               for size the finish size in px (digits).                        (digits)

// The first event call(mouseover) must include all parameters.

function zxcInitBorderGrp(zxcid,zxcdefault,zxctag,zxctimeover,zxcsrt,zxcfin){
 var zxcp=document.getElementById(zxcid);
 var zxcels=document.getElementById(zxcid).getElementsByTagName(zxctag);
 zxcp.tbary=[];
 for (var zxcd,zxc0=0;zxc0<zxcels.length;zxc0++){
  var zxcobj=zxcels[zxc0];
  if (!zxcobj.className||(zxcobj.className&&!zxcobj.className.match('zxcNoBorder'))){
   zxcES(zxcobj,{position:'relative'});
   zxcd=zxcES('DIV',{position:'absolute',overflow:'hidden',visibility:'hidden',left:'0px',top:'0px',width:'100%',height:'1px'},zxcobj);
   zxcAnimator('background-Color',zxcd,(zxcobj.id==zxcdefault)?zxcsrt:zxcfin,(zxcobj.id==zxcdefault)?zxcfin:zxcsrt,'sin',20);
   zxcd.level=101;
   zxcp.tbary.push(zxcd);
   zxcels[zxc0].tb=zxcd;
   zxcd.data=[zxcp,zxcsrt,zxcfin,zxctimeover];
   zxcES(zxcels[zxc0],{textDecoration:'none'});
   zxcd=zxcES('DIV',{position:'absolute',overflow:'hidden',left:'0px',top:'20px',width:'100%',height:'1px'},zxcobj);
   zxcels[zxc0].bb=zxcd;
   zxcd.data=[zxcp,zxcsrt,zxcfin,zxctimeover];
   zxcAddEvt(zxcels[zxc0],'zxcBorder','mouseover');
   zxcAddEvt(zxcels[zxc0],'zxcBorder','mouseout');
  }
  zxcp.onmouseover=null;
 }
 setTimeout(function(){ for (var zxc1=0;zxc1<zxcp.tbary.length;zxc1++) zxcES(zxcp.tbary[zxc1],{visibility:'visible'}); },100);
}

function zxcBorder(zxcevt,zxctbobj){
 var zxcbb=this.bb;
 if (zxcbb){
  if (!zxcbb['backgroundColoroop']) zxcAnimator('background-Color',zxcbb,zxcbb.data[1],zxcbb.data[2],'sin',zxcbb.data[3])
  else {
   var zxcdata=zxcbb['backgroundColoroop'].data;
   zxcAnimator('background-Color',zxcbb,zxcdata[0],zxcbb.data[(zxcevt.type=='mouseover')?2:1],'sin',zxcbb.data[3])
  }
 }
}

function zxcInitColor(zxcid,zxcdefault,zxctag,zxctimeover,zxcsrt,zxcfin){
 var zxcp=document.getElementById(zxcid);
 var zxcels=document.getElementById(zxcid).getElementsByTagName(zxctag);
 zxcp.cary=[];
 for (var zxcd,zxc0=0;zxc0<zxcels.length;zxc0++){
  var zxcobj=zxcels[zxc0];
  if (!zxcobj.className||(zxcobj.className&&!zxcobj.className.match('zxcNoBorder'))){
   zxcES(zxcels[zxc0],{color:(zxcobj.id==zxcdefault)?zxcfin:zxcsrt});
   zxcAnimator('color',zxcels[zxc0],(zxcobj.id==zxcdefault)?zxcsrt:zxcfin,(zxcobj.id==zxcdefault)?zxcfin:zxcsrt,'sin',20);
   zxcp.cary.push(zxcels[zxc0]);
   zxcels[zxc0].cdata=[zxcp,zxcsrt,zxcfin,zxctimeover];
   zxcels[zxc0].clevel=101;
   zxcES(zxcels[zxc0],{textDecoration:'none'});
  }
 }
}

function zxcES(zxcele,zxcstyle,zxcp,zxctxt){
 if (typeof(zxcele)=='string'){ zxcele=document.createElement(zxcele); }
 for (key in zxcstyle){ zxcele.style[key]=zxcstyle[key]; }
 if (zxcp){ zxcp.appendChild(zxcele); }
 if (zxctxt){ zxcele.appendChild(document.createTextNode(zxctxt)); }
 return zxcele;
}

function zxcEventAdd(zxco,zxct,zxcf) {
 if ( zxco.addEventListener ){ zxco.addEventListener(zxct, function(e){ return zxco[zxcf](e);}, false); }
 else if ( zxco.attachEvent ){ zxco.attachEvent('on'+zxct,function(e){ return zxco[zxcf](e); }); }
 else {
  var zxcPrev=zxco["on" + zxct];
  if (zxcPrev){ zxco['on'+zxct]=function(e){ zxcPrev(e); zxco[zxcf](e); }; }
  else { zxco['on'+zxct]=zxco[zxcf]; }
 }
}

function zxcAddEvt(zxcobj,zxcfun,zxcevt){
 if (zxcobj['zxcadd'+zxcfun+zxcevt]) return;
 zxcobj['zxcadd'+zxcfun+zxcevt]=window[zxcfun];
 zxcEventAdd(zxcobj,zxcevt,'zxcadd'+zxcfun+zxcevt);
}

/*]]>*/

