// Reyco2.js JavaScript (REYCO2.HTM)
//
// LA APLICACION SPLASH REYCOMOTOR -Portada Página WEB- CONFIGURA 4 ZONAS DIFERENCIADAS, A SABER:
// ZONA CENTRAL QUE PRESENTA EL LOGO DE REYCO
// ZONA CENTRAL (PARTE INFERIOR BAJO EL LOGO) SE CONFIGURAN TEXTOS (BIEN MEDIANTE UNA ANIMACION
// TIPO GIF ANIMADO O MEDIANTE SPRITECONTROL -Animación Sprite-)
// ZONA IZQUIERDA EN LA QUE SE REPRESENTA UN OBJETO ANIMADO 3D -DIRECTX- QUE SE SELECCIONA DE
// MODO RANDOMIZADO DE ENTRE 120 ARCHIVOS DE ARQUITECTURA 3D .X-FILE
// ZONA DERECHA EN LA QUE SE CONFIGURA UN SPLASH ESTATICO DE 4 IMAGENES SELECCIONADAS DE
// MODO RANDOMIZADO DE CATALOGO 36 ICONOS -FOLDER APLICA-
// LA CONFIGURACION DE LA PAGINA, INCLUYENDO LAS POSIBILIDADES DE REPRESENTACION POSIBLES DEL
// SPLASH ESTATICO (1.413.720 combinaciones posibles) Y LA SELECCION RANDOMIZADA DE LOS
// OBJETOS 3D (121 posibilidades) ARROJAN 171060120 POSIBILIDADES DE PRESENTACION DIFERENTES
//
// Programación de Control Microsoft DirectAnimation: REYCOMOTOR Reyco2.htm Application
//
// Integración de animación de objetos incluidos en archivo de geometría xFile
// El conjunto de figuras geométricas se desplazan sobre la aplicación de acuerdo a las dimensiones
// del control de la animación
// 
// El objeto DirectAnimation responde a eventos del ratón (ver añadiendo reactividad changeRATE)
// Haciendo clic sobre el control DirectAnimation se detiene el movimiento horizontal.
// DirectAnimation -> DAControl.MeterLibrary.DANumber(= 0) (movimiento de objeto se detiene)
// Al volver a hacer clic se re-inicia el movimiento horizontal 
// DirectAnimation -> DAControl.MeterLibrary.DANumber(> 0) (objeto con movimiento)
//
// Archivos de geometría: varFile=NameFile.x
// DIRECTX FILE FORMAT ARCHITECTURE
// This x-file has been created by Carlos Baztán
// 3D Development © 2004 TAESAVision Multimedia - Carlos Baztán
// REYCOMOTOR Application
//
//
function AnimaData() {
	// Programación de velocidades de desplazamiento y valores de renderizado de cámara
	// relativos a la configuración del objeto 3D que se seleccionará de la biblioteca de
	// arquitectura 3D de modo randomizado
	// Se añade reactividad al objeto con el fin de responder ante eventos del ratón
	// Se programan valores de ajuste de velocidad de desplazamiento horizontal como respuesta
	// a eventos del ratón (haciendo clic se detiene el movimiento de desplazamiento horizontal)
	// Speed1 parámetro de ajuste inicial (desplazamiento positivo)
	// Speed2 parámetro de ajuste tras hacer clic en el objeto (no existe desplazamiento)
	// El sentido de giro se puede configurar con valor Speed1 positivo o negativo
	// Valor Speed1 (positivo = sentido contrario agujas reloj) (negativo = sentido agujas reloj) (cero = stop -evento ratón-)
	// En la aplicación se configuran valores positivos y su valor puede ser modificado de
	// acuerdo al objeto 3D seleccionado para el optimizado de la presentación
	Speed1 = 0.6;
	Speed2 = 0;
	// Parámetros ajuste de cámara (perspective camera)
	// Estos parámetros se utilizan para realizar el ajuste y escalado (renderizado) de cámara
	// Los valores de éstos parámetros solamente se modifican en aquellos archivos 3D que
	// requieren una configuración de renderizado diferente
	// Valores por defecto: Param1 = Param2 = 30;
	Param1 = 30;
	//
	// Se importa archivo de geometría (3D DIRECTX FILE FORMAT ARCHITECTURE) de modo randomizado
	imgBase = "Geomet\\";
	FileSel = Math.random();		// Returns value 0...1
	FileSel = 1 + (120 * FileSel);		// if (random=0 FileSel=1) (random=1 FileSel=121);
	FileSel = Math.round(FileSel);		// returns value 1...121
        if (FileSel == 1) {
		FileID = "001";
		Param1 = 66;
		varFile = "Object.x";	//Composed Objects and Kitset Logo
	}
        if (FileSel == 2) {
		FileID = "002";
		Param1 = 28;
		varFile = "Gears.x";	//Gears Geometry
	}
        if (FileSel == 3) {
		FileID = "003";
		Param1 = 26;
		varFile = "Crank.x";	//Crankshaft
	}
        if (FileSel == 4) {
		FileID = "004";
		varFile = "Valve.x";	//Valve - GuideValve
	}
        if (FileSel == 5) {
		FileID = "005";
		varFile = "Piston.x";	//Piston and conrod
	}
        if (FileSel == 6) {
		FileID = "006";
		Param1 = 26;
		varFile = "Sleeve.x";	//Sleeve - Cylinder Liner
	}
        if (FileSel == 7) {
		FileID = "007";
		varFile = "Glow.x";	//GlowPlug
	}
        if (FileSel == 8) {
		FileID = "008";
		varFile = "Rings.x";	//Piston Rings
	}
        if (FileSel == 9) {
		FileID = "009";
		Param1 = 26;
		varFile = "Bearings.x";	//Engine Bearings
	}
        if (FileSel == 10) {
		FileID = "010";
		varFile = "Shock.x";	//Shock Absorber
	}
        if (FileSel == 11) {
		FileID = "011";
		Param1 = 28;
		varFile = "Filter.x";	//Filters
	}
        if (FileSel == 12) {
		FileID = "012";
		Param1 = 26;
		varFile = "Pack.x";	//Can & Tube
	}
        if (FileSel == 13) {
		FileID = "013";
		Param1 = 24;
		varFile = "Seal.x";	//Oil Seals
	}
        if (FileSel == 14) {
		FileID = "014";
		Param1 = 24;
		varFile = "Nozzle.x";	//Fuel Injection Nozzles
	}
        if (FileSel == 15) {
		FileID = "015";
		Param1 = 28;
		varFile = "Brake.x";	//Brake System
	}
        if (FileSel == 16) {
		FileID = "016";
		Param1 = 28;
		varFile = "Gasket.x";	//Cylinder Head Gasket (1 cyl Truck)
	}
        if (FileSel == 17) {
		FileID = "017";
		varFile = "Tierod.x";	//Tie Rod
	}
        if (FileSel == 18) {
		FileID = "018";
		varFile = "Tierod1.x";	//Tie Rod -I- Link
	}
        if (FileSel == 19) {
		FileID = "019";
		varFile = "Spark.x";	//Spark Plug
	}
        if (FileSel == 20) {
		FileID = "020";
		Param1 = 28;
		varFile = "Wheel.x";	//Flywheel
	}
        if (FileSel == 21) {
		FileID = "021";
		varFile = "Cams.x";	//Camshaft
	}
        if (FileSel == 22) {
		FileID = "022";
		Param1 = 26;
		varFile = "Timing.x";	//Timing Components
	}
        if (FileSel == 23) {
		FileID = "023";
		Param1 = 28;
		varFile = "Gasket1.x";	//Gasket (Cylinder Head) 2 Holes
	}
        if (FileSel == 24) {
		FileID = "024";
		varFile = "Gasket2.x";	//Gasket + Ass'y Tube
	}
        if (FileSel == 25) {
		FileID = "025";
		varFile = "Gasket3.x";	//Metal Gasket - Exhaust 2 holes
	}
        if (FileSel == 26) {
		FileID = "026";
		Param1 = 28;
		varFile = "Gasket4.x";	//Metal-Elastomer Gasket
	}
        if (FileSel == 27) {
		FileID = "027";
		varFile = "Gasket5.x";	//Special Gasket Ass'y (Metal with 2 gaskets)
	}
        if (FileSel == 28) {
		FileID = "028";
		Param1 = 28;
		varFile = "Module.x";	//Crankcase + Gasket
	}
        if (FileSel == 29) {
		FileID = "029";
		varFile = "Gasket6.x";	//Elastomer Gasket (4 holes)
	}
        if (FileSel == 30) {
		FileID = "030";
		Param1 = 28;
		varFile = "Module1.x";	//Engine Module (Cap_Head)
	}
        if (FileSel == 31) {
		FileID = "031";
		Param1 = 26;
		varFile = "Engblock.x";	//Engine block
	}
        if (FileSel == 32) {
		FileID = "032";
		Param1 = 28;
		varFile = "Cylhead.x";	//Cylinder head
	}
        if (FileSel == 33) {
		FileID = "033";
		varFile = "Module2.x";	//Elrotherm Heat_Shield Module
	}
        if (FileSel == 34) {
		FileID = "034";
		Param1 = 26;
		varFile = "Piston1.x";	//Piston Ass'y
	}
        if (FileSel == 35) {
		FileID = "035";
		Param1 = 26;
		varFile = "Sleeve1.x";	//Finned Cylinder Liner
	}
        if (FileSel == 36) {
		FileID = "036";
		Param1 = 28;
		varFile = "Airfilt.x";	//Air Filter (Round)
	}
        if (FileSel == 37) {
		FileID = "037";
		Param1 = 28;
		varFile = "Airfilt1.x";	//Air Filter (Rectangular)
	}
        if (FileSel == 38) {
		FileID = "038";
		Param1 = 28;
		varFile = "Seal1.x";	//Valve Seal
	}
        if (FileSel == 39) {
		FileID = "039";
		varFile = "Wire.x";	//Ignition Lead (Electrical Wire)
	}
        if (FileSel == 40) {
		FileID = "040";
		Param1 = 26;
		varFile = "Filter1.x";	//Oil Filter Hengst Filterwerke
	}
        if (FileSel == 41) {
		FileID = "041";
		Param1 = 26;
		varFile = "Pump.x";	//Water Pump
	}
        if (FileSel == 42) {
		FileID = "042";
		Param1 = 26;
		varFile = "Fan.x";	//Fan Engine (7 blades)
	}
        if (FileSel == 43) {
		FileID = "043";
		varFile = "Spark1.x";	//Industrial Spark Plug
	}
        if (FileSel == 44) {
		FileID = "044";
		Param1 = 28;
		varFile = "Susp.x";	//Pneumatic Suspension
	}
        if (FileSel == 45) {
		FileID = "045";
		Param1 = 24;
		varFile = "Clutche.x";	//Clutche Disc (1)
	}
        if (FileSel == 46) {
		FileID = "046";
		Param1 = 24;
		varFile = "Brake1.x";	//Brake system (clamp yellow)
	}
        if (FileSel == 47) {
		FileID = "047";
		Param1 = 24;
		varFile = "Brake2.x";	//Brake system (clamp red)
	}
        if (FileSel == 48) {
		FileID = "048";
		Param1 = 24;
		varFile = "Clutche1.x";	//Cover Clutche
	}
        if (FileSel == 49) {
		FileID = "049";
		Param1 = 50;
		varFile = "Collect.x";	//Admission System
	}
        if (FileSel == 50) {
		FileID = "050";
		Param1 = 26;
		varFile = "Vanos.x";	//BMW Timing system
	}
        if (FileSel == 51) {
		FileID = "051";
		Param1 = 26;
		varFile = "Fan1.x";	//Fan Engine (11 blades)
	}
        if (FileSel == 52) {
		FileID = "052";
		Param1 = 26;
		varFile = "Gearpump.x";	//Gear Pump (Oil...)
	}
        if (FileSel == 53) {
		FileID = "053";
		Param1 = 29;
		varFile = "Rings1.x";	//Piston Rings -Packaging-
	}
        if (FileSel == 54) {
		FileID = "054";
		Param1 = 24;
		varFile = "Crank1.x";	//Crankshaft
	}
        if (FileSel == 55) {
		FileID = "055";
		Param1 = 20;
		varFile = "Compr.x";	//Volkswagen G Compressor
	}
        if (FileSel == 56) {
		FileID = "056";
		Param1 = 26;
		varFile = "Kompres.x";	//Mercedes-Benz C230 Roots Kompressor
	}
        if (FileSel == 57) {
		FileID = "057";
		Param1 = 26;
		varFile = "Steer.x";	//Rack and Pinion Steering Gears
	}
        if (FileSel == 58) {
		FileID = "058";
		Param1 = 28;
		varFile = "Support.x";	//Back Sub-chassis (Citroën ZX)
	}
        if (FileSel == 59) {
		FileID = "059";
		Param1 = 28;
		varFile = "Shock1.x";	//Shock Absorber (Nivomat)
	}
        if (FileSel == 60) {
		FileID = "060";
		Param1 = 28;
		varFile = "Shock2.x";	//Shock Absorber (Pro-Gas Power)
	}
        if (FileSel == 61) {
		FileID = "061";
		Param1 = 28;
		varFile = "Exhaust.x";	//Exhaust (2 tubes)
	}
        if (FileSel == 62) {
		FileID = "062";
		Param1 = 40;
		varFile = "Wheel1.x";	//Wheel (5 radiuses)
	}
        if (FileSel == 63) {
		FileID = "063";
		Param1 = 26;
		varFile = "Turbo.x";	//Turbocharger (compressor)
	}
        if (FileSel == 64) {
		FileID = "064";
		Speed1 = 0.3;
		Param1 = 26;
		varFile = "Filter2.x";	//Air Filter -I- (including housing)
	}
        if (FileSel == 65) {
		FileID = "065";
		Param1 = 26;
		varFile = "Filter3.x";	//Air Filter -II- (including housing)
	}
        if (FileSel == 66) {
		FileID = "066";
		Param1 = 60;
		varFile = "Fanx.x";	//Fan 4-Blades (Transparency)
	}
        if (FileSel == 67) {
		FileID = "067";
		Param1 = 36;
		varFile = "Intcool.x";	//Intercooler (air/air)
	}
        if (FileSel == 68) {
		FileID = "068";
		Param1 = 34;
		varFile = "Battery.x";	//Battery
	}
        if (FileSel == 69) {
		FileID = "069";
		Param1 = 24;
		varFile = "Powsteer.x";	//Power Steering (Ford Focus)
	}
        if (FileSel == 70) {
		FileID = "070";
		Param1 = 40;
		varFile = "Clutche2.x";	//Clutche Disc (2)
	}
        if (FileSel == 71) {
		FileID = "071";
		Param1 = 36;
		varFile = "Wheel2.x";	//FlyWheel -Volante- and Instruments
	}
        if (FileSel == 72) {
		FileID = "072";
		Param1 = 46;
		varFile = "Module3.x";	//Crankcase and Gasket (M-TECHNIC BMW M5 V10)
	}
        if (FileSel == 73) {
		FileID = "073";
		varFile = "Link.x";	//Link -BMW Chassis Parts-
	}
        if (FileSel == 74) {
		FileID = "074";
		Param1 = 40;
		varFile = "Axle.x";	//Front Axle (Ford Fiesta)
	}
          if (FileSel == 75) {
		FileID = "075";
		Param1 = 46;
		varFile = "Link1.x";	//Rear Axle (BMW Multi-Arm System)
	}
        if (FileSel == 76) {
		FileID = "076";
		Param1 = 54;
		varFile = "Engbear.x";	//Engine Bearings -II-
	}
        if (FileSel == 77) {
		FileID = "077";
		Param1 = 20;
		varFile = "Pads.x";	//Brake Pads (Ferodo DSPP Performance)
	}
        if (FileSel == 78) {
		FileID = "078";
		Param1 = 34;
		varFile = "Pads1.x";	//Brake Pads
	}
        if (FileSel == 79) {
		FileID = "079";
		Param1 = 46;
		varFile = "Link2.x";	//Link (Chassis Component)
	}
        if (FileSel == 80) {
		FileID = "080";
		Param1 = 28;
		varFile = "Shoes.x";	//Drum Brake Shoes
	}
        if (FileSel == 81) {
		FileID = "081";
		Param1 = 40;
		varFile = "Support1.x";	//Shock Absorber and Link Support
	}
        if (FileSel == 82) {
		FileID = "082";
		Param1 = 28;
		varFile = "Support2.x";	//Fork Support Link (Chassis Suspension Component)
	}
        if (FileSel == 83) {
		FileID = "083";
		Param1 = 42;
		varFile = "Support3.x";	//Support Link MB Actros Truck (Chassis Component)
	}
        if (FileSel == 84) {
		FileID = "084";
		Param1 = 44;
		varFile = "Plate.x";	//Plate Spring Assembly MB Actros Truck
	}
        if (FileSel == 85) {
		FileID = "085";
		Speed1 = 0.3;
		Param1 = 40;
		varFile = "Filter4.x";	//Oil Filter -II- Hengst Filterwerke
	}
        if (FileSel == 86) {
		FileID = "086";
		Param1 = 28;
		varFile = "Engbear1.x";	//Flange and Shell Engine Bearings
	}
        if (FileSel == 87) {
		FileID = "087";
		Param1 = 60;
		varFile = "Conrod.x";	//Connecting Rod
	}
        if (FileSel == 88) {
		FileID = "088";
		Param1 = 24;
		varFile = "Brake3.x";	//Brake Disc High Performance
	}
        if (FileSel == 89) {
		FileID = "089";
		varFile = "Drum.x";	//Drum Brake
	}
        if (FileSel == 90) {
		FileID = "090";
		Param1 = 38;
		varFile = "Susp1.x";	//Rear Multi-Arm (Lower Link-Arm and spring -Peugeot-)
	}
        if (FileSel == 91) {
		FileID = "091";
		Param1 = 46;
		varFile = "Support4.x";	//Rear Link-Bar Support (Audi Volkswagen)
	}
        if (FileSel == 92) {
		FileID = "092";
		Param1 = 28;
		varFile = "Axle1.x";	//Axle Audi S4
	}
        if (FileSel == 93) {
		FileID = "093";
		Param1 = 36;
		varFile = "Common.x";	//Common Rail TDCI
	}
        if (FileSel == 94) {
		FileID = "094";
		varFile = "Inject.x";	//Injector-Pump (Bosch EDC System)
	}
        if (FileSel == 95) {
		FileID = "095";
		varFile = "Kitset.x";	//Piston (transparency) and Kitset Logo
	}
        if (FileSel == 96) {
		FileID = "096";
		Param1 = 28;
		varFile = "Inject1.x";	//Injector with microscopic disc (Bosch system)
	}
        if (FileSel == 97) {
		FileID = "097";
		Param1 = 32;
		varFile = "Piston2.x";	//Piston and 3-valves
	}
        if (FileSel == 98) {
		FileID = "098";
		Param1 = 34;
		varFile = "Gaskit.x";	//Cylinder Head Gasket (MB Truck) -Gasket.x- with Kitset Logo
	}
        if (FileSel == 99) {
		FileID = "099";
		Param1 = 34;
		varFile = "Ringkit.x";	//Piston Rings -Rings.x- Geometry with Kitset Logo
	}
        if (FileSel == 100) {
		FileID = "100";
		varFile = "Intcool1.x";	//Intercooler Audi S4 Engine
	}
        if (FileSel == 101) {
		FileID = "101";
		Param1 = 36;
		varFile = "Chemical.x";	//Drums Chemical Products - Kitset Logo
	}
        if (FileSel == 102) {
                FileID = "102";
		Param1 = 32;
		varFile = "Belt.x";	//Belt and Timing Kit
	}
        if (FileSel == 103) {
		FileID = "103";
		Speed1 = 0.3;
		Param1 = 50;
		varFile = "Refrig1.x";	//Refrigerant Fluid Kitset (pink color)
	}
        if (FileSel == 104) {
		FileID = "104";
		Speed1 = 0.3;
		Param1 = 50;
		varFile = "Refrig2.x";	//Refrigerant Fluid Kitset (yellow color)
	}
        if (FileSel == 105) {
                FileID = "105";
		Speed1 = 0.3;
		Param1 = 50;
		varFile = "Refrig3.x";	//Refrigerant Fluid Kitset (blue color)
	}
        if (FileSel == 106) {
                FileID = "106";
		Param1 = 36;
		varFile = "Oilkit.x";	//Motor Oil Kitset
	}
        if (FileSel == 107) {
                FileID = "107";
		Param1 = 46;
		varFile = "Rings2.x";	//Piston Rings -Packaging- Kitset
	}
        if (FileSel == 108) {
		FileID = "108";
		Param1 = 34;
		varFile = "Piston3.x";	//Piston (domed head)
	}
        if (FileSel == 109) {
		FileID = "109";
		Param1 = 34;
		varFile = "Piston4.x";	//Piston (legs - no chamber)
	}
        if (FileSel == 110) {
                FileID = "110";
		Param1 = 38;
		varFile = "Piston5.x";	//Exploded view of piston (chamber)
	}
        if (FileSel == 111) {
                FileID = "111";
		Param1 = 50;
		varFile = "Assy.x";	//Assembly V-Engine (2 Pistons with conrods) Kitset
	}
        if (FileSel == 112) {
                FileID = "112";
		Param1 = 54;
		varFile = "Engbear2.x";	//Engine Bearings -Engbear.x- Kitset
	}
        if (FileSel == 113) {
		FileID = "113";
		Param1 = 44;
		varFile = "Piston6.x";	//Exploded View of Piston Assy
	}
        if (FileSel == 114) {
                FileID = "114";
		Param1 = 44;
		varFile = "Assy1.x";	//Assembly Engine-Line (2 Pistons with conrods) Kitset
	}
        if (FileSel == 115) {
                FileID = "115";
		Param1 = 36;
		varFile = "Guides.x";	//Valve Guides and Seat
	}
        if (FileSel == 116) {
                FileID = "116";
		Param1 = 40;
		varFile = "Tire.x";	//Tire - Wheel (3 radiuses)
	}
        if (FileSel == 117) {
                FileID = "117";
		Param1 = 40;
		varFile = "Tire1.x";	//Tire - Wheel (not radiuses)
	}
        if (FileSel == 118) {
                FileID = "118";
		Param1 = 32;
		varFile = "Bulb.x";	//Halogen Bulb
	}
        if (FileSel == 119) {
                FileID = "119";
		Param1 = 45;
		varFile = "Electr.x";	//Electrical Engine
	}
        if (FileSel == 120) {
                FileID = "120";
		Param1 = 25;
		varFile = "Spark2.x";	//Spark Plug Exploded View
	}
        if (FileSel == 121) {
                FileID = "121";
		varFile = "Bulb1.x";	//H4 Bulb
	}
	//
	// Configuración en pantalla del texto identificador del archivo 3D
	document.all.Ident.innerText = FileID;
	document.all.Ident.style.visibility = 'visible';
	//
	// Creación y visualización del control DirectAnimation
	document.all.ControlAnim.insertAdjacentHTML("beforeEnd",'<OBJECT ID="DAControl" WIDTH="450" HEIGHT="400" CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D"></OBJECT>');
	document.all.ControlAnim.style.visibility = 'visible';
	//
	// Se configura la librería de DirectAnimation en modo valor metros
	mReyco = DAControl.MeterLibrary;
	//
	// Creación o inicialización de objeto ActiveXObject
	changeRATE = new ActiveXObject("DirectAnimation.DANumber");
	//
	changeRATE.Init(mReyco.Until(mReyco.DANumber(Speed1), mReyco.LeftButtonDown, mReyco.Until(mReyco.DANumber(Speed2), mReyco.LeftButtonDown, changeRATE)));
	//
	// Configuración parámetros de renderizado
	Param2 = Param1;
	// Configuración archivo 3D seleccionado
	varFile = imgBase + varFile;
	// Checking the 3D X-File selected in random mode from library
	// window.alert(varFile + " - " + FileSel);
	geom = mReyco.ImportGeometry(varFile);
	// No se importa archivo de imagen GIF para aplicar textura en objeto
	//
	// Programación de punto de luz y direccionado de la luz
	// La luz radia en todas las direcciones desde el foco del punto 0.1
	pLight = mReyco.PointLight.Transform(mReyco.Translate3(0,0,3));
	dLight = mReyco.DirectionalLight.Transform(mReyco.Rotate3(mReyco.YVector3, 0.1));
	//
	// Manipulación de la geometría (Escalado del tamaño del objeto)
	// Este parámetro determinará la dimensión de visualización del objeto y debe ajustarse 
	// con el fin de adecuar el tamaño del objeto a la dimensión programa dentro de la pantalla
	valScale = 0.45;
	geom = geom.Transform(mReyco.Scale3Uniform(valScale));
	//
	// Programación de movimientos de traslación y rotación
	// Los valores RotSpeed son factores determinantes de la velocidad de rotación
	// Los valores para ejes x,y,z programados en Translate3, determinan el área donde se
	// desplaza el objeto
	RotSpeed1 = 7;
	RotSpeed2 = 0.05;
	srate = mReyco.Mul(mReyco.LocalTime, mReyco.DANumber(RotSpeed1));
	objReyco = geom.Transform(mReyco.Compose3(mReyco.Translate3(0.1, 0.2, 0.4), mReyco.Rotate3Anim(mReyco.Vector3(1, 1, 1), mReyco.Mul(mReyco.DANumber(RotSpeed2), srate))));
	//
	// A continuación, se realiza el trabajo final de preparación sobre el modelo
	// La creación del objeto acorde a la variable asignada objReyco, se utiliza para configurar
	// la variable correspondiente a la geometría final (finalgeom)
	finalgeom = objReyco;
	//
	// Dentro del trabajo final de preparación sobre el modelo, se ajusta la cámara
	Camera = mReyco.PerspectiveCamera(5,4).Transform(mReyco.Scale3(Param1, Param2, 1));
	//
	// Configuración de la rotación completa de la imagen y del punto de luz
	finalgeom = finalgeom.Transform(mReyco.Rotate3Anim(mReyco.YVector3, mReyco.Integral(changeRATE)));
	finalgeom = mReyco.UnionGeometry(finalgeom, pLight);
	//
	// Renderizado y visualización de la imagen
	DAControl.Image = finalgeom.Render(Camera);
	//
	// Inicio de la animación una vez configurados todos los parámetros y renderizado cámara
	DAControl.Start();
	// Finalizada la configuración de la animación DirectAnimation 3D Architecture .xFiles
	//
	// ------ CONFIGURACION DE TEXTOS BANNER
	// Configuración Textos Aplicación (Se implementan dos posibles soluciones, y se programará
	// aquella solución que aparentemente produzca menor consumo de recursos del PC)
	//
	//Solución 1: Integración de una imagen .gif animada (Banner.gif)
	document.all.Titles.innerHTML = "<center><img src=Images/Banner.gif width=500 height=34 Border=0></center>";
	//
	//Solución 2: Configuración de SpriteControl para controlar frames de imagen Title.gif
	//document.all.Titles.insertAdjacentHTML("beforeEnd",'<CENTER><OBJECT ID="Banner" WIDTH="483" HEIGHT="34" CLASSID ="CLSID:FD179533-D86E-11d0-89D6-00A0C90833E6"><PARAM NAME="Repeat" VALUE="-1"><PARAM NAME="PlayRate" VALUE="0.05"><PARAM NAME="NumFrames" VALUE="17"><PARAM NAME="NumFramesAcross" VALUE="1"><PARAM NAME="NumFramesDown" VALUE="17"><PARAM NAME="SourceURL" VALUE="Images/Title.gif"><PARAM NAME="MouseEventsEnabled" VALUE="False"><PARAM NAME="AutoStart" VALUE="1"><PARAM NAME="UseColorKey" VALUE="1"><PARAM NAME="ColorKey" VALUE="255,255,255"></OBJECT></CENTER>');
	//document.all.Banner.Play();
	//
	//Visualización de textos en documento (acorde a Solución 1 ó 2)
	document.all.Titles.style.visibility = 'visible';
	//
	// ------ VISUALIZACION SPLASH 4 IMAGENES FUNCION DETIMAG
	//Visualización de 4 imágenes iconizadas cuyos archivos se encuentran en Folder Aplica
	DetImag();
}

