// Copyright 2007-2008 NEW3S s.a. - NEW3S.com
// Christophe LEMOINE + Michael BRICOUT

AddScene ("etage6_2", "etage6_2", "Scenes/etage1_b.tnt", 'SP3D_E06H02');

function Add_etage6_2_option() {
	if (gSceneDebug > 1) { alert ("Add_etage6_2_option()"); }
	AddSceneOptionWithStyle (1,"6-2 Galerie de Peintures",'LoadScene("etage6_2")','SP3D_E06H02','color:#FF7200;font-weight:bold;');
	AddSceneOptionWithStyle (2,"Stand 01",'LoadSceneAndGo("etage6_2","camera1")','SP3D_E06H02_S01','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 02",'LoadSceneAndGo("etage6_2","camera2")','SP3D_E06H02_S02','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 03",'LoadSceneAndGo("etage6_2","camera3")','SP3D_E06H02_S03','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 04",'LoadSceneAndGo("etage6_2","camera4")','SP3D_E06H02_S04','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 05",'LoadSceneAndGo("etage6_2","camera5")','SP3D_E06H02_S05','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 06",'LoadSceneAndGo("etage6_2","camera6")','SP3D_E06H02_S06','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 07",'LoadSceneAndGo("etage6_2","camera7")','SP3D_E06H02_S07','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 08",'LoadSceneAndGo("etage6_2","camera8")','SP3D_E06H02_S08','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 09",'LoadSceneAndGo("etage6_2","camera9")','SP3D_E06H02_S09','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 10",'LoadSceneAndGo("etage6_2","camera10")','SP3D_E06H02_S10','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 11",'LoadSceneAndGo("etage6_2","camera11")','SP3D_E06H02_S11','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 12",'LoadSceneAndGo("etage6_2","camera12")','SP3D_E06H02_S12','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 13",'LoadSceneAndGo("etage6_2","camera13")','SP3D_E06H02_S13','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 14",'LoadSceneAndGo("etage6_2","camera14")','SP3D_E06H02_S14','color:#669DFF;');
	AddSceneOptionWithStyle (2,"Stand 15",'LoadSceneAndGo("etage6_2","camera15")','SP3D_E06H02_S15','color:#669DFF;');
}

function OnLoad_etage6_2() {
	soundManager.createSound ( {id:'SP3D_E06H02', url:'etage6_2/Sounds/entree_hall.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S01_IN', url:'etage6_2/Sounds/entree_stand01.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S02_IN', url:'etage6_2/Sounds/entree_stand02.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S03_IN', url:'etage6_2/Sounds/entree_stand03.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S04_IN', url:'etage6_2/Sounds/entree_stand04.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S05_IN', url:'etage6_2/Sounds/entree_stand05.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S06_IN', url:'etage6_2/Sounds/entree_stand06.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S07_IN', url:'etage6_2/Sounds/entree_stand07.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S08_IN', url:'etage6_2/Sounds/entree_stand08.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S09_IN', url:'etage6_2/Sounds/entree_stand09.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S10_IN', url:'etage6_2/Sounds/entree_stand10.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S11_IN', url:'etage6_2/Sounds/entree_stand11.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S12_IN', url:'etage6_2/Sounds/entree_stand12.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S13_IN', url:'etage6_2/Sounds/entree_stand13.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S14_IN', url:'etage6_2/Sounds/entree_stand14.mp3'} );
	soundManager.createSound ( {id:'SP3D_E06H02S15_IN', url:'etage6_2/Sounds/entree_stand15.mp3'} );
}

function OnUnload_etage6_2() {
	soundManager.destroySound ('SP3D_E06H02');
	soundManager.destroySound ('SP3D_E06H02S01_IN');
	soundManager.destroySound ('SP3D_E06H02S02_IN');
	soundManager.destroySound ('SP3D_E06H02S03_IN');
	soundManager.destroySound ('SP3D_E06H02S04_IN');
	soundManager.destroySound ('SP3D_E06H02S05_IN');
	soundManager.destroySound ('SP3D_E06H02S06_IN');
	soundManager.destroySound ('SP3D_E06H02S07_IN');
	soundManager.destroySound ('SP3D_E06H02S08_IN');
	soundManager.destroySound ('SP3D_E06H02S09_IN');
	soundManager.destroySound ('SP3D_E06H02S10_IN');
	soundManager.destroySound ('SP3D_E06H02S11_IN');
	soundManager.destroySound ('SP3D_E06H02S12_IN');
	soundManager.destroySound ('SP3D_E06H02S13_IN');
	soundManager.destroySound ('SP3D_E06H02S14_IN');
	soundManager.destroySound ('SP3D_E06H02S15_IN');
}

function loadExternalTextures_etage6_2() {
	loadExternalTextures();
}

function OnReady_etage6_2() {
	window.status = "TurnTool Ready (" + gLastScene + " -> " + gCurrentScene + ")";
	switch (gLastScene) {
		case "ascenseur":
			soundManager.stopAll ();
			soundManager.play ('Ding', {volume: 80});
			//OpenDoor(gLastScene);
			//TNTDoCommand('CameraCtrl.Match("camera0",2000)'); // Sortir
			//CloseDoor(gLastScene);
		break;
	}
	ResetRing_Scene (20, 200);
}

function OnClick_etage6_2(obj) {
	window.status = "Mouse click: etage6_2/" + obj;
	var scene = "SP3D_E06H02";
	switch(obj) {
		//Liens inter-scene
		case "ascenseur":
		case "hall_suivant":
		case "hall_precedent":
		case "acces_hall01":
		case "acces_hall02":
		case "acces_hall03":
		case "acces_hall04":
		case "acces_hall05":
		case "acces_hall06":
		case "acces_hall07":
		case "acces_hall08":
		case "acces_hall09":
		case "acces_hall10":
		case "acces_hall11":
		case "acces_hall12":
		case "acces_hall13":
			var precedent = "etage6_1";
			var suivant   = "etage6_3";
			ClickGotoSalon (obj, precedent, suivant, "etage6");
		break;

		//Liens intra-scene
		case "acces_stand01":
		case "acces_stand02":
		case "acces_stand03":
		case "acces_stand04":
		case "acces_stand05":
		case "acces_stand06":
		case "acces_stand07":
		case "acces_stand08":
		case "acces_stand09":
		case "acces_stand10":
		case "acces_stand11":
		case "acces_stand12":
		case "acces_stand13":
		case "acces_stand14":
		case "acces_stand15":
			ClickGotoStand (obj, "SP3D_E06H02");
		break;

		//Liens commun à plusieurs scenes
		case "message01": soundManager.stopAll (); soundManager.play ('message01', {volume: 100}); break;
		case "message02": soundManager.stopAll (); soundManager.play ('message02', {volume: 100}); break;
		case "message03": soundManager.stopAll (); soundManager.play ('message03', {volume: 100}); break;
		case "message04": soundManager.stopAll (); soundManager.play ('message04', {volume: 100}); break;
		case "message05": soundManager.stopAll (); soundManager.play ('message05', {volume: 100}); break;

		//Liens sponsor
		//Liens SPONSORS
		case "sponsors01":
		case "sponsors02":
		case "sponsors03":
		case "sponsors04":
			window.open ("media.asp?Id="+scene+"&IdMedia="+obj);
			SceneTracker("Sponsor", obj, "");
		break;
		case "acces_site_web_new3s":
			window.open ("http://www.new3s.com/");
			SceneTracker("Sponsor", obj, "");
		break;
		case "poster2":
			window.open ("http://www.coface.fr/");
			SceneTracker("Sponsor", obj, "");
		break;
		case "poster1":
			window.open ("http://www.coface.fr/dmt/rubb_asspro/ap01_assenligne.htm");
			SceneTracker("Sponsor", obj, "");
		break;

		default: ClickOnStand (obj, scene); break;
	}
}

function OnMouseEnter_etage6_2(obj) {
}

function OnMouseExit_etage6_2(obj) {
}

function OnZoneEnter_etage6_2(zone, physics) {
	window.status = "Zone enter: etage6_2/" + zone + " by " + physics;
	ZoneEnterOnStand (zone, physics, "SP3D_E06H02");
}

function OnZoneExit_etage6_2(zone, physics) {
}

function OnKeyPress_etage6_2(keyCode, ascii) {
}

function OnKeyRelease_etage6_2(keyCode, ascii) {
}

// Copyright 2007-2008 NEW3S s.a. - NEW3S.com
// Christophe LEMOINE + Michael BRICOUT

