const g_CDLABEL = "OCOLL2E";
const g_DICTITLE = "Oxford Collocations Dictionary";
const CLIPBOARD_TOP = "Oxford Collocations Dictionary for Students of English, 2nd edition";
const CLIPBOARD_BOTTOM = "© Oxford University Press, 2009";

//var g_File;
var g_AutoPlay = 0;
var g_Factory;
var g_Mac = (navigator.userAgent.indexOf("Mac") > -1);
var g_Pref;
var g_Search;
var g_Simplifier;
var g_SkFindService;
var g_TimeDelta = 1214600000000; // offset, just to simplify dates


var g_bInitializing = true;

var g_DOMParser = new DOMParser();
var g_SkPrintManager = Components.classes["@idm.fr/sk_print_manager;1"].createInstance()
                                 .QueryInterface(Components.interfaces.skIPrintManager);

// Dummy operator definition
var SSKOPERATOR = "|(&(ôîõ(îôõ(#";


const POPUP_OPTION    = 1;
const POPUP_EXERCISES = 2;
var g_PopupSpec = [];
g_PopupSpec[POPUP_OPTION]    = [260, 200, "no", false, 'popup_option.xul'];
g_PopupSpec[POPUP_EXERCISES] = [980, 700, "yes", false, 'chrome://ocoll2e/content/flash/exercises/popup_exercises.xul'];

var simpleSearchSystem;

const g_dataPath = "ldoce5.";
var g_SK_PATH = {};
g_SK_PATH["US_HWD_PRON"]  = g_dataPath+"data/us_hwd_pron.skn/config.cff";
g_SK_PATH["GB_HWD_PRON"]  = g_dataPath+"data/gb_hwd_pron.skn/config.cff";
g_SK_PATH["EXA_PRON"]     = g_dataPath+"data/exa_pron.skn/config.cff";
g_SK_PATH["SFX"]          = g_dataPath+"data/sfx.skn/config.cff";
g_SK_PATH["FS"]           = g_dataPath+"data/fs.skn";
g_SK_PATH["ENTRY"]        = g_dataPath+"data/fs.skn/config.cff";
g_SK_PATH["SOUND"]        = g_dataPath+"data/sound.skn/config.cff";
g_SK_PATH["EXAMPLES"]     = g_dataPath+"data/examples.skn/config.cff";
g_SK_PATH["PDF"]          = g_dataPath+"data/teacher.skn/pdf.skn/config.cff";

var goHistory;


var dictSize = new ObjectSize();
    dictSize.win           = window;
    dictSize.defaultWidth  = 1024;
    dictSize.defaultHeight = 768;
    dictSize.minWidth      = 800;
    dictSize.minHeight     = 600;

var popupSize = new ObjectSize();
    popupSize.win           = window;
    popupSize.defaultWidth  = 543;
    popupSize.defaultHeight = 400;
    popupSize.maxWidth      = 543;
    popupSize.maxHeight     = 400;
    popupSize.minWidth      = 543;
    popupSize.minHeight     = 400;

resizerWin.addDefaultSizeArray("dict", dictSize);
resizerWin.addDefaultSizeArray("popup", popupSize);

// default value for 'see this word in' filtering
var g_DictAllowedClasses = [1,2,3,4];
// remember the last thing we looked in the dictionary, so we know what to
// trigger the search on, when the user selects something else in 'see this word
// in'
var lastDictQueryString = null;