var dataCheck = 0;
var varAssign = 0;
DataImg = new Array();

function DetImag() {
	// Visualización de 4 imágenes iconizadas cuyos archivos se encuentran en Folder Aplica
	// En función VisualImg se determinan de modo aleatorio (randomizado) las 4 imágenes
	// que se configurarán en el Splash de presentación.
	// Los 4 datos se recopilarán en una Matriz tipo Array y se corresponderán con
	// DataImg(Imagen en Pos1, Imagen en Pos2, Imagen en Pos3, Imagen en Pos4)
	// El programa se basa en la selección de un conjunto A de 4 elementos (n) escogidos de
	// modo randomizado de un total de 36 elementos (m), creando una sucesión de 4 elementos
	// sin repetición.
	// El número de maneras, posibilidades o variaciones ordinarias en que se pueden ordenar
	// los 4 elementos corresponderá a la variación
	//  n    4
	// V  = V   = (Permutación de 36!)/(Permutación (36-4)!) = 1.413.720 posibilidades
	//  m    36
	//
	//
	// Determinación de 4 imágenes en Splash
	varImg = Math.random();
	if ((varImg >= 0) && (varImg <= (1/36))) {
		dataImagen = 1;
	}
	if ((varImg > (1/36)) && (varImg <= (1/18))) {
		dataImagen = 2;
	}
	if ((varImg > (1/18)) && (varImg <= (1/12))) {
		dataImagen = 3;
	}
	if ((varImg > (1/12)) && (varImg <= (1/9))) {
		dataImagen = 4;
	}
	if ((varImg > (1/9)) && (varImg <= (5/36))) {
		dataImagen = 5;
	}
	if ((varImg > (5/36)) && (varImg <= (1/6))) {
		dataImagen = 6;
	}
	if ((varImg > (1/6)) && (varImg <= (7/36))) {
		dataImagen = 7;
	}
	if ((varImg > (7/36)) && (varImg <= (2/9))) {
		dataImagen = 8;
	}
	if ((varImg > (2/9)) && (varImg <= (1/4))) {
		dataImagen = 9;
	}
	if ((varImg > (1/4)) && (varImg <= (5/18))) {
		dataImagen = 10;
	}
	if ((varImg > (5/18)) && (varImg <= (11/36))) {
		dataImagen = 11;
	}
	if ((varImg > (11/36)) && (varImg <= (1/3))) {
		dataImagen = 12;
	}
	if ((varImg > (1/3)) && (varImg <= (13/36))) {
		dataImagen = 13;
	}
	if ((varImg > (13/36)) && (varImg <= 7/18)) {
		dataImagen = 14;
	}
	if ((varImg > (7/18)) && (varImg <= (5/12))) {
		dataImagen = 15;
	}
	if ((varImg > (5/12)) && (varImg <= (4/9))) {
		dataImagen = 16;
	}
	if ((varImg > (4/9)) && (varImg <= (17/36))) {
		dataImagen = 17;
	}
	if ((varImg > (17/36)) && (varImg <= 0.5)) {
		dataImagen = 18;
	}
	if ((varImg > 0.5) && (varImg <= (19/36))) {
		dataImagen = 19;
	}
	if ((varImg > (19/36)) && (varImg <= (5/9))) {
		dataImagen = 20;
	}
	if ((varImg > (5/9)) && (varImg <= (7/12))) {
		dataImagen = 21;
	}
	if ((varImg > (7/12)) && (varImg <= (11/18))) {
		dataImagen = 22;
	}
	if ((varImg > (11/18)) && (varImg <= (23/36))) {
		dataImagen = 23;
	}
	if ((varImg > (23/36)) && (varImg <= (2/3))) {
		dataImagen = 24;
	}
	if ((varImg > (2/3)) && (varImg <= (25/36))) {
		dataImagen = 25;
	}
	if ((varImg > (25/36)) && (varImg <= (13/18))) {
		dataImagen = 26;
	}
	if ((varImg > (13/18)) && (varImg <= (3/4))) {
		dataImagen = 27;
	}
	if ((varImg > (3/4)) && (varImg <= (7/9))) {
		dataImagen = 28;
	}
	if ((varImg > (7/9)) && (varImg <= (29/36))) {
		dataImagen = 29;
	}
	if ((varImg > (29/36)) && (varImg <= (5/6))) {
		dataImagen = 30;
	}
	if ((varImg > (5/6)) && (varImg <= (31/36))) {
		dataImagen = 31;
	}
	if ((varImg > (31/36)) && (varImg <= (8/9))) {
		dataImagen = 32;
	}
	if ((varImg > (8/9)) && (varImg <= (11/12))) {
		dataImagen = 33;
	}
	if ((varImg > (11/12)) && (varImg <= (17/18))) {
		dataImagen = 34;
	}
	if ((varImg > (17/18)) && (varImg <= (35/36))) {
		dataImagen = 35;
	}
	if ((varImg > (35/36)) && (varImg <= 1)) {
		dataImagen = 36;
	}
	if (dataCheck == 0) {
		AssignImg();
		return;
	}
	if (dataCheck == 1) {
		DataImg[1] = dataImagen;
		CheckImage();
		return;
	}
	if (dataCheck == 2) {
		DataImg[2] = dataImagen;
		CheckImage();
		return;
	}
	if (dataCheck == 3) {
		DataImg[3] = dataImagen;
		CheckImage();
		return;
	}
}

