function CheckFlashResize(mWidth,mHeight) {
	// alert(GetWindowHeight());
	Sizer=document.getElementById("flashcontainer");
	if(Sizer!=null && typeof(Sizer)!='undefined') {
		if(GetWindowWidth()<mWidth) {
			Sizer.style.width=mWidth+"px";
		} else {
			Sizer.style.width="100%";
		}
		if(GetWindowHeight()<mHeight) {
			Sizer.style.height=mHeight+"px";
		} else {
			Sizer.style.height="100%";
		}
	}
}
function FlashFixResize(mWidth,mHeight) {
	Sizer=document.getElementById("flashcontainer");
	Sizer.style.width=mWidth+"px";
	Sizer.style.height=mHeight+"px";
}
function FlashFixResizeH(mHeight) {
	Sizer=document.getElementById("flashcontainer");
	Sizer.style.height=mHeight+"px";
}

function SmoothResizeH(f) {
	var obj = document.getElementById("flashcontainer");
	if(!obj["curh"]) obj["curh"]=280;

	StartMoveCoordTo(f,"flashcontainer","curh","hspd",null,8.0,function(p) {FlashFixResizeH(p);})
}

function StartMoveCoordTo(Des,ObjNme,CxName,SpName,Dif,SmoothFact,CallBack) {
	var obj = document.getElementById(ObjNme);
	obj[CxName+"_dest"]=Des;
	CallMoveCoordTo(Des,ObjNme,CxName,SpName,Dif,SmoothFact,CallBack);
}
function CallMoveCoordTo(Des,ObjNme,CxName,SpName,Dif,SmoothFact,CallBack) {
	var obj = document.getElementById(ObjNme);
	if(obj[CxName+"_dest"] && obj[CxName+"_dest"]!=Des) return;
	if(MoveCoordTo(Des,obj,CxName,SpName,Dif,SmoothFact,CallBack)) {
		setTimeout(function() { CallMoveCoordTo(Des,ObjNme,CxName,SpName,Dif,SmoothFact,CallBack); },70);
	} /*else delete obj[CxName+"_dest"];*/
}

	function MoveCoordTo(Des,Obj,CxName,SpName,Dif,SmoothFact,CallBack) {
	
		if(!SmoothFact || SmoothFact==null || SmoothFact=="") SmoothFact=8.0;
		
		var Cx=Obj[CxName];
		if(!Cx) Cx=Obj[CxName]=0;

		var Sp=Obj[SpName];
		if(!Sp) Sp=Obj[SpName]=0.0;
		if(!Dif || Dif==null) Dif=(Des-Cx);
		
		// alert("MoveCoordTo("+Des+") Cx="+Cx+" Sp="+Sp+" Dif="+Dif+" SmoothFact="+SmoothFact);
		if(SmoothFact==0) {
			Obj[SpName]=Sp=0;
			Obj[CxName]=Cx=Des;
			CallBack(Des);
			return false;
		} else {
			Sp+=Dif/SmoothFact;
			Sp/=1.5+2.0/SmoothFact;
			Cx+=Sp;
		}
		Obj[SpName]=Sp;
		Obj[CxName]=Cx;
		if(Math.abs(Dif)<0.1*SmoothFact && Math.abs(Sp)<0.1*SmoothFact) {
			Obj[CxName]=Cx=Des;
			CallBack(Des);
			return false;
		}
		CallBack(Cx);
		return true;
	}









if(typeof(LoadedModule)!='undefined') {
	LoadedModule("FLASHRES");
}
