/**
 * @(#) $RCSfile$ $Revision$ $Date$
 *
 * Copyright 2003-2007 Olaf Havnes. All Rights Reserved.
 * http://www.havnes.com
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

/**
 * Individual browser configuration of Flash movies.
 *
 * @author      Olaf Havnes
 * @version     $Revision$ $Date$
 * @since       SWFIT2.0
 */




var url_params = new Array ();
var u = 0;




// ------------------------------------------------
// configure external parameters
// ------------------------------------------------

video_player_url = "Video/VideoPlayer.swf";
url_params[u++] = "video_player_url";

video_source = "pub/video/norwegian.txt";
url_params[u++] = "video_source";

// Not properly implemented yet - for now auto loop automatically.
// loop_video = "false";
// url_params[u++] = "loop_video";


// Images and newsbriefs from the publishing system
location_source = "pub/places/norwegian.txt";
url_params[u++] = "location_source";

character_source = "pub/portraits/norwegian.txt";
url_params[u++] = "character_source";

splash_source = "pub/splash/newsbrief_out.txt";
url_params[u++] = "splash_source";


// Not fully implemented yet ...
language_source = "pub/languages/norwegian.txt";
url_params[u++] = "language_source";


// ------------------------------------------------
// the list of games
// ------------------------------------------------

game_0 = "Game/NumberMap.swf";
url_params[u++] = "game_0";
game_about_0 = "/FlashGameSinglesNo.shtml?NumberMap";
url_params[u++] = "game_about_0";

game_1 = "Game/PercentTile.swf";
url_params[u++] = "game_1";
game_about_1 = "/FlashGameSinglesNo.shtml?PercentTile";
url_params[u++] = "game_about_1";

game_2 = "Game/NardakNumber.swf";
url_params[u++] = "game_2";
game_about_2 = "/FlashGameSinglesNo.shtml?NardakNumber";
url_params[u++] = "game_about_2";

game_3 = "Game/PrimeSplit.swf";
url_params[u++] = "game_3";
game_about_3 = "/FlashGameSinglesNo.shtml?PrimeSplit";
url_params[u++] = "game_about_3";

game_4 = "Game/HallOfMirrors.swf";
url_params[u++] = "game_4";
game_about_4 = "/FlashGameSinglesNo.shtml?HallOfMirrors";
url_params[u++] = "game_about_4";

game_5 = "Game/Planetarion.swf";
url_params[u++] = "game_5";
game_about_5 = "/FlashGameSinglesNo.shtml?Planetarion";
url_params[u++] = "game_about_5";

game_6 = "Game/FibonacciGarden.swf";
url_params[u++] = "game_6";
game_about_6 = "/FlashGameSinglesNo.shtml?FibonacciGarden";
url_params[u++] = "game_about_6";

game_7 = "Game/SetSigns.swf";
url_params[u++] = "game_7";
game_about_7 = "/FlashGameSinglesNo.shtml?SetSigns";
url_params[u++] = "game_about_7";

game_8 = "Game/TempleOfNumbers.swf";
url_params[u++] = "game_8";
game_about_8 = "/FlashGameSinglesNo.shtml?TempleOfNumbers";
url_params[u++] = "game_about_8";

game_9 = "Game/DrawingBoard.swf";
url_params[u++] = "game_9";
game_about_9 = "/FlashGameSinglesNo.shtml?DrawingBoard";
url_params[u++] = "game_about_9";

game_10 = "Game/Pendrako.swf";
url_params[u++] = "game_10";
game_about_10 = "/FlashGameSinglesNo.shtml?Pendrako";
url_params[u++] = "game_about_10";

game_11 = "Game/FourGates.swf";
url_params[u++] = "game_11";
game_about_11 = "/FlashGameSinglesNo.shtml?FourGates";
url_params[u++] = "game_about_11";



// ------------------------------------------------
// get query string variables
// ------------------------------------------------

search_vars = getSearchVars();
sg = findSearchVar (search_vars, "start_game");


start_game = (sg == "") ? '0' : sg;
url_params[u++] = "start_game";




// ------------------------------------------------
// configure the movie
// ------------------------------------------------

var swf_src = 'Game/GameLoader.swf';
var swf_width = 800;
var swf_height = 600;
var swf_col = '#326632';




// ------------------------------------------------
// generate the html code
// ------------------------------------------------

swf_src += '?';
for (i = 0; i < url_params.length; i++) swf_src += urlEncVarMX (url_params[i]);
document.writeln ( flash7Code (swf_src, swf_width, swf_height, swf_col) );

