﻿
// (c) Cog-Wheel. Website www.cog-wheel.com, e-mail: info@cog-wheel.com

var useDropDownMenus = true;

if ( ( !supports_cbAddEventListener()            ) || 
     ( !document.getElementById                  ) ||
     ( window.location.href.search("/en/") >= 0  ) )
{
     useDropDownMenus = false;  // No English drop down menus as yet
}

function printAndClose() {
	window.print();
	window.close();
	return true;
}

function doOnLoad() {

	if ( window.location && window.location.search && window.location.search.indexOf("printAndClose") >= 0 ) {
		
		printAndClose();
		
	} else {
	
		if ( useDropDownMenus ) initMenus();
		
	//	if (document.getElementById('navSearchField')) {
	//		searchField = document.getElementById('navSearchField');
	//		searchField.focus();
	//	}
		
		DocInfo.Init();
		//if ( startWithDocInfo ) DocInfo.Show();
		
	}
	
	render_dynamic_tables();
}

function doOnResize() {
	if ( useDropDownMenus ) setMenuListPositions();
}

onload   = new Function( 'doOnLoad();' );	
onresize = new Function( 'doOnResize();' );

