//***************************
function generer_adresse_mail(nom_boite, nom_lien, objet)
{
var link;

link=nom_boite + '@';
link+= 'addeo'; 
link+= '.com';
objetmail = '?SUBJECT=';
objetmail+= objet ;
document.write("<a class='lien' href='mailto:" + link + objetmail + "'><b>" + nom_lien + "</b></a>");
}

//***************************
function au_dessus()
{
window.focus()
}

//***************************
function aleatoire()
{
return Math.floor(Math.random()* 100000000)+1;
}

//***************************
function remplacer_espaces(url_param)
{
url_param = url_param.replace(/ /g,"-") ;
return(url_param) ;
}

//***************************
function fenetre_ouvrir(src,name,w,h)
{
var new_window, param;

param = "height=" + h + ",width=" + w + ",resizable=yes,scrollbars,menubar=no,toolbar=no";
new_window=window.open(src, name, param);
//new_window.focus();
return new_window ;
}

//***************************
function fenetre_fermer()
{
self.close();
}

//***************************
function ouvrir_new(id_new)
{
var fenetre, url;
url = "../news/news.asp?id_new=" + id_new
fenetre = fenetre_ouvrir(url, "NEW", 518, 240) ;
return ;
}

//***************************
function ouvrir_realisation(id_realisation)
{
var fenetre, url;
url = "../realisations/realisations.asp?id_realisation=" + id_realisation
fenetre = fenetre_ouvrir(url, "REALISATION", 518, 240) ;
return ;
}

//***************************
function ouvrir_solution(url)
{
var fenetre;
fenetre = fenetre_ouvrir(url, "SOLUTION", 567, 480) ;
return ;
}

//***************************
function ouvrir_categorie_realisation(id_categorie)
{
var fenetre, url;
url = "../realisations/realisations.asp?id_categorie=" + id_categorie
fenetre = fenetre_ouvrir(url, "REALISATION", 518, 230) ;
return ;
}

//***************************
function placer_antislash_devant_apostrophes(chaine)
{
var reg = new RegExp("'","gi");

chaine = chaine.replace(reg, "\\\'");	
return(chaine);
}

//***************************
function imprimer()
{
if (window.print)
	window.print();
else 
	{
    var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
	document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
//    WebBrowser1.ExecWB(6, 2);//Use a 1 vs. a 2 for a prompting dialog box    
    WebBrowser1.ExecWB(6, 1);
	WebBrowser1.outerHTML = "";  
	return;
  }
return;
}

//***************************
function afficher_imprimer()
{
var html;

html = "<a href='javascript:imprimer();'>" ;
html += "<img src='../images/icones/icone_imprimer_petit.gif' border='0' alt='Imprimer'>" ;
html += "</a>" ;

document.write(html) ;
return;
}

//***********************
function ouvrir_formulaire_contact(param_contact)
{
var fenetre, url;
url = "../formulaire_contact/formulaire_contact.asp?param_contact=" + param_contact ;
fenetre = fenetre_ouvrir(url, "CONTACT", 450, 560) ;
return ;
}

//***********************
function image_bandeau(no_image_affichee)
{
/*
2 = TIC et capital humain
3 = Communication interactive
4 = Ingénierie multimédia
6 = Conseil
7 = Création
8 = Studio
*/
	var no_image, nom_image_1, nom_image_2 ;
	switch (rubrique)
	{
			case 2 :
				no_image = 1 ;
				break ;
			case 3 :
				no_image = 2 ;
				break ;
			case 4 :
				no_image = 3 ;
				break ;
			case 6 :
				no_image = 4 ;
				break ;
			case 7 :
				no_image = 5 ;
				break ;
			case 8 :
				no_image = 6 ;
				break ;
			default :
				no_image = 1 ;
				break ;
	}
nom_image_1 = '<img src="../images/img_commun/bandeau_haut_visuel'+ no_image +'.jpg" >'
nom_image_2 = '<img src="../images/img_commun/bandeau_haut_visuel'+ no_image +'_2.gif" >'
if (no_image_affichee ==1 )
	document.write(nom_image_1) ;
if (no_image_affichee ==2 )
	document.write(nom_image_2) ;		
return ;
	
}

//***********************
function page_onload()
{
layer_init_plateforme();
initialiser_menu_gauche(rubrique);
initialiser_menu_haut();

return;
}

//***********************
function page_onresize()
{
reposition_menu_gauche();
reposition_menu_haut();
window.refresh;
return;
}

//------------------------
function afficher_pixel_trans(l, h)
{
var html;

html="";
html+='<img src="../images/icones/interface_pixel_trans.gif" border="0" ';
html+='width="' + l + '"'; 
html+='height="' + h + '"';  
html+='align="absmiddle">';
document.write(html);
}