function AssignImg() {
	if (varAssign == 0) {
		DataImg[0] = dataImagen;
	}
	if (varAssign == 1) {
		DataImg[1] = dataImagen;
	}
	if (varAssign == 2) {
		DataImg[2] = dataImagen;
	}
	if (varAssign == 3) {
		DataImg[3] = dataImagen;
	}
	if (varAssign < 3) {
		varAssign = varAssign + 1;
		DetImag();
		return;
	}
	// Se han asignado las 4 variables de imagen en variable Array matriz DataImg
	varAssign = 0;
	// Se procede a evaluar resultados y comprobar que no existan datos iguales en la
	// variable Array DataImg
	CheckImage();
}

function CheckImage() {
	if (DataImg[1] == DataImg[0]) {
		//Volver a evaluar datos función DetImag()
		dataCheck = 1;
		DetImag();
		return;
	}
	if ((DataImg[2] == DataImg[0]) || (DataImg[2] == DataImg[1])) {
		//Volver a evaluar datos función DetImag()
		dataCheck = 2;
		DetImag();
		return;
	}
	if ((DataImg[3] == DataImg[0]) || (DataImg[3] == DataImg[1]) || (DataImg[3] == DataImg[2])) {
		//Volver a evaluar datos función DetImag()
		dataCheck = 3;
		DetImag();
		return;
	}
	// Se han revisado todos los valores de la matriz Array DataImg y reemplazado aquellos
	// posibles datos que fuesen iguales, de éste modo los 4 datos que incluye la matriz son
	// distintos y cada uno se asignará a una imagen.
	// DataImg(Imagen en Pos1, Imagen en Pos2, Imagen en Pos3, Imagen en Pos4)
	ConfigSplash();
}

function ConfigSplash() {
	// Configuración de las 4 imágenes en Splash
	// Valores configurados en array DataImg
	Img1.innerHTML = "<img src=Aplica/Icon" + DataImg[0] + ".gif align=center>";
	Img2.innerHTML = "<img src=Aplica/Icon" + DataImg[1] + ".gif align=center>";
	Img3.innerHTML = "<img src=Aplica/Icon" + DataImg[2] + ".gif align=center>";
	Img4.innerHTML = "<img src=Aplica/Icon" + DataImg[3] + ".gif align=center>";
	document.all.Img1.style.visibility = 'visible';
	document.all.Img2.style.visibility = 'visible';
	document.all.Img3.style.visibility = 'visible';
	document.all.Img4.style.visibility = 'visible';
}

// End Script /JavaScript

// Copyright © 2004 TAESAVision Multimedia - Carlos Baztán
// Copyright © 2004 REYCOMOTOR
