/* define objects in global scope */
var Tabs;
var Button;
var Validation;
var ToolTip;
var Login;

var Users;

function ClassController()
{
	this.IsLoaded = false;
	this.Type = '';
	
	this.Initialize = function(type)
	{
		this.Type = type;
	}
	
	this.OnLoadSite = function()
	{
		/* Dirty non flicker hack */
		(function(){
	
		/*Use Object Detection to detect IE6*/
		var  m = document.uniqueID /*IE*/
		&& document.compatMode  /*>=IE6*/
		&& !window.XMLHttpRequest /*<=IE6*/
		&& document.execCommand;
		
		try{
			if(!!m){
				m("BackgroundImageCache", false, true) /* = IE6 only */ 
			}
			
		}catch(oh){};
		})();

		if(this.Type == 'site')
		{
			/* site objects */
			
			/* load tabs object */
			Tabs = new ClassTabs();
			Tabs.Initialize();
			
			/* load button object */
			Button = new ClassButton();
			Button.Initialize();
			
			/* load tooltip object */
			ToolTip = new ClassToolTip();
			ToolTip.Initialize();
			
			/* load form validation object */
			Validation = new ClassValidation()
			Validation.Initialize();
			
			Login = new ClassLogin();
			Login.Initialize();
			
			/* load google map objects */
			loadMap();
			
			/* load vacancies */
			loadVacancies();
		}
		else
		{
			/* admin objects */
			Users = new ClassUsers();
			Users.Initialize();
		}

		this.IsLoaded = true;
	}
}