//********************************************************
//*by Rasiel                                             *
//*MSN:blackrasiel@hotmail.com                           *
//********************************************************
function findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function showHideLayers() {
  var i,p,v,obj,args=showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function changeProp(objName,x,theProp,theValue) {
  var obj = findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function widthUniform(objName,oldsize,newsize,Unit,t){
  var i=(newsize-oldsize)/(t/20),j;showHideLayers(objName,'','show');
  for(j=0;j<t;j+=20){setTimeout("changeProp('"+objName+"','','style.width','"+oldsize+Unit+"','LAYER')",j);oldsize+=i;}
  setTimeout("changeProp('"+objName+"','','style.width','"+newsize+Unit+"','LAYER')",t);
}

function heightUniform(objName,oldsize,newsize,Unit,t){
  var i=(newsize-oldsize)/(t/20),j;showHideLayers(objName,'','show');
  for(j=0;j<t;j+=20){setTimeout("changeProp('"+objName+"','','style.height','"+oldsize+Unit+"','LAYER')",j);oldsize+=i;}
  setTimeout("changeProp('"+objName+"','','style.height','"+newsize+Unit+"','LAYER')",t);
}

function widthAcceleration(objName,oldsize,newsize,Unit,t){
  var j;showHideLayers(objName,'','show');
  for(j=t;j>0;j-=20){setTimeout("changeProp('"+objName+"','','style.width','"+newsize+Unit+"','LAYER')",j);newsize+=(oldsize-newsize)/(5*t/1000);}
  setTimeout("changeProp('"+objName+"','','style.width','"+newsize+Unit+"','LAYER')",t);
}

function heightAcceleration(objName,oldsize,newsize,Unit,t){
  var j;showHideLayers(objName,'','show');
  for(j=t;j>0;j-=20){setTimeout("changeProp('"+objName+"','','style.height','"+newsize+Unit+"','LAYER')",j);newsize+=(oldsize-newsize)/(5*t/1000);}
  setTimeout("changeProp('"+objName+"','','style.height','"+newsize+Unit+"','LAYER')",t);
}

function widthReduceSpeed(objName,oldsize,newsize,Unit,t){
  var j;showHideLayers(objName,'','show');
  for(j=0;j<t;j+=20){setTimeout("changeProp('"+objName+"','','style.width','"+oldsize+Unit+"','LAYER')",j);oldsize+=(newsize-oldsize)/(5*t/1000);}
  setTimeout("changeProp('"+objName+"','','style.width','"+newsize+Unit+"','LAYER')",t);
}	  

function heightReduceSpeed(objName,oldsize,newsize,Unit,t){
  var j;showHideLayers(objName,'','show');
  for(j=0;j<t;j+=20){setTimeout("changeProp('"+objName+"','','style.height','"+oldsize+Unit+"','LAYER')",j);oldsize+=(newsize-oldsize)/(5*t/1000);}
  setTimeout("changeProp('"+objName+"','','style.height','"+newsize+Unit+"','LAYER')",t);
}

function xMoveUniform(objName,oldx,newx,Unit,t){
  var i=(newx-oldx)/(t/20),j;showHideLayers(objName,'','show');
  for(j=0;j<t;j+=20){setTimeout("changeProp('"+objName+"','','style.marginLeft','"+oldx+Unit+"','DIV')",j);oldx+=i;} 
  setTimeout("changeProp('"+objName+"','','style.marginLeft','"+newx+Unit+"','DIV')",t);
}

function yMoveUniform(objName,oldy,newy,Unit,t){
  var i=(newy-oldy)/(t/20),j;showHideLayers(objName,'','show');
  for(j=0;j<t;j+=20){setTimeout("changeProp('"+objName+"','','style.marginTop','"+oldy+Unit+"','DIV')",j);oldy+=i;} 
  setTimeout("changeProp('"+objName+"','','style.marginTop','"+newdx+Unit+"','DIV')",t);
}


function xMoveAcceleration(objName,oldx,newx,Unit,t){
  var j;showHideLayers(objName,'','show');
  for(j=t;j>0;j-=20){setTimeout("changeProp('"+objName+"','','style.marginLeft','"+newx+Unit+"','DIV')",j);newx+=(oldx-newx)/(5*t/1000);}
  setTimeout("changeProp('"+objName+"','','style.marginLeft','"+newdx+Unit+"','DIV')",t);
}

function yMoveAcceleration(objName,oldy,newy,Unit,t){
  var j;showHideLayers(objName,'','show');
  for(j=t;j>0;j-=20){setTimeout("changeProp('"+objName+"','','style.marginTop','"+newy+Unit+"','DIV')",j);newy+=(oldy-newy)/(5*t/1000);}
  setTimeout("changeProp('"+objName+"','','style.marginTop','"+newdx+Unit+"','DIV')",t);
}

function xMoveReduceSpeed(objName,oldx,newx,Unit,t){
  var j;showHideLayers(objName,'','show');
  for(j=0;j<t;j+=20){setTimeout("changeProp('"+objName+"','','style.marginLeft','"+oldx+Unit+"','LAYER')",j);oldx+=(newx-oldx)/(5*t/1000);}
  setTimeout("changeProp('"+objName+"','','style.marginLeft','"+newdx+Unit+"','DIV')",t);
}	  

function yMoveReduceSpeed(objName,oldy,newy,Unit,t){
  var j;showHideLayers(objName,'','show');
  for(j=0;j<t;j+=20){setTimeout("changeProp('"+objName+"','','style.marginTop','"+oldy+Unit+"','LAYER')",j);oldy+=(newy-oldy)/(5*t/1000);}
  setTimeout("changeProp('"+objName+"','','style.marginTop','"+newdx+Unit+"','DIV')",t);
}