var win = null;
//----------------affiche le lien metter en page d'acceuil avec Netscape -----*/
function pageAccueil()
{	
if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion.substring(0,1),10) >= 3)) 
	document.write('<a href="#" style="border-bottom: 1px dotted red; text-decoration: none; font-family: arial; font-size: 11px; color: #313ACF" onClick="pageNets();">Zahbra votre page d\'accueil</a>');
}

/*---------------------- Permet de placer Zahbra comme d'acceuil avec Netscape----------*/
function pageNets()
{	
	var test =1;
	//if(language_param == 1 ) window.location = 'http://www.zahbra.com/en/pages.php';
	//else window.location = 'http://www.zahbra.com/en/pages.php';
}

/* ------------Function To center popup-------------*/
function NewWindow(mypage,myname,w,h,scroll,tlbar,loc,dir,sta,mbar,copy)
{
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',toolbar='+tlbar+',location='+loc+',directories='+dir+',status='+sta+',menubar='+mbar+',copyhistory='+copy+',resizable'
	win = window.open(mypage,myname,settings)
}

/* ------------Function To open popup--------------------*/
function OpenPrint (c) 
{
	window.open(c,'print','width=650,height=400,scrollbars=yes,status=yes');
}


function generatearchives() 
{
	var tempobj = document.newscategory.archives
	if(tempobj.options[tempobj.options.selectedIndex].value)
	{
		window.location = tempobj.options[tempobj.options.selectedIndex].value
	}
}

/*---------------------------- Tab Navigation functions -----------------*/
var initialtab = [1, NAVBAR_TAB_ID]
var previoustab = ''

function expandcontent(cid, aobject)
{
	if (document.getElementById)
	{
		if (previoustab != '')
			document.getElementById(previoustab).style.display = 'none'
			document.getElementById(cid).style.display = 'block'
			previoustab = cid 
			return false
	}
	else
	return true
}

function getelementbyclass(rootobj, classname)
{
	var temparray = new Array()
	var inc = 0
	var rootlength = rootobj.length
	for (i=0; i<rootlength; i++)
	{
		if (rootobj[i].className == classname)
		temparray[inc++] = rootobj[i]
	}
	return temparray
}

/*
var makebold = [1, 'lst2_4']
function highlightelem(aobject, objlist)
{
	var alltags = document.all ? document.all : document.getElementsByTagName('*')
	classlist = makebold[1].substr(0,4)
	collect = getelementbyclass(alltags, 'highligh_'+classlist)
	alert(collect.length)
	for (i=0; i<collect.length; i++) 
	{
		if(collect[i].id == makebold[2]) collect[inc].style.fontWeight = 'bold'
		else collect[inc].style.fontWeight = 'normal'
	}
}
*/


function collectddimagetabs()
{
	var tabobj = document.getElementById('header')
	tabobjlinks = tabobj.getElementsByTagName('A')
}

function do_onload()
{
	collectddimagetabs()
	expandcontent(initialtab[1], tabobjlinks[initialtab[0]-1])
}

if (window.addEventListener)
window.addEventListener('load', do_onload, false)
else if (window.attachEvent)
window.attachEvent('onload', do_onload)
else if (document.getElementById)
window.onload = do_onload
