var locations;
var JS;
var settings;
var lang;

function initVar()
{
// Auteur: 	Jan de Bruin
// Datum:	Voorjaar 2000
// Beschrijving: Functie die constructors voor alle variabelen-containers aanroept. Als dat gebeurt is wordt het conceptuele model geopend.
// Returns:	null	
// Gebruikt:	MakeLocation, MakeSettings, MakeManager, MakeHistory, MakeViewer, logEvent
// Wijzigingen:
// **********************************
// Datum: 
// Door: 
// Reden: 
// Wijziging: 
// **********************************
 	
      //  saveSettings()
}


function locationObj()
{
// Auteur: 	Jan de Bruin
// Datum:	28 - 07 - 2000, 3 januari 2001
// Beschrijving: Constructor: hier worden alle paden naar de diverse databronnen gezet. Zo kan de applicatie data uit een ander systeem gebruiken.
// Dit is erg handig in geval van ontwikkelfase.
// Parameters:	
// Returns:	object met locatievariabelen
// Gebruikt:		
// Wijzigingen:
// **********************************
// Datum: 
// Door: 
// Reden: 
// Wijziging: 
// **********************************

	tmpRoot=String(document.location);
	tmpRoot=tmpRoot.toLowerCase( );
        this.document="";
        if(tmpRoot.indexOf('data')>0)
	{	
	       this.document=String(document.location).substring(tmpRoot.indexOf('data')+5,String(document.location).length);
	}
        if(tmpRoot.indexOf('kompasproductie')>0)
	{
      
	       this.root=String(document.location).substring(0,tmpRoot.indexOf('kompasproductie')) + "KompasRedactie/";
            
        }
	else
        {
               //if(tmpRoot.indexOf('site')>0)
	       //{	
		//      this.root=String(document.location).substring(0,tmpRoot.indexOf('site'));
	       //}
	       //else
	       //{
                        if(tmpRoot.indexOf('generate')>0)
	               {	
		              this.root=String(document.location).substring(0,tmpRoot.indexOf('generate'));
	               }
                        else
                        {
                                if(tmpRoot.indexOf('data')>0)
	                       {	
		                             this.root=String(document.location).substring(0,tmpRoot.indexOf('data'));
	                       }
                                else
                                {
                                         if(tmpRoot.indexOf('asp')>0)
	                                 {	
		                              this.root=String(document.location).substring(0,tmpRoot.indexOf('asp'));
	                                       
                                         }
                                         else
                                         {
	               	               this.root=String(document.location);
                                       }
                                }
                       }
               //}
	}

	//this.navigatiehtml=this.root+"navigatiehtml/"; //frames, menubalken e.d.
     
	this.data=this.root+"data/";
        this.productionRoot=this.root+"../kompasProductie/";
	this.productionData="../../kompasProductie/data/";
	this.productionGenerate="../../kompasProductie/generate/";
	this.documentatie=this.root+"generate/"; // literatuur verwijzingen, etc. etc.
	this.generate=this.root+"generate/"; // gegenereerde html en javascript directory
	this.images=this.productionRoot+"images/"; // de plaatjes
        this.site="";
	if(navigator.appName.indexOf("Netscape")>-1) // directory met browserafhankelijke plaatjes
	{	
		this.imagesBrowser=this.productionRoot+"images/ie/";
	}
	else
	{
		this.imagesBrowser=this.productionRoot+"images/ie/";
	}
        this.kompasHome=this.data+"site_kompas/index.htm";
        this.atlasHome=this.data+"site_atlas/index.htm";
        this.kompasTree=this.generate+"objv2conceptmodel_0.htm";
        this.atlasTree=this.data+"site_atlas/indexOnderwerpen.htm";
}
function settingsObj()
{
// Auteur: 	Jan de Bruin
// Datum:	28 - 07 - 2000
// Beschrijving: Constructor: hier staan de switsches voor programmainstellingen.
// Parameters:	
// Returns:	object met daarin de settings
// Gebruikt:	getCookie, setCookie	
// Wijzigingen:
// **********************************
// Datum:  11-09-2000 
// Door: JdB
// Reden: debug
// Wijziging: switch openOnce ingebouwd voor access denied bug bij tweede keer openen viewer
// **********************************
// Datum: 
// Door: 
// Reden: 
// Wijziging: 
// **********************************
//
	this.classReminder="conceptmodel"; //conceptmodel";
        this.indexReminder="201";
        this.activeLongcode=getSetting("activeLongcode","101");
        this.openNewWindow=false; 
        this.kruimelpad="";
        this.documentStatus="";
        this.siteStatTeller="";


	if (screen.width < minwidth || screen.height < minheight) {
                this.imageScaling=0.75;
                this.imageScalingExtension="_75";
        }
        else
        {
                this.imageScaling=1;
                this.imageScalingExtension="";
        }
        this.openNewWindow=getSetting("openNewWindow","false");
        this.largeFonts=getSetting("largeFonts","false");
        
       // document.write("<link rel=\"stylesheet\" href=\"../styles/kvz.css\">"); 
        this.autoClosePopup=getSetting("autoClosePopup","true");
        this.doctype=doctypeOther;
        //this.showContent=getSetting("showContent","true");
        //this.showLink=getSetting("showLink","true");
        //this.showUrl=getSetting("showUrl","true");
        //this.showNaslag=getSetting("showNaslag","false");
        this.arr_version_mode = new Array();
        /*FAR_VERSION_START*/
        this.arr_version_mode[1]="Ontwikkelversie 2.0 beta";
        this.arr_version_mode[3]="Ontwikkelversie 2.0 beta";
        this.arr_version_mode[4]="Ontwikkelversie 2.0 beta";
        this.arr_version_mode[5]="Ontwikkelversie 2.0 beta";
        this.arr_version_mode[6]="Ontwikkelversie 2.0 beta";
        this.arr_version_mode[7]="Ontwikkelversie 2.0 beta";
        this.arr_version_mode[8]="Ontwikkelversie 2.0 beta";
        this.arr_version_mode[9]="Ontwikkelversie 2.0 beta";
        this.arr_version_mode[10]="Ontwikkelversie 2.0 beta";
        /*FAR_VERSION_END*/
       
        this.characteristic=0;
        this.appMode=modeKompas;
	this.appState=stateOnderwerpen;//stateHome;
        this.language=modeDutch;
        this.activeLayer="";
	this.production=false;
        this.popupwidth=275;
        this.popupheight=150;
        this.popuptime=10;
        if(this.autoClosePopup=="false")
        {
                this.popuptime=0;
        }
        this.popuplayername="vtvMessageLayer";
        this.iframelayername="vtvAtlasIframe";
        this.menulayername="vtvMenuLayer";
//        this.menuArr= new Array(new Array("on","off","off","off"),new Array("off","on","off","off"),new Array("off","off","on","off"),new Array("off","off","off","on"));
        if (parseInt(navigator.appVersion.charAt(0))>=4) //browser type en versie detecteren en eventueel programma stoppen.
	{
		if (navigator.appName.indexOf("Netscape")>-1)
		{
			this.browser="Netscape";
			this.browserVersion=navigator.appVersion;
                       
                        //this.production=true;
		}
		else
		{
			if (navigator.appName.indexOf("Microsoft")==0)
			{
				this.browser="IE";
				this.browserVersion=navigator.appVersion;
                                

			}
			else
			{
				this.browser="Netscape";
				this.browserVersion=navigator.appVersion;
                                this.production=true;
                               
                                alert(lang.alertBrowserNotOk.Text());
			}
		}
                
	}
	else
	{
                this.browser="Netscape";
		this.browserVersion=navigator.appVersion;
		alert(lang.alertBrowserNotOk.Text());
	}

        
}
function alignMenus()
{
        try
        {
        optionMenu.align(); 
        sitesMenu.align();
        helpMenu.align();
        }
        catch (e)
        {}
}
