//
// config.js - user modifiable variables for abnet 3d chat
// KimballSoftware  Copyright (c) 2008
//

//
// -- ABNetApp Object --
// -- you can change these values to suit yourself --
// -- commas and quotes are important, be careful --
//

var ABNetApp = {
    // user interface version
    version: '2.05.02',
    verdate: '09.06.2008',
    author: 'Rick',
    
    // defaults for avatars/player/world etc ...
    defaults: {
	player: 'bscontact',
	protocol: 'abnetX/tcp',
	title: 'BETA VRMLWorld Lobby',
	the3DURL: 'http://vrmlworld.net/lobby/lobby.wrl',
	snapshot: 'http://vrmlworld.net/lobby/160x90.jpg',
	welcomeMsg: '[Welcome to ${title} using ABNet2 multiuser 3d]',
	avatarF: pageurl + '/avatars/vnetfem.wrl',
	avatarM: pageurl + '/avatars/vnetguy02.wrl',
	avatarURL: pageurl + '/avatars/smbh.wrl',
	view: '3rdperson'
    },

    // list of avatars that a user can select
    avatarPickList: {
	"0": {
	    desc: 'Jester',
	    url: 'http://vrmlworld.net/avatars/jester.wrl',
	    thumb: 'http://vrmlworld.net/avatars/jester_thumb.jpg'
	}
	,"1": {
	    desc: 'Ogre',
	    url: 'http://vrmlworld.net/avatars/ogre.wrl',
	    thumb: 'http://vrmlworld.net/avatars/oger_thumb.jpg'
	}
	,"2": {
	    desc: 'Prince',
	    url: 'http://vrmlworld.net/avatars/prince.wrl',
	    thumb: 'http://vrmlworld.net/avatars/prince_thumb.jpg'
	}
	,"3": {
	    desc: 'Girl',
	    url: 'http://vrmlworld.net/avatars/vnetfem.wrl',
	    thumb: 'http://vrmlworld.net/avatars/vnetfem_thumb.jpg'
	}
	,"4": {
	    desc: 'Guy',
	    url: 'http://vrmlworld.net/avatars/vnetguy02.wrl',
	    thumb: 'http://vrmlworld.net/avatars/vnetguy02_thumb.jpg'
	}
	,"5": {
	    desc: 'Faceless Block Head',
	    url: 'http://vrmlworld.net/avatars/smbh.wrl',
	    thumb: 'http://vrmlworld.net/avatars/smbh_thumb.jpg'
	}
    },
    
    // where to get the proper plugins
    pluginurls: {
	abnetDownload: 'http://kimballsoftware.com/abnet/abnetclient2_05.exe',
	bsContactDownload: 'http://www.bitmanagement.de/download/BS_Contact_VRML/851366/BS_Contact_VRML-X3D_7106.exe',
	vivatyDownload: 'http://vivaty.com/someurl/someplayer.exe',
	octagDownload: 'http://octaga.com/someurl/someplayer.exe'
    },

    // which version of abnet and the player are required for this interface
    requiredVersions: {
	abnet: '2.05',
	bscontact: '6.1',
	vivaty: '872'
    },

    // which abnet chat server to use
    server: {
	chathost: '65.111.176.26',
	port: '8023'
    }
};

//
// -- ABNet Chat configurable parameters --
//

ABNetApp.Chat = {
    composeTimeout: 30,          // how long someone can type before we consider them timedout( in seconds )
    maxChatLines: 100,           // how many lines of chat text to save before discarding

    sounds: {
	enter: 'enter.wav',      // sound when someone enters
	leave: 'leave.wav',      // sound when someone leaves
	newmsg: 'message.wav',   // sound when a new message arrives
	friend: 'friend.wav'     // sound when a friend arrives
    },

    announceNewUser: true        // announces each person as they enter or leave chat
};

//
// -- initialize default ABNetApp global variables --
// -- don't touch these unless you know what you are doing --
//

ABNetApp.User =  {
    defaultName: function() { return 'Visitor_'+(Math.floor(Math.random()*10000)); },
    me: function() {
          var p = new Person();
          p.me = true;
        }
};

ABNetApp.player=ABNetApp.defaults.player;
ABNetApp.the3DURL=ABNetApp.defaults.the3DURL;
ABNetApp.snapshot=ABNetApp.defaults.snapshot;

ABNetApp.abnetLoaded=0;
ABNetApp.contactLoaded=0;
ABNetApp.vivatyLoaded=0;

ABNetApp.setTitle = function(title) {
    ABNetApp.welcome=ABNetApp.defaults.welcomeMsg.replace(/\${title}/g, title);
    ABNetApp.title=title + ' [ABNet UI version: ' + ABNetApp.version + ']';
};

ABNetApp.setTitle(ABNetApp.defaults.title);

// TBD .. load the proper 3d control based on
//        world preferred player.
