WL={};

WL.Debug = true;				// allow debug information
WL.DebugRSH = true;				// allow RSH debug
WL.UseAsyncBigRequest = true;	// turn on BigRequest async engine

WL.TimeOut = -1;			// callback timeout in milliseconds ( -1 for disable timeout )
WL.PingInterval = 60000;	// ping to server interval in milliseconds
WL.ClickTimeout = 200;		// click/dblclick timeout

WL.LogoutPage = "login"; 
WL.LogoutMsg = "Login required.";
WL.rtl = false;

// Global
WL.ClassFactory = {};
WL.Guids = {};

WL.Guids.Api = {};
WL.Guids.Api.WebGeneral	= "C5EE7226-45B7-4c89-9B09-98AA2656F272";
WL.Guids.Api.BigRequestManager	= "76B25A55-DF8B-4084-9DF9-62E1923E5D97";

WL.FileBrowserView = { Icons:1, List:2, Thumbnails:3 };

WL.attachScript = function( path, handler )
{
	path = path.toLowerCase();
	var scripts = document.getElementsByTagName("script");
	for( var i = 0; i < scripts.length; ++i )
		if( scripts[i].src == path )
		{
			// if loaded handler();
			// else handlers.push( handler );
			return;
		}
	
	var head = document.getElementsByTagName("head")[0];	
	var script = document.createElement("script");
	script.src = path;
	script.type = "text/javascript";
	head.appendChild(script);	
	
	script.onreadystatechange = function()
		{
			if( this.readyState != 'loaded' ) return;
		};
	script.onload = function(e)
		{
			if( /opera/i.test(navigator.userAgent) ) eval(e.target.innerHTML);
		};	
	// handlers.push( handler );
}