function winXYGlide(type,amplitude,angle,endangle,centerX,centerY,slantangle,endx,endy,distx,disty,angleinc,speed,fn) {
if (angle < endangle && this.XYglideActive) {
angle += angleinc
var u = amplitude*Math.sin(angle*Math.PI/180)
var x = centerX + u*Math.cos(slantangle)
var y = centerY - u*Math.sin(slantangle)
this.XYmove( x, y )
this.XYonGlide()
if (this.XYglideActive) setTimeout(this.obj+'.XYglide('+type+','+amplitude+','+angle+','+endangle+','+centerX+','+centerY+','+slantangle+','+endx+','+endy+','+distx+','+disty+','+angleinc+','+speed+',\''+fn+'\')',speed)
else this.XYonGlideEnd()
}
else {
if (type==1) this.XYglide(0,amplitude,-90,0,this.x+distx/2,this.y+disty/2,slantangle,endx,endy,distx,disty,angleinc,speed,fn)
else {
this.XYglideActive = false
this.XYmove(endx,endy)
this.XYonGlide()
this.XYonGlideEnd()
eval(fn)
}
}
}
//------------ SIZE
function winWHGlideTo(startSpeed,endSpeed,endx,endy,angleinc,speed,fn) {
function winWHGlide(type,amplitude,angle,endangle,centerX,centerY,slantangle,endx,endy,distx,disty,angleinc,speed,fn, wfn) {
if ( wfn==null && angle < endangle && this.WHglideActive) {
angle += angleinc
var u = amplitude*Math.sin(angle*Math.PI/180)
var w = centerX + u*Math.cos(slantangle)
var h = centerY - u*Math.sin(slantangle)
this.WHsize( w, h )
this.WHonGlide()
if (this.WHglideActive) setTimeout(this.obj+'.WHglide('+type+','+amplitude+','+angle+','+endangle+','+centerX+','+centerY+','+slantangle+','+endx+','+endy+','+distx+','+disty+','+angleinc+','+speed+',\''+fn+'\')',speed)
else this.WHonGlideEnd()
}
else {
if (type==1) this.WHglide(0,amplitude,-90,0,this.w+distx/2,this.h+disty/2,slantangle,endx,endy,distx,disty,angleinc,speed,fn)