// JavaScript Document

/* Windows onload */

function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}


function toggle(e) {
  if(e == "show"){
 document.getElementById('link').className="showDescriptionYes";
  }
  else{
 document.getElementById('link').className="showDescriptionNo";
  }
 
}

/*
Page Language
Author: Sergio Ieropoli
Date: May 25 2010
*/
function pgLang()
{
	if (document.location.pathname.search("-eng") != -1)
		{
			return "eng";
		}
	else
		{
			return "fra";
		}
}


/*
Toggle display none/block
Author: Sergio Ieropoli
Date: May 26 2010
*/
function showHide(id)
{
	var status;
	status = document.getElementById(id);
	
	if (status.style.display != 'block')
	{
		status.style.display = 'block';
	}
	else
	{
		status.style.display = 'none';
	}

}

/*
Toggle display none/tablecell
Author: Sergio Ieropoli
Date: May 26 2010
*/
function showHideTblCell(id)
{
	var status;
	status = document.getElementById(id);
	
	if (navigator.appName == 'Microsoft Internet Explorer')
	{
		if (status.style.display != 'block')
		{
			status.style.display = 'block';
		}
		else
		{
			status.style.display = 'none';
		}
	}
	else
	{
		if (status.style.display != 'table-cell')
		{
			status.style.display = 'table-cell';
		}
		else
		{
			status.style.display = 'none';
		}
	}

}
/*
Toggle display none/tablerow
Author: Sergio Ieropoli
Date: May 26 2010
*/
function showHideTblRow(id)
{
	var status;
	status = document.getElementById(id);
	
	if (navigator.appName == 'Microsoft Internet Explorer')
	{
		if (status.style.display != 'block')
		{
			status.style.display = 'block';
		}
		else
		{
			status.style.display = 'none';
		}
	}
	else
	{
		if (status.style.display != 'table-row')
		{
			status.style.display = 'table-row';
		}
		else
		{
			status.style.display = 'none';
		}
	}

}
