//////////////////////////////////////////////
// Global Objects
//--------------------------------
// There are two global object in this script: MainWindow and ToolbarControl.
// MainWindow object allows you to access the main browser window via the following expression:
//
// MainWindow.document.parentWindow
//
// E.g. if you want to give an alert use the following code:
//
// MainWindow.document.parentWindow.alert('Document complete!!!!!');


//////////////////////////////////////////////
// Global Code Space
//--------------------------------
// Code in the main (non-fuction) space will be launched once: on toolbar loading.
// Use it to initialize some variables or other things.
//
// To see this in action please uncomment the following line of code:
//
//MainWindow.document.parentWindow.alert('Toolbar '+ToolbarControl.ver+' is loaded.');

//////////////////////////////////////////////
// DocumentComplete function
//--------------------------------
// It is called each time the page or toolbar is reloaded 
// (parameter 'type' is "window" or "toolbar" correspondingly).

function DocumentComplete(tool, type) 
{
	MainWindow.document.parentWindow.alert('Document complete!');
//-- use the following code to reload the toolbar once
//  if(type == "window") 
//  {
//	  //... (adjust tool here) ...
//		tool.Reload();		//-- reload it
//	}
}

//////////////////////////////////////////////
// BeforeNavigate function 
//--------------------------------
// It is called each time the page is loading


//function BeforeNavigate(tool)
//{
//MainWindow.document.parentWindow.alert('BeforeNavigate!');

//}

//////////////////////////////////////////////
// Run JavaScript from a button of the toolbar.
// Just assign the script to a button/menu item using 'Launch Script' command.

function Launch(tool)
{
//	MainWindow.document.parentWindow.alert ("Your javascript function!");
//	tool.alert('Your javascript function!');  				
}


