// Methods and functions related to the page content

//////////////
// FUNCTIONS
//////////////
// Manage screens with a small resolution
function manageScreen(){
	var tabsThemeImageBlock = getObject("tabsThemeImageBlock");
	var pageHeaderBackgroundBlock;

  // If resolution is too low, hide the image on the right of the tabs to avoid horizontal scrolling
	if (screen && screen.width <= 1220){
		if (tabsThemeImageBlock)
		  tabsThemeImageBlock.style.display = "none";
		pageHeaderBackgroundBlock = getObject("pageHeaderBackgroundBlock");
    // Reduce the width of the background zone to the width of the images now displayed
		// Abandoned because of the tree ads on the right which anyway do not scroll correctly
	}
}


// Search within the site, based on the form parameters
// Example of atomz query:
// For the production site:
//   http://search.atomz.com/search/?sp-q=custody&sp-a=sp1002d2ad&sp-p=all&sp-f=ISO-8859-1
// It seems that we cannot have two Atomz accounts for the same site 
function siteSearch(form){
  var engineUrl;
  var searchNode;
  var nodeUrl;
  var qIndex;
  var sp_aValue;


  sp_aValue = "sp1002d2ad";

  // Build search engine URL
  engineUrl = "http://search.atomz.com/search/?sp-q=" + form.sp_q.value + "&sp-a=" + sp_aValue + "&sp-p=all&sp-f=ISO-8859-1";
  window.location.href = engineUrl; 
  return false;
}





