//////		LIVINGACTOR FLASH JAVASCRIPT LIBRARY VERSION 1.0.0.4////				copyrights La Cantoche Production//					all rights reserved///////////////////////////////////////////////////////////////////////////////////////////////// Platform Detection/////////////////////////////////////////////////////////////////////////////////////////var LA_AppName = navigator.appName.toLowerCase();var AppVer = parseFloat(navigator.appVersion);if (LA_AppName.indexOf("microsoft internet") != -1)	AppVer = parseFloat(navigator.appVersion.substring((navigator.appVersion.indexOf("MSIE") + 4)));var LA_WIN32 = (window.navigator.platform.indexOf("Win32")!= -1);var LA_WIN95 = navigator.appVersion.indexOf("95")!= -1;var LA_OSX = (window.navigator.userAgent.indexOf("Mac OS X") != -1);var LA_NAV4  = (LA_AppName.indexOf("netscape") != -1 && AppVer >= 4.0 && AppVer <= 4.99);var LA_NAV6  = (LA_AppName.indexOf("netscape") != -1 && AppVer >= 5.0 );var LA_IE4   = (LA_AppName.indexOf("microsoft internet") != -1 && AppVer >= 4.0 && AppVer < 5.0);var LA_IE5   = (LA_AppName.indexOf("microsoft internet") != -1 && AppVer >= 5.0);var LA_IE   = (LA_AppName.indexOf("microsoft internet") != -1 && AppVer >= 4.0 );var LA_SP2 = (window.navigator.userAgent.indexOf("SV1") != -1);var LA_DomBody=(document.documentElement && document.documentElement.clientHeight)?document.documentElement:document.body;var LA_FlashClientVers=null;var LA_TestFlashVers=10;if (LA_NAV6){	var LA_FlashPlugin = navigator.plugins['Shockwave Flash'];    if (typeof LA_FlashPlugin == 'object')	{ 		for(i=0;i<=LA_TestFlashVers;++i)		{			if (LA_FlashPlugin.description.indexOf(''+i+'.') != -1)			{				LA_FlashClientVers = i;				break;			}		}    }}/////////////////////////////////////////////////////////////////////////////////////////// Event/////////////////////////////////////////////////////////////////////////////////////////var LA_OnActorLoaded	= null;var LA_OnDragStart	= null;var LA_OnDragEnd	= null;var LA_OnBookmark	= null;var LA_OnDialogID	= null;var LA_OnSelect		= null;var LA_OnHide		= null;var LA_OnShow		= null;var LA_OnQuit		= null;var LA_OnReady		= null;var LA_OnSoundOn	= null;var LA_OnSoundOff	= null;/////////////////////////////////////////////////////////////////////////////////////////// LivingActor Status/////////////////////////////////////////////////////////////////////////////////////////var LA_E_UNINITIALIZED = 0;var LA_E_INITIALIZED = 1;var LA_E_INSTALLING = 2;var LA_E_LOADING_ACTOR = 3;var LA_E_STARTED = 4;/////////////////////////////////////////////////////////////////////////////////////////// Global Variable/////////////////////////////////////////////////////////////////////////////////////////var LA_CurrentStatus = LA_E_UNINITIALIZED;var ACTOR = null;var LA_GENERIC_FLASH_PLAYER = null;var LA_ACTOR_URL = ""; //internal usevar LA_PLAYER_URL = "";var LA_UserDefined = ""; //internal usevar LA_DRAG_THREAD_ID = 0;var LA_DIALOG_VISIBILITY = true;var LA_FISRTPLAYERUPDATE = true;var LA_UID = new Date();LA_UID = LA_UID.getTime();var LA_AllObservableAdded = false; // observer observables var LA_ObjectIDs = new Array();/////////////////////////////////////////////////////////////////////////////////////////// Error/////////////////////////////////////////////////////////////////////////////////////////var LA_E_NO_ERROR = 0;var LA_E_ACTOR_FILE_HAS_EXPIRED = 1;var LA_LA_E_ACTOR_FILE_NOT_FOUND = 2;var LA_E_ACTOR_FILE_BAD_FORMAT = 3;var LA_E_NO_WIN32_PLATFORM_DETECTED = 4;var LA_E_NO_COMPATIBLE_BROWSER_DETECTED = 5;var LA_E_WIN95_DETECTED = 6;var LA_E_CANNOT_FIND_PLUGIN_VERSION_REQUESTED = 7;var LA_E_HIGH_SECURITY_OR_USER_SAY_NO = 8;var LA_E_INSTALL_ABORTED = 9;var	LA_E_INTERNET_INITIALIZATION_ERROR = 16;var	LA_E_CANT_CREATE_HTTP_CONNECTION_ERROR = 17;var	LA_E_HTTP_TRANSMISSION_ERROR = 18;var	LA_E_CANT_CREATE_TEMP_FILE_ERROR = 19;var	LA_E_DOWNLOAD_FAILED = 20;var	LA_E_CANT_WRITE_LIVINGACTOR_ERROR = 21;var	LA_E_REGISTRATION_ERROR = 22;var LA_E_JAVA_IS_DISABLED = 23;var LA_E_NETSCAPE_TRIGGER_IS_DISABLED = 24;var LA_CANNOT_START_PLUGIN_NETSCAPE = 25;var LA_CANNOT_INSTALL_XPI = 26;/////////////////////////////////////////////////////////////////////////////////////////// LA_Toggle Enable / Disable/////////////////////////////////////////////////////////////////////////////////////////var TOGGLE_DOWNLOADING_DIALOGBOX = "1";var TOGGLE_LOADING_DIALOG_DIALOGBOX = "2";var TOGGLE_ACTOR_DIALOG = "3";var TOGGLE_ANTIALIASING = "4";var TOGGLE_SOUND = "5";var TOGGLE_PAINTER = "7";var TOGGLE_SYSTEM_ICON = "6";var TOGGLE_TOOLBAR = "8";var TOGGLE_MOUSE_INTERACTION = "9";/////////////////////////////////////////////////////////////////////////////////////////// Load Actor////////////////////////////////////////////////////////////////////////////////////////function ActorLoading(){	if (LA_GENERIC_FLASH_PLAYER != null)	{		if (ACTOR==null)		{			LA_ManageStatus(LA_E_LOADING_ACTOR);			ACTOR = new Actor(LA_GENERIC_FLASH_PLAYER);			ACTOR.LoadActor(LA_ACTOR_URL);		}		if(Main_LivingActor)		{			Main_LivingActor(LA_UserDefined);		}	}}/////////////////////////////////////////////////////////////////////////////////////////// LivingActor Initialisation (platform & browser dependant function)/////////////////////////////////////////////////////////////////////////////////////////function Init_LivingActor(anActorPath,userValue){	LA_ACTOR_URL = anActorPath;	LA_UserDefined = userValue;		if (LA_GENERIC_FLASH_PLAYER==null)		{			LA_GENERIC_FLASH_PLAYER = document.FLASH_PLAYER_ID;		}		ActorLoading();}/////////////////////////////////////////////////////////////////////////////////////////// Load a new Actor and his dialog without reload the page/////////////////////////////////////////////////////////////////////////////////////////function LoadNewActor(actorURL,dialogURL,uservalue){	ACTOR.Stop();	//reinit library variables..	//LA_CurrentStatus = LA_E_UNINITIALIZED;	ACTOR = null;	LA_ACTOR_URL = ""; 	LA_UserDefined = ""; 	LA_DRAG_THREAD_ID = 0;	document.getElementById("LA_DialogLayer").style.left = (parseInt(document.getElementById('LA_DialogLayer').style.left) - 2000)+"px";	document.FLASH_DIALOG_ID.LoadMovie(0,dialogURL);	Init_LivingActor(actorURL,uservalue);}/////////////////////////////////////////////////////////////////////////////////////////// Stop & Quit LivingActor/////////////////////////////////////////////////////////////////////////////////////////function TerminateLivingActor(){	ACTOR = null;	LA_GENERIC_FLASH_PLAYER = null;}/////////////////////////////////////////////////////////////////////////////Size of current Window & Body///////////////////////////////////////////////////////////////////////////function LA_BodySize(){	this.Width=LA_DomBody.scrollWidth;	this.Height=LA_DomBody.scrollHeight;}function LA_WindowSize(){	if(LA_NAV6)	{	this.Height = window.innerHeight;	this.Width = window.innerWidth;	this.ScrollTop=window.pageYOffset;	this.ScrollLeft=window.pageXOffset;	}	else if(LA_IE)	{	this.Height = LA_DomBody.clientHeight;	this.Width = LA_DomBody.clientWidth;	this.ScrollTop=LA_DomBody.scrollTop;	this.ScrollLeft=LA_DomBody.scrollLeft;	}}/////////////////////////////////////////////////////////////////////////////////////////// Initialisation system : Livingactor starts when ALL related objects are initialised. Observable/Observer system/////////////////////////////////////////////////////////////////////////////////////////// observable objectfunction LA_ObservableReadyObject(LA_anObject,LA_aType){	this.target = LA_anObject;	this.type = LA_aType;	this.readyflag = false;	this.isReady = function(){		if(this.type=="ExternalReady"){			return this.readyflag;			}		else if(this.type=="htmlObject"){			anobject=LA_FindObjectInWindow(this.target);			if(anobject)			{				anobjX=LA_findPagePos(anobject)[0];				anobjY=LA_findPagePos(anobject)[1];				if((anobjX==0) && (anobjY==0)){					return false;				}				else return true;			}			else return true;		}	}}function LA_Add_ObservableObject(LA_anObject,LA_aType){	LA_ObjectIDs[LA_ObjectIDs.length] = new LA_ObservableReadyObject(LA_anObject,LA_aType);}function LA_Get_ObservableObject(LA_aName){	for(i=0;i<LA_ObjectIDs.length;i++){		if(LA_ObjectIDs[i].target==LA_aName){			return LA_ObjectIDs[i];		}	}	return null;}// observationfunction LA_Check_Objects_Ready_Loop(){	if(LA_AllObservableAdded){//alert("check ready loop: "+LA_ObjectIDs.length);		for(i=0;i<LA_ObjectIDs.length;i++) {			if(LA_ObjectIDs[i].isReady()==false){				setTimeout("LA_Check_Objects_Ready_Loop()",500);				return;			}		}		if(LA_OnReady){LA_OnReady();}	}	else{		setTimeout("LA_Check_Objects_Ready_Loop()",500);	}}// fill already the observer with la_flash objectsLA_Add_ObservableObject("FLASH_PLAYER_ID","ExternalReady");LA_Add_ObservableObject("FLASH_DIALOG_ID","ExternalReady");LA_Add_ObservableObject("FLASH_PROGRESSBAR_ID","ExternalReady");//utility functionfunction LA_Add_ObservableHTMLObjectsArray(aStringList){	anArray=aStringList.split(",");	for(i=0;i<anArray.length;i++){		LA_Add_ObservableObject(anArray[i],"htmlObject");	}}/////////////////////////////////////////////////////////////////////////////////////////// Event Management/////////////////////////////////////////////////////////////////////////////////////////function LA_Drag_Thread(){	LA_sizeOfWindow =new LA_WindowSize;	LA_sizeOfBody =new LA_BodySize;	//Detect Window Client Size	var LA_actorX = parseInt(document.getElementById('LA_ActorLayer').style.left) + ACTOR.f_DRAG_X;	var LA_actorY = parseInt(document.getElementById('LA_ActorLayer').style.top) + ACTOR.f_DRAG_Y;	var LA_actorWidth = parseInt(document.getElementById('LA_ActorLayer').style.width);	var LA_actorHeight = parseInt(document.getElementById('LA_ActorLayer').style.height);	var LA_windowWidth = LA_sizeOfBody.Width;	var LA_windowHeight = LA_sizeOfBody.Height;		LA_actorX = (LA_actorX+LA_actorWidth/2<0)?-LA_actorWidth/2:LA_actorX;	LA_actorX = (LA_actorX+LA_actorWidth/2>LA_windowWidth)?LA_windowWidth-LA_actorWidth/2:LA_actorX;	LA_actorY = (LA_actorY+LA_actorHeight/2<0)?-LA_actorHeight/2:LA_actorY;	LA_actorY = (LA_actorY+LA_actorHeight/2>LA_windowHeight)?LA_windowHeight-LA_actorHeight/2:LA_actorY;	//alert(LA_actorX+" "+LA_actorY);	document.getElementById('LA_ActorLayer').style.left = LA_actorX+"px";		document.getElementById('LA_ActorLayer').style.top = LA_actorY+"px";	//window.status = "dialogH="+ACTOR.f_DialogHeight+" minX="+ACTOR.f_BBoxMinX+" minY="+ACTOR.f_BBoxMinY+" maxX="+ACTOR.f_BBoxMaxX+" maxY="+ACTOR.f_BBoxMaxY;		if (ACTOR.f_isSpeaking && LA_DIALOG_VISIBILITY)	{		var LA_dialogX = - parseInt(document.getElementById('LA_DialogLayer').style.width) / 2 + parseInt(document.getElementById('LA_ActorLayer').style.left) + parseInt(document.getElementById('LA_ActorLayer').style.width) / 2;		var LA_dialogY = LA_actorY+ACTOR.f_BBoxMinY - parseInt(document.getElementById('LA_DialogLayer').style.height);		var LA_dialogWidth = parseInt(document.getElementById('LA_DialogLayer').style.width);		var LA_dialogHeight = parseInt(document.getElementById('LA_DialogLayer').style.height),		LA_dialogX = LA_dialogX <0?0:LA_dialogX;		LA_dialogY = LA_dialogY+LA_dialogHeight < ACTOR.f_DialogHeight?ACTOR.f_DialogHeight-LA_dialogHeight:LA_dialogY;		LA_dialogX = LA_dialogX+LA_dialogWidth > LA_windowWidth?LA_windowWidth-LA_dialogWidth:LA_dialogX;		LA_dialogY = LA_dialogY+LA_dialogHeight > LA_windowHeight?LA_windowHeight-LA_dialogHeight:LA_dialogY;				if (LA_dialogY+ACTOR.f_DialogHeight > LA_actorY+ACTOR.f_BBoxMinY)		{			if (LA_actorX + ACTOR.f_BBoxMaxX +LA_dialogWidth < LA_windowWidth)			{				LA_dialogX = LA_actorX + ACTOR.f_BBoxMaxX;			}			else			{				LA_dialogX = LA_actorX + ACTOR.f_BBoxMinX - LA_dialogWidth;			}		}		document.getElementById('LA_DialogLayer').style.left = LA_dialogX+"px";			document.getElementById('LA_DialogLayer').style.top = (LA_dialogY)+"px";			}	}// Hook for Internet Explorer ( copyright macromedia)// With this we don't need to include vbs anymoreif (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {	document.write('<script language=\"VBScript\"\>\n');	document.write('On Error Resume Next\n');	document.write('Sub FLASH_PLAYER_ID_FSCommand(ByVal command, ByVal args)\n');	document.write('	Call FLASH_PLAYER_ID_DoFSCommand(command, args)\n');	document.write('End Sub\n');	document.write('</script\>\n');		document.write('<script language=\"VBScript\"\>\n');	document.write('On Error Resume Next\n');	document.write('Sub FLASH_DIALOG_ID_FSCommand(ByVal command, ByVal args)\n');	document.write('	Call FLASH_DIALOG_ID_DoFSCommand(command, args)\n');	document.write('End Sub\n');	document.write('</script\>\n');	document.write('<script language=\"VBScript\"\>\n');	document.write('On Error Resume Next\n');	document.write('Sub FLASH_PROGRESSBAR_ID_FSCommand(ByVal command, ByVal args)\n');	document.write('	Call FLASH_PROGRESSBAR_ID_DoFSCommand(command, args)\n');	document.write('End Sub\n');	document.write('</script\>\n');			}function FLASH_DIALOG_ID_DoFSCommand(eventType,eventValue){	if(LA_OSX){		eventType2 = eventType.substring(10,eventType.length); 	}	else{		eventType2 = eventType;	}		if(eventType2=="check_ready"){		document.FLASH_DIALOG_ID.SetVariable("JS_READY","true");		}	if(eventType2=="get_local_connection_id"){		if(LA_Get_ObservableObject("FLASH_DIALOG_ID")!=null){			LA_Get_ObservableObject("FLASH_DIALOG_ID").readyflag = true;		}		//TODO : if null.. pb !! 		document.FLASH_DIALOG_ID.SetVariable("LOCAL_CONNECTION_ID",LA_UID);	}	}function FLASH_PROGRESSBAR_ID_DoFSCommand(LA_eventType,LA_eventValue){	if(LA_OSX){		LA_eventType2 = LA_eventType.substring(10,LA_eventType.length); 	}	else{		LA_eventType2 = LA_eventType;	}			if(LA_eventType2=="check_ready"){		document.FLASH_PROGRESSBAR_ID.SetVariable("JS_READY","true");	}	if(LA_eventType2=="get_local_connection_id"){		if(LA_Get_ObservableObject("FLASH_PROGRESSBAR_ID")!=null){			LA_Get_ObservableObject("FLASH_PROGRESSBAR_ID").readyflag = true;		}		//TODO : if null.. pb !! 		document.FLASH_PROGRESSBAR_ID.SetVariable("LOCAL_CONNECTION_ID",LA_UID);	}	}function FLASH_PLAYER_ID_DoFSCommand(LA_eventType,LA_eventValue){	if(LA_OSX){		LA_eventType2 = LA_eventType.substring(10,LA_eventType.length); 	}	else{		LA_eventType2 = LA_eventType;	}		switch (LA_eventType2) 	{		case "check_ready" :			document.FLASH_PLAYER_ID.SetVariable("JS_READY","true");			break;		case "get_local_connection_id" :			document.FLASH_PLAYER_ID.SetVariable("LOCAL_CONNECTION_ID",LA_UID);			break;		case "ONACTORLOADED":			if(LA_OnActorLoaded)			{				LA_OnActorLoaded(LA_eventValue);			}			ACTOR.Data = LA_eventValue.split(',');				/* note : later ... too bugy for now			idsceneSize = parseInt(ACTOR.GetIndexData("SCENESIZE"));			if(idsceneSize!=-1){				LA_actorLayerx = parseInt(ACTOR.Data[idsceneSize+1]);				LA_actorLayery = parseInt(ACTOR.Data[idsceneSize+2]);				if(typeof(LA_actorLayerx)=="number"){					document.FLASH_PLAYER_ID.width = LA_actorLayerx;					document.getElementById("LA_ActorLayer").style.width = LA_actorLayerx+"px";					document.FLASH_PLAYER_ID.height = LA_actorLayery;					document.getElementById("LA_ActorLayer").style.height = LA_actorLayery+"px";					}			}			*/			break;		case "flash_alert" :			if (LA_eventValue!="")				{				window.status = LA_eventValue;				alert("alert : "+LA_eventValue);			}			break;		case "flash_update":			if(LA_FISRTPLAYERUPDATE){				if(LA_Get_ObservableObject("FLASH_PLAYER_ID")!=null){				LA_Get_ObservableObject("FLASH_PLAYER_ID").readyflag = true;				}				LA_FISRTPLAYERUPDATE=false;			}			if (LA_GENERIC_FLASH_PLAYER!=null)			{				LA_GENERIC_FLASH_PLAYER.SetVariable("FromJavaScript",ACTOR.scenario.join("<&#&>"));				ACTOR.scenario = new Array;			}			break;		case "OnProgressBar":				document.FLASH_PROGRESSBAR_ID.GotoFrame(Math.floor(LA_eventValue));			break;			case "ONPROGRESSBARSHOW":			LA_PLAYER_URL = LA_eventValue;			LA_sizeOfWindow =new LA_WindowSize;			//var LA_PB_centerX = (LA_sizeOfWindow.Width - document.getElementById('LA_ProgressBarLayer').offsetWidth)/2;			//var LA_PB_centerY = ((LA_sizeOfWindow.Height - document.getElementById('LA_ProgressBarLayer').offsetHeight)/2) + LA_sizeOfWindow.ScrollTop;			//alert("X="+LA_PB_centerX+"Y="+LA_PB_centerY);						document.getElementById('LA_ProgressBarLayer').style.left = "0px";			document.getElementById('LA_ProgressBarLayer').style.top = "100px";			break;		case "ONPROGRESSBARHIDE":			document.getElementById('LA_ProgressBarLayer').style.left = -500+"px";						break;		case "ONDRAG":			LA_ind = LA_eventValue.lastIndexOf(',');			ACTOR.f_DRAG_X = LA_eventValue.substr(0,LA_ind) * 1;			ACTOR.f_DRAG_Y = LA_eventValue.substr(LA_ind+1,LA_eventValue.length) * 1;			clearTimeout(LA_DRAG_THREAD_ID);						LA_DRAG_THREAD_ID = setTimeout('LA_Drag_Thread()',10);			break;		case "ONSTARTSPEAK":			ACTOR.f_isSpeaking = true;			var LA_Left_ind=0;			var LA_right_ind=LA_eventValue.indexOf(',',LA_Left_ind);			ACTOR.f_DialogHeight = parseInt(LA_eventValue.substring(LA_Left_ind,LA_right_ind));			LA_Left_ind = ++LA_right_ind;			LA_right_ind=LA_eventValue.indexOf(',',LA_Left_ind);						ACTOR.f_BBoxMinX = parseInt(LA_eventValue.substring(LA_Left_ind,LA_right_ind));			LA_Left_ind = ++LA_right_ind;			LA_right_ind=LA_eventValue.indexOf(',',LA_Left_ind);						ACTOR.f_BBoxMinY = parseInt(LA_eventValue.substring(LA_Left_ind,LA_right_ind));			LA_Left_ind = ++LA_right_ind;			LA_right_ind=LA_eventValue.indexOf(',',LA_Left_ind);			ACTOR.f_BBoxMaxX = parseInt(LA_eventValue.substring(LA_Left_ind,LA_right_ind));			ACTOR.f_BBoxMaxY = parseInt(LA_eventValue.substring(++LA_right_ind,LA_eventValue.length));			LA_Drag_Thread();			break;		case "ONSTOPSPEAK":			ACTOR.f_isSpeaking = false;			//document.getElementById("LA_DialogLayer").style.left = (parseInt(document.getElementById('LA_DialogLayer').style.left) - 2000)+"px";			break;					case "ONPLACEATPIXEL":				ACTOR.f_DRAG_X = 0;				ACTOR.f_DRAG_Y = 0;										LA_ind = LA_eventValue.lastIndexOf(',');				var LA_x = LA_eventValue.substr(0,LA_ind) * 1;				var LA_y = LA_eventValue.substr(LA_ind+1,LA_eventValue.length) * 1;				document.getElementById('LA_ActorLayer').style.left = LA_x+"px";				document.getElementById('LA_ActorLayer').style.top = LA_y+"px";				break;		case "ONPLACEATSCREEN":				ACTOR.f_DRAG_X = 0;				ACTOR.f_DRAG_Y = 0;								LA_ind = LA_eventValue.lastIndexOf(',');				var LA_x = LA_eventValue.substr(0,LA_ind) * 1;				var LA_y = LA_eventValue.substr(LA_ind+1,LA_eventValue.length) * 1;				//alert("PlaceAtScreen : X="+LA_x+" Y="+LA_y+" " + document.body.clientWidth+" " + document.body.clientHeight);				//document.getElementById('LA_ActorLayer').style.left = Math.floor(LA_x*document.body.clientWidth);				//document.getElementById('LA_ActorLayer').style.top = Math.floor(LA_y*document.body.offsetHeight);								break;		case "ONSHOW" :			{				LA_Drag_Thread();				ACTOR.f_DRAG_X = 0;				ACTOR.f_DRAG_Y = 0;				if(LA_OnShow)				{					LA_OnShow();				}			}			break; 		case "ONQUIT" :			if(LA_OnQuit)			{				LA_OnQuit();						}			break;		case "ONHIDE" :			{				document.getElementById("LA_ActorLayer").style.left = (parseInt(document.getElementById('LA_ActorLayer').style.left) - 2000)+"px";				document.getElementById("LA_DialogLayer").style.left = (parseInt(document.getElementById('LA_DialogLayer').style.left) - 2000)+"px";				ACTOR.f_DRAG_X = 2000;				if(LA_OnHide)				{					LA_OnHide();				}			}			break; 						case "ONDRAGSTART" :			if(LA_OnDragStart)			{				LA_OnDragStart();			}			break; 		case "ONDRAGEND" : 			clearTimeout(LA_DRAG_THREAD_ID);			ACTOR.f_DRAG_X = 0;			ACTOR.f_DRAG_Y = 0;			LA_Drag_Thread()			if(LA_OnDragEnd)			{				LA_OnDragEnd(document.getElementById('LA_ActorLayer').style.left,document.getElementById('LA_ActorLayer').style.top);			}			break; 		case "TEXTINPUTCHANGE":			LA_ind = LA_eventValue.indexOf(',');			var LA_TextInputName = LA_eventValue.substr(0,LA_ind);			var LA_TextInputValue = LA_eventValue.substr(LA_ind+1,LA_eventValue.length);			for (var i=0;i<ACTOR.LA_TEXTINPUTS.length;i++)			{				if (ACTOR.LA_TEXTINPUTS[i].f_Name == LA_TextInputName)				{					ACTOR.LA_TEXTINPUTS[i].f_Value = LA_TextInputValue;					LA_TextInputValue = "";				}			}			if (LA_TextInputValue != "")			{				anEdit = new LA_TEXTINPUT(LA_TextInputName,LA_TextInputValue)				ACTOR.LA_TEXTINPUTS.push(anEdit);			}			break;				case "ONBOOKMARK" : 			if(LA_OnBookmark)			{				LA_OnBookmark(LA_eventValue);			}			break; 		case "ONDIALOGID" : 			if(LA_OnDialogID)			{				LA_OnDialogID(LA_eventValue);			}			break; 		case "ONSELECT" : 			if(LA_OnSelect)			{				LA_ind = LA_eventValue.lastIndexOf(',');				var LA_material = LA_eventValue.substr(0,LA_ind);				var LA_bone = LA_eventValue.substr(LA_ind+1,LA_eventValue.length);				LA_OnSelect(LA_material,LA_bone);			}			break; 		case "ONSOUNDON" : 			if(LA_OnSoundOn)			{				LA_OnSoundOn();			}			break;		case "ONSOUNDOFF" : 			if(LA_OnSoundOff)			{				LA_OnSoundOff();			}			break; 			default :	} 	}/////////////////////////////////////////////////////////////////////////////////////////// Error Management/////////////////////////////////////////////////////////////////////////////////////////function LA_ManageError(LA_errorCode){	if((LA_errorCode!=0)&& (LA_errorCode!=1)&& (LA_errorCode!=4)&& (LA_errorCode!=5)&& (LA_errorCode!=6)&& (LA_errorCode!=22)&& (LA_errorCode!=23)&& (LA_errorCode!=24)&& (LA_errorCode!=25) )	{	if(LA_OnSetupExeLaunchable)		LA_OnSetupExeLaunchable();	}	alert(eval("LA_ERROR_" + LA_errorCode));}/////////////////////////////////////////////////////////////////////////////////////////// Error Management/////////////////////////////////////////////////////////////////////////////////////////function LA_ManageStatus(LA_statusCode){	LA_CurrentStatus = LA_statusCode;	//window.status = "Status Code = " + LA_statusCode;}/////////////////////////////////////////////////////////////////////////////////////////// Tools/////////////////////////////////////////////////////////////////////////////////////////function LA_PathFor(LA_anActorName){	var LA_path;	var LA_completePath = document.location.href;	LA_completePath = unescape(LA_completePath);	var LastSlashIndex = LA_completePath.lastIndexOf("/");	LA_path = LA_completePath.substr(0,LastSlashIndex+1);	LA_path += LA_anActorName;	return LA_path;}function LA_GetCookie(LA_NameOfCookie){  	if (document.cookie.length > 0) 	{     		LA_begin = document.cookie.indexOf(LA_NameOfCookie+"="); 		if (LA_begin != -1)   		{			LA_begin += LA_NameOfCookie.length+1; 			LA_end = document.cookie.indexOf(";", LA_begin);			if (LA_end == -1)			{				LA_end = document.cookie.length;			}			return unescape(document.cookie.substring(LA_begin, LA_end)); 		}	}	return null; }function LA_SetCookie(LA_NameOfCookie, LA_value, LA_expiredays,LA_path) {	var LA_ExpireDate = new Date ();	LA_ExpireDate.setTime(LA_ExpireDate.getTime() + (LA_expiredays * 24 * 3600 * 1000));	document.cookie = LA_NameOfCookie + "=" + escape(LA_value) + ((LA_expiredays == null) ? "" : ";expires=" + LA_ExpireDate.toGMTString()) + ((LA_path==true) ? ";LA_path=/" : "");}function LA_DelCookie(LA_NameOfCookie) {	if (LA_GetCookie(LA_NameOfCookie))	{		document.cookie = LA_NameOfCookie + "=" +"; expires=Thu, 01-Jan-70 00:00:01 GMT";	}}function SetLACookie(LA_NameOfCookie, LA_value){	var LA_ExpireDate = new Date ();	LA_ExpireDate.setTime(LA_ExpireDate.getTime() + (3600 * 1000)); //2 hours = 2 * 3600 * 1000	document.cookie = LA_NameOfCookie + "=" + escape(LA_value) + ";expires=" + LA_ExpireDate.toGMTString() + ";LA_path=/" ;}function GetLACookie(LA_NameOfCookie){	return LA_GetCookie(LA_NameOfCookie);		}/////////////////////////////////////////////////////////////////////////////////////////// Scene Random/////////////////////////////////////////////////////////////////////////////////////////function LA_PlayRandomFromBaseName(LA_basename,LA_nummax){	//alert("LA_nummax "+LA_nummax);	LA_lastplayedNum = 1;	if(LA_GetCookie(LA_basename)==null)	{		LA_SetCookie(LA_basename,"1", 30, true);	}	else	{ 		LA_lastplayedNum = LA_GetCookie(LA_basename);	}		(LA_nummax<=1)?eval(LA_basename + "1();"):false;		if(LA_nummax==2)	{	LA_choosedNum = (LA_lastplayedNum==2)?1:2;	eval(LA_basename + LA_choosedNum + "();")	LA_SetCookie(LA_basename,LA_choosedNum, 30, true);	}		while(LA_nummax>2)	{		LA_choosedNum =Math.floor(Math.random()* LA_nummax);		if((LA_choosedNum!=LA_lastplayedNum)&&(LA_choosedNum!=0))		{			//alert("LA_choosedNum : "+LA_choosedNum);			LA_SetCookie(LA_basename,LA_choosedNum, 30, true);			eval(LA_basename + LA_choosedNum + "();");			return true;		}	}}/////////////////////////////////////////////////////////////////////////////////////////// Javascript - TextInput Class/////////////////////////////////////////////////////////////////////////////////////////function LA_TEXTINPUT(_TextInputName,_TextInputValue){	this.f_Name = _TextInputName;	this.f_Value = _TextInputValue;}/////////////////////////////////////////////////////////////////////////////////////////// Javascript - LivingActor Mapping/////////////////////////////////////////////////////////////////////////////////////////function Actor(_FlashPlugin){	this.FlashPlugin = _FlashPlugin;	this.f_BBoxMinX = 0;	this.f_BBoxMinY = 0;	this.f_BBoxMaxX = 0;	this.f_BBoxMaxY = 0;	this.f_DialogHeight = 0;	this.f_isSpeaking = false;	this.f_DRAG_X = 0;	this.f_DRAG_Y = 0;	this.scenario = new Array();	this.LA_TEXTINPUTS = new Array;	this.Data = null;	this.GetLoadStatus = LA_GenericGetLoadStatus;		//BASIC COMMANDS	this.Disable = LA_GenericDisable;	this.Enable = LA_GenericEnable;	this.GestureAtPixel = LA_GenericGestureAtPixel;	this.GestureAtScreen = LA_GenericGestureAtScreen;	this.GetBookmark = LA_GenericGetBookmark;	this.GetDialogEditText = LA_GenericGetDialogEditText;		this.GetDialogEvent = LA_GenericGetDialogEvent;	this.GetStatus = LA_GenericGetStatus;	this.Hide = LA_GenericHide;      	 	this.LoadActor	= LA_GenericLoadActor;	this.LookAtPixel = LA_GenericLookAtPixel;	this.LookAtScreen = LA_GenericLookAtScreen;	this.MenuAddItem = LA_GenericMenuAddItem;	this.MenuClear = LA_GenericMenuClear;	 	this.MenuRemoveItem = LA_GenericMenuRemoveItem;	 	this.MoveToPixel = LA_GenericMoveToPixel;	 	this.MoveToScreen = LA_GenericMoveToScreen;	this.PlaceAtFrame = LA_GenericPlaceAtFrame;	this.PlaceAtVisibleFrame = LA_GenericPlaceAtVisibleFrame;	this.PlaceAtPixel = LA_GenericPlaceAtPixel;	this.PlaceAtScreen = LA_GenericPlaceAtScreen;	this.Play = LA_GenericPlay;	 	this.PlayScenario = LA_GenericPlayScenario;	this.PlaySound = LA_GenericPlaySound;     	 	this.Resume = LA_GenericResume;	this.SetBookmark = LA_GenericSetBookmark;	this.SetDialogWidth = LA_GenericSetDialogWidth;	this.SetDialogSkin = LA_GenericSetDialogSkin;	this.SetExpression = LA_GenericSetExpression;	this.SetScale = LA_GenericSetScale;	 	this.SetTTSID = LA_GenericSetTTSID;	 	this.Show = LA_GenericShow;	this.Speak = LA_GenericSpeak;	this.Stop = LA_GenericStop; 	this.Suspend = LA_GenericSuspend;		//ADVANCED COMMANDS	this.DeleteActorPreferences = LA_GenericDeleteActorPreferences;	this.GetActorHeight = LA_GenericGetActorHeight;	 	this.GetActorPositionX = LA_GenericGetActorPositionX;	this.GetActorPositionY = LA_GenericGetActorPositionY;	this.GetActorPreference = LA_GenericGetActorPreference;	this.GetActorWidth = LA_GenericGetActorWidth;	 	this.GetAnimation = LA_GenericGetAnimation;	this.GetAnimationCount = LA_GenericGetAnimationCount;	this.GetError = LA_GenericGetError;	 	this.GetErrorCount = LA_GenericGetErrorCount;	this.GetExpression = LA_GenericGetExpression;	this.GetExpressionCount = LA_GenericGetExpressionCount;	this.GetSceneSize = LA_GenericGetSceneSize;		this.GetMaterialCount = LA_GenericGetMaterialCount;	this.GetMaterialDiffuseBlue = LA_GenericGetMaterialDiffuseBlue;	this.GetMaterialDiffuseGreen = LA_GenericGetMaterialDiffuseGreen;	this.GetMaterialDiffuseRed = LA_GenericGetMaterialDiffuseRed;	this.GetMaterial = LA_GenericGetMaterial;		this.SaveActorPreferences = LA_GenericSaveActorPreferences;	this.SetActorPreference = LA_GenericSetActorPreference;	 	this.SetCameraPosition = LA_GenericSetCameraPosition;	this.SetDialogFont = LA_GenericSetDialogFont;	this.SetImmediateScale = LA_GenericSetImmediateScale;	this.SetLightColor = LA_GenericSetLightColor;	 	this.SetLightPosition = LA_GenericSetLightPosition;	this.SetTTSInfos = LA_GenericSetTTSInfos;	this.SetTTSPitch = LA_GenericSetTTSPitch;	 	this.SetTTSSpeed = LA_GenericSetTTSSpeed;	//Utilities	this.GetIndexData = LA_GenericGetIndexData;	}/////////////////////////////////////////////////////////////////////////////////////////// LA_Generic Functions///////////////////////////////////////////////////////////////////////////////////////////BASIC COMMANDSfunction LA_GenericGetLoadStatus() {	return "";//this.LA_Plugin.Execute("GetLoaded()");}function LA_GenericDisable(LA_Toggle){	if(LA_Toggle==TOGGLE_ACTOR_DIALOG){		LA_DIALOG_VISIBILITY = false;	}	else return this.scenario.push("Disable(" + LA_Toggle + ")");}function LA_GenericEnable(LA_Toggle){	// manage at least actordialogvisible	if(LA_Toggle==TOGGLE_ACTOR_DIALOG){		LA_DIALOG_VISIBILITY = true;	}	else return this.scenario.push("Enable(" + LA_Toggle + ")");}function LA_GenericGestureAtPixel(LA_x,LA_y){	return this.scenario.push(("GestureAtPixel(" + LA_x + "," + LA_y + ")"));}function LA_GenericGestureAtScreen(LA_x,LA_y){	return this.scenario.push(("GestureAtScreen(" + LA_x + "," + LA_y + ")"));}function LA_GenericGetBookmark() {	return "";//this.LA_Plugin.Execute("GetBookmark()");}function LA_GenericGetDialogEditText(LA_name){	for (var i=0;i<ACTOR.LA_TEXTINPUTS.length;i++)	{		if (ACTOR.LA_TEXTINPUTS[i].f_Name == LA_name)		{			return ACTOR.LA_TEXTINPUTS[i].f_Value;			}	}	return "";	}function LA_GenericGetDialogEvent() {	return "";//this.LA_Plugin.Execute("GetDialogEvent()");}function LA_GenericGetStatus(){	return "";//this.LA_Plugin.Execute("GetStatus()");}function LA_GenericHide(LA_seqname){	if(LA_GenericHide.arguments.length == 1)	{		return this.scenario.push("Hide2(" +LA_seqname +" )");	}	else	{		return this.scenario.push("Hide()");	}}function LA_GenericLoadActor(ActorUrl){	return this.scenario.push("LoadActor("+ActorUrl+")");}function LA_GenericLookAtPixel(LA_x,LA_y){	return this.scenario.push(("LookAtPixel(" + LA_x +"," + LA_y +")"));}function LA_GenericLookAtScreen(LA_x,LA_y){	return this.scenario.push(("LookAtScreen(" + LA_x +"," + LA_y +")"));}function LA_GenericMenuAddItem(LA_item,LA_id){	return this.scenario.push(("MenuAddItem(" + (LA_item) + "," + (LA_id) + ")"));}function LA_GenericMenuClear(){	return this.scenario.push(("MenuClear()"));}function LA_GenericMenuRemoveItem(LA_id){	return this.scenario.push(("MenuRemoveItem("+ (LA_id) + ")"));}function LA_GenericMoveToPixel(LA_x,LA_y,speed){					if(LA_GenericMoveToPixel.arguments.length == 3)	{		return this.scenario.push(("MoveToPixel(" + LA_x + "," + LA_y + "," + speed +")"));	}	else	{		return this.scenario.push(("MoveToPixel(" + LA_x + "," + LA_y +")"));	}}function LA_GenericMoveToScreen(LA_x,LA_y,speed){	if(LA_GenericMoveToScreen.arguments.length == 2)	{		return this.scenario.push(("MoveToScreen(" + LA_x + "," + LA_y +")"));	}	else if(LA_GenericMoveToScreen.arguments.length == 3)	{		return this.scenario.push(("MoveToScreen(" + LA_x + "," + LA_y + "," + speed +")"));	}}function LA_GenericPlaceAtFrame(LA_x,LA_y){	LA_sizeOfBody =new LA_BodySize();	return this.scenario.push(("PlaceAtPixel(" + Math.floor(LA_x*LA_sizeOfBody.Width) + "," + Math.floor(LA_y*LA_sizeOfBody.Height) + ")"));	//return this.scenario.push(/*(*/"PlaceAtScreen(" + LA_x + "," + LA_y + ")")/*)*/;}function LA_GenericPlaceAtVisibleFrame(LA_x,LA_y){	LA_sizeOfWindow =new LA_WindowSize();	return this.scenario.push(("PlaceAtPixel(" + Math.floor((LA_x*LA_sizeOfWindow.Width)+LA_sizeOfWindow.ScrollLeft) + "," + Math.floor((LA_y*LA_sizeOfWindow.Height)+LA_sizeOfWindow.ScrollTop) + ")"));}function LA_GenericPlaceAtPixel(LA_x,LA_y){	return this.scenario.push(("PlaceAtPixel(" + LA_x + "," + LA_y + ")"));}function LA_GenericPlaceAtScreen(LA_x,LA_y){		//return this.scenario.push(("PlaceAtPixel(" + Math.floor(LA_x*document.body.clientWidth) + "," + Math.floor(LA_y*document.body.clientHeight) + ")"));	return this.scenario.push(/*(*/"PlaceAtScreen(" + LA_x + "," + LA_y + ")")/*)*/;}function LA_GenericPlay(LA_animation,LA_seqname){		if(LA_GenericPlay.arguments.length == 2)	{		return this.scenario.push("Play2("  + LA_animation + "," + LA_seqname+ ")");	}	else	{		return this.scenario.push("Play("  + LA_animation + ")");	}}function LA_GenericPlayScenario(LA_TextToScript){	return this.scenario.push("PlayScenario(" + LA_TextToScript + ")");}function LA_GenericPlaySound(LA_awave){	return this.scenario.push("PlaySound(" + LA_awave + ")");}function LA_GenericResume(){	return this.scenario.push("Resume()");	}function LA_GenericSetBookmark(LA_x){	return this.scenario.push(("SetBookmark(" + LA_x + ")"));}function LA_GenericSetDialogWidth(LA_lineWidth){	return this.scenario.push("SetDialogWidth(" + LA_lineWidth + ")");}function LA_GenericSetDialogSkin(LA_skinName){	return this.scenario.push("SetDialogSkin(" + LA_skinName + ")");}function LA_GenericSetExpression(LA_exp,LA_t){	if(LA_GenericSetExpression.arguments.length == 2)	{		return this.scenario.push("SetExpression(" + LA_exp + "," +LA_GenericSetExpression.arguments[1]+ ")");	}	else	{		return this.scenario.push("SetExpression(" + LA_exp + ")");	}}function LA_GenericSetScale(LA_x,LA_t){	if(LA_GenericSetScale.arguments.length == 1)	{		return this.scenario.push("SetScale(" + LA_x + ")");		}	else	if(LA_GenericSetScale.arguments.length == 2)		{		return this.scenario.push("SetScale(" + LA_x + "," + LA_t +")");	}}function LA_GenericSetTTSID(LA_anID){	return "";//this.LA_Plugin.Execute("SetTTSID(" +LA_anID+")");}function LA_GenericShow(LA_seqname){	if(LA_GenericShow.arguments.length == 1)	{		return this.scenario.push("Show2(" +LA_seqname + ")");	}	else	{		return this.scenario.push("Show()");	}}function LA_GenericSpeak(LA_sentence){	this.LA_TEXTINPUTS = new Array;	return this.scenario.push('Speak("' + LA_sentence  + '")');}function LA_GenericStop(){	return this.scenario.push("Stop()");}function LA_GenericSuspend(LA_second){	return this.scenario.push("Suspend(" + LA_second + ")");	}//ADVANCED COMMANDSfunction LA_GenericDeleteActorPreferences(){	return "";//this.scenario.push("DeleteActorPreferences()");}function LA_GenericGetActorHeight(){	return "";//this.LA_Plugin.Execute("GetActorHeight()");}function LA_GenericGetActorPositionX(){	return "";//this.LA_Plugin.Execute("GetActorPositionX()");}function LA_GenericGetActorPositionY(){	return "";//this.LA_Plugin.Execute("GetActorPositionY()");}function LA_GenericGetActorPreference(LA_type,LA_name){	return "";//this.LA_Plugin.Execute("GetActorPreference(" + LA_type+" ," +LA_name+" ," + ")");}function LA_GenericGetActorWidth(){	return "";//this.LA_Plugin.Execute("GetActorWidth()");}function LA_GenericGetAnimation(LA_ind){	LA_first= this.GetIndexData("ANIMATIONS")+1; // our first index is the number after "animations"	return this.Data[LA_ind + LA_first];}function LA_GenericGetAnimationCount(){	LA_first= this.GetIndexData("ANIMATIONS");	LA_last=this.GetIndexData("ENDANIMATIONS");	if((LA_first!=-1)&&(LA_last!=-1)){		return LA_last-LA_first;	}}function LA_GenericGetError(LA_num){	return this.scenario.push("GetError(LA_num)");}function LA_GenericGetErrorCount(){	return this.scenario.push("GetErrorCount()");}function LA_GenericGetExpression(LA_ind){	return this.scenario.push("GetExpression(" + LA_ind + ")");}function LA_GenericGetExpressionCount(){	return this.scenario.push("GetExpressionCount()");}function LA_GenericGetMaterialCount(){	return "";//this.LA_Plugin.Execute("GetMaterialCount()");}function LA_GenericGetMaterialDiffuseBlue(LA_name){	return "";//this.LA_Plugin.Execute("GetMaterialDiffuseBlue(" + LA_name + ")");}function LA_GenericGetMaterialDiffuseGreen(LA_name){	return "";//this.LA_Plugin.Execute("GetMaterialDiffuseGreen(" + LA_name + ")");}function LA_GenericGetMaterialDiffuseRed(LA_name){	return "";//this.LA_Plugin.Execute("GetMaterialDiffuseRed(" + LA_name + ")");}function LA_GenericGetMaterial(LA_num){	return "";//this.LA_Plugin.Execute("GetMaterial(LA_num)");}function LA_GenericGetSceneSize(){}function LA_GenericSaveActorPreferences(){	return "";//this.LA_Plugin.Execute("SaveActorPreferences()");}function LA_GenericSetActorPreference(LA_type,LA_name,LA_value) {	       	var tosend = "SetActorPreference(" +  (LA_type) +"," + (LA_name)+"," + "\"" +(LA_value)+"\"" +")" ;	return "";//this.LA_Plugin.Execute(tosend);}function LA_GenericSetCameraPosition(LA_x,LA_y,z){	return "";//this.LA_Plugin.Execute("SetCameraPosition(" + LA_x+"," +LA_y+","+z+")");}function LA_GenericSetDialogFont(LA_fontName){	return "";//this.LA_Plugin.Execute("SetDialogFont(" + LA_fontName + ")");}function LA_GenericSetImmediateScale(LA_x){	return "";//this.LA_Plugin.Execute(("SetImmediateScale(" + LA_x + ")"));}function LA_GenericSetLightColor(LA_x,LA_y,z){	return "";//this.LA_Plugin.Execute("SetLightColor("+LA_x+","+ LA_y+","+ z+")");}function LA_GenericSetLightPosition(LA_x,LA_y,z){	return "";//this.LA_Plugin.Execute("SetLightPosition("+LA_x+","+ LA_y+","+ z+")");}function LA_GenericSetTTSInfos(LA_gender,LA_language){	return "";//this.LA_Plugin.Execute("SetTTSInfos("+LA_gender+","+LA_language+")");}function LA_GenericSetTTSPitch(LA_val){//	return this.LA_Plugin.Execute("SetTTSPitch(" + LA_val + ")");	return "";//this.LA_Plugin.Execute("SET_TTS_PITCH(" + LA_val + ")");}function LA_GenericSetTTSSpeed(LA_val){//	return this.LA_Plugin.Execute("SetTTSSpeed(" + LA_val + ")");	return "";//this.LA_Plugin.Execute("SET_TTS_SPEED(" + LA_val + ")");}function LA_GenericGetStatus(){	return "";//this.LA_Plugin.Execute("GetStatus()");}//     ----------------------   // LA Position lib// -------------------------function LA_findPagePos(obj){	objLeft=LA_ObjPosition_getPageOffsetLeft(obj);	objTop=LA_ObjPosition_getPageOffsetTop(obj);	return [objLeft,objTop];}function LA_ObjPosition_getPageOffsetLeft(el){	var ol=el.offsetLeft;	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }	return ol;}function LA_ObjPosition_getPageOffsetTop(el){	var ot=el.offsetTop;	while((el=el.offsetParent) != null) { ot += el.offsetTop; }	return ot;}function LA_FindObjectInWindow(objname){	object=(document.getElementById(objname)!=null)?document.getElementById(objname):null;	if(object==null)document.objname;	return object;}function LA_AlignToHTMLObject(objname,alignH,offsetH,alignV,offsetV,oldtype){	object=LA_FindObjectInWindow(objname);	if(object)	{		objX=LA_findPagePos(object)[0];		objY=LA_findPagePos(object)[1];		objW=object.offsetWidth;		objH=object.offsetHeight;			LayerW = document.getElementById('LA_ActorLayer').offsetWidth;		LayerH = document.getElementById('LA_ActorLayer').offsetHeight; //alert("objname:"+objname+  " ,objX:" + objX + ",objY:" + objY + ",objW:" + objW + ",objH:" + objH + ",LayerW:" + LayerW + ",LayerH:" + LayerH );				if(alignH=="LEFT")		{		resX = objX - (LayerW/2) - offsetH;		}		else if(alignH=="RIGHT")		{  			resX = objX + objW + (LayerW/2) + offsetH; 				}		else if(alignH=="MIDDLE")		{  			resX = objX + (objW/2) + offsetH; 				}				if(alignV=="TOP")		{		resY = objY - offsetV;		}		else if(alignV=="BOTTOM")		{		resY = objY + objH + LayerH + offsetV		}		else if(alignV=="MIDDLE")		{		resY = objY + (objH/2) + (LayerH/2) + offsetV;		}				//PlaceActor		//alert("ACTOR.X:"+resX+"|ACTOR.Y:"+resY);		stringtodo= "ACTOR.PlaceAtPixel(" + resX + "," + resY + ");";		eval(stringtodo);	}	else return false;}function LA_CenterDocumentOnHTMLObject(objname){	object=LA_FindObjectInWindow(objname);	if(object)	{		//if(object.offsetLeft==0 || object.offsetTop==0)		//{		//	setTimeout("centerOnObject('"+objname+"')",300);		//}		//else		//{			objY=LA_findPagePos(object)[1];			sizeOfWindow =new LA_WindowSize();			deltaY=objY-(sizeOfWindow.Height/2);			window.scrollTo(1,deltaY);		//}	}	else return false;}// ACTOR UTILITIESfunction LA_GenericGetIndexData(aName){	for(i in this.Data){		if(this.Data[i]==aName){			return i;		}	}	return -1;}// start the check objects ready loop.LA_Check_Objects_Ready_Loop();