// ==========================================================
// Nom : ouvrir_fiche_projet
function ouvrir_fiche_projet(projet_id)
{
	window.open('/back/projet/projet_fiche.php?projet_id=' + projet_id, 'fiche', 'width=800, height=600');
} // ------------------------------------------------------------------------------------------------------




// ==========================================================
// Nom : addcoord
function addcoord(type_coordonnee, id)
{
	window.open('/back/gestion/coordonnees/addbypopup.php?type_coordonnee=' + type_coordonnee + '&id=' + id, '_add','top=0, left=0, scroolbars=no, width=500, height=350');
} // ------------------------------------------------------------------------------------------------------




// ==========================================================
// Nom : addcontact
function addcontact(mode, id)
{
	switch(mode)
	{
		case 'new':
							window.open('/back/company/contact/createbypopup.php?id=' + id, '_add','top=0, left=0, scroolbars=no, width=500, height=670');
							break;
		case 'list':
							window.open('/back/company/contact/addbypopup.php?id=' + id, '_add','top=0, left=0, scroolbars=yes, width=500, height=110');
							break;
	}
} // ------------------------------------------------------------------------------------------------------





// ==========================================================
// Nom : modifycontact
function modifycontact(user_id, company_id)
{
	window.open('/back/company/contact/modifybypopup.php?user_id=' + user_id + '&company_id=' + company_id, '_add','top=0, left=0, scroolbars=no, width=500, height=670');
} // ------------------------------------------------------------------------------------------------------





// ==========================================================
// Nom : detailcontact
// Fonction : appelle la fiche Contact PDF
// Remarque : Mettre company_id = null si on ne désire pas l'affichage de la société
function detailcontact(type_coordonnee, company_id, id)
{
	window.open('/back/company/contact/viewcontact.php?type_coordonnee=' + type_coordonnee + '&id=' + id + '&company_id=' + company_id, '_add','top=0, left=0, scroolbars=no, width=800, height=600');
} // ------------------------------------------------------------------------------------------------------





// ==========================================================
// Nom : detailprofil
// Fonction : appelle la fiche employée PDF
// Remarque : Mettre company_id = null si on ne désire pas l'affichage de la société
function detailprofil(user_id)
{
	window.open('/back/gestion/user/detailprofil.php?user_id=' + user_id, '_add','top=0, left=0, scroolbars=no, width=800, height=600');
} // ------------------------------------------------------------------------------------------------------





function doClock()
{
	window.setTimeout( "doClock()", 250 );
	dte = new Date();

	hrs = dte.getHours();
	if (hrs < 10) hrs = '0' + hrs;
	
	min = dte.getMinutes();
	if (min < 10) min = '0' + min;

	sec = dte.getSeconds();
	if (sec < 10) sec = '0' + sec;

	self.status = "Sur Terre, chez vous, il est "+hrs+":"+min+":"+sec;
}
