// JavaScript Document
function SInOut(p_dc,p_caller){
	var thisobj=this;
	thisobj.dc=p_dc;
	thisobj.caller=p_caller;
	thisobj.obj;
	thisobj.modfscale;
	thisobj.modtscale;
	thisobj.fscale;
	thisobj.tscale;
	thisobj.tsin;
	thisobj.inout;
	thisobj.mindex=3;
	thisobj.childs;
	if(thisobj.dc<50){
		thisobj.mindex=6;
	}else if(thisobj.dc<100){
		thisobj.mindex=4;
	}
	thisobj.sNext=function(){
		if(thisobj.tsin!=null){
			window.clearTimeout(thisobj.tsin);	
		}
		if(thisobj.inout==true){
			thisobj.modtscale=thisobj.modtscale-thisobj.mindex;
			thisobj.modfscale=thisobj.modfscale+thisobj.mindex;
			thisobj.obj.style.left=String(Math.round(Number(thisobj.childs[0][1])+(Number(thisobj.childs[0][3])/2)*(thisobj.modtscale-thisobj.fscale)/100))+"px";
			thisobj.obj.style.top=String(Math.round(Number(thisobj.childs[0][2])+(Number(thisobj.childs[0][4])/2)*(thisobj.modtscale-thisobj.fscale)/100))+"px";
			thisobj.obj.style.width=String(Math.round(Number(thisobj.childs[0][3])*thisobj.modfscale/100))+"px";
			thisobj.obj.style.height=String(Math.round(Number(thisobj.childs[0][4])*thisobj.modfscale/100))+"px";
			for(var i=1;i<thisobj.childs.length;i++){
				thisobj.childs[i][0].style.left=String(Math.round(Number(thisobj.childs[i][1])*(thisobj.modfscale)/100))+"px";
				thisobj.childs[i][0].style.top=String(Math.round(Number(thisobj.childs[i][2])*(thisobj.modfscale)/100))+"px";
				thisobj.childs[i][0].style.width=String(Math.round(Number(thisobj.childs[i][3])*thisobj.modfscale/100))+"px";
				thisobj.childs[i][0].style.height=String(Math.round(Number(thisobj.childs[i][4])*thisobj.modfscale/100))+"px";
			}
		}
		if(thisobj.modtscale-thisobj.mindex>=thisobj.fscale){
			thisobj.tsin=window.setTimeout(thisobj.sNext,Math.round(Number(thisobj.dc)/(Math.max(thisobj.fscale,thisobj.tscale)-Math.min(thisobj.fscale,thisobj.tscale))));
		}else{
			for(var i=0;i<thisobj.childs.length;i++){
				thisobj.childs[i][0].style.left=String(Number(thisobj.childs[i][1]))+"px";				
				thisobj.childs[i][0].style.top=String(Number(thisobj.childs[i][2]))+"px";
				thisobj.childs[i][0].style.width=String(Number(thisobj.childs[i][3]))+"px";				
				thisobj.childs[i][0].style.height=String(Number(thisobj.childs[i][4]))+"px";				
			}
			thisobj.caller.sInF(thisobj);	
		}
	};
	thisobj.sIn=function(p_obj,p_fscale,p_tscale){
		if((isIEM())||(isNF())){
			//nothing	
		}else{
			if(thisobj.tsin!=null){
				window.clearTimeout(thisobj.tsin);	
			}
			thisobj.obj=p_obj;
			thisobj.childs=new Array();
			if(p_fscale<1){
				p_fscale=1;	
			}
			thisobj.fscale=p_fscale;
			thisobj.tscale=p_tscale;
			thisobj.modfscale=thisobj.fscale;
			thisobj.modtscale=thisobj.tscale;
			thisobj.inout=true;
			if((enPos())&&(thisobj.obj.style.position=="absolute")){
				thisobj.addObj(thisobj.obj);
				thisobj.sNext();
			}
		}
	};
	thisobj.addObj=function(p_obj){
		if(p_obj.style){
			if((p_obj.style.left.substring(p_obj.style.left.length-2)=="px")&&(p_obj.style.top.substring(p_obj.style.top.length-2)=="px")&&(p_obj.style.width.substring(p_obj.style.width.length-2)=="px")&&(p_obj.style.height.substring(p_obj.style.height.length-2)=="px")){
				thisobj.childs.push(new Array(p_obj,Number(p_obj.style.left.substring(0,p_obj.style.left.length-2)),Number(p_obj.style.top.substring(0,p_obj.style.top.length-2)),Number(p_obj.style.width.substring(0,p_obj.style.width.length-2)),Number(p_obj.style.height.substring(0,p_obj.style.height.length-2))));
				for(var i=0;i<p_obj.childNodes.length;i++){
					thisobj.addObj(p_obj.childNodes[i]);
				}
			}
		}
	};
}
