function AnimFrame(sID){
	return this.Init(sID);
}

AnimFrame.prototype = new AnimationItem();

AnimFrame.prototype.onLoad=function(){
	this.w=this.oPtr.offsetWidth;
	this.h=this.oPtr.offsetHeight;
}

AnimFrame.prototype.Open=function(evt, sImage, sText){
	evt = checkEvent(evt);
	
	//определяем начальные размеры и положение фрэйма
	var oPos = getAbsolutePos(evt.target);
	this.MoveTo(oPos.x, oPos.y);
	this.x = oPos.x;
	this.y = oPos.y;
	this.w = evt.target.offsetWidth + 25;
	this.h = evt.target.offsetHeight + 30;
	
	var oImg=this.oPtr.getElementsByTagName('img')[0];
	if(oImg.runtimeStyle)
		oImg.runtimeStyle.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+sImage+'", sizingMethod="scale")';
	else
		oImg.src=sImage;
	
	this.oPtr.getElementsByTagName('p')[0].innerHTML=sText;
	
	this.oPtr.style.display = 'block';
	this.InitResize(new pnt(this.w, this.h), new pnt(526, 526), .3, 'center');
	this.onAnimationOver=function(){
		document.getElementById('CloseBtn').style.display = 'block';
		delete this.onAnimate;
	}
}

AnimFrame.prototype.Close=function(evt){
	if(window.event)
		window.event.cancelBubble = true;
	else if(evt && evt.stopPropagation)
		evt.stopPropagation();
	this.SetDefaults();
	document.getElementById('CloseBtn').style.display = 'none';
	this.InitResize(new pnt(this.sW, this.sH), new pnt(this.w, this.h), .3, 'center');
	this.onAnimationOver=function(){
		delete this.onAnimate;
		this.oPtr.style.display = 'none';
	}
}

AnimFrame.prototype.Resize=function(){
	this.constructor.prototype.Resize.apply(this);
	this.oPtr.style.fontSize=(this.sW / this.oSnapInit.y * 100)+'px';
}

AnimFrame.prototype.MoveTo=function(x, y){
	//следим за тем, чтобы окно не выходило за края экрана
	if(x < 0)
		x=0;
	else if(x + this.sW > this.iBodyWidth - 5)
		x = this.iBodyWidth - this.sW - 5;
	
	if(y < 0)
		y=0;
	this.constructor.prototype.MoveTo.call(this, x, y);
}
