var borderColor = "rgb(135,189,157)";//"#87F7DC";//"black";  "rgb(207,247,220)";//"#00FFFF";//"#C0C0C0";//"#007777";// lightgray : "#C0C0C0";

function create_jsmenu_stylesheet(bgcolor0, bgcolor1, fgcolor0, fgcolor1)
{
borderColor = bgcolor1;// DE: borderColor alignee sur color foncee de fond2

var cssheet = new String('\n');

// menuBar :

// DE20061005 : pour que ifdoc suive bien mbar, nec position relative et pas absolute ?!
// BIZARRE et pas nrmal.  depuis ca remarche avec absolute..a eclairicr plus tard RAF
// par ex see mode inline de ifdoc !
cssheet = cssheet + 
'.menuBar  { margin: 0; padding: 0; \n'+
// URGENT VITAL	goldie '\t position: absolute; top: 0; left: 0; width: 100%; \n'+
// pb abs MAIS useful in testU qd on veut voir la deuxieme Mb par dessus la premiere
'\t position: absolute; top: 0; left: 0; width: 100%; height: 6%; \n'+
// 20061022 GOLD A REST 	 
	'\t position: relative; top: 0; left: 0; width: 100%; height: 6%; \n'+
//	 '\t position: relative; top: 0; left: 0; width: 100%; \n'+
	 '\t border-bottom: 1px solid '+ borderColor +' }\n\n';

// menuHead : (DE 12pt -> 11 pt)

cssheet = cssheet + 
'.menuHead { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; \n'+
	  '\t text-align: center; \n'+
	  '\t border-right: 1px solid '+ borderColor +'; \n'+
	  '\t background-color: '+ bgcolor0 +'; \n'+
	  '\t color: '+ fgcolor0 +'; \n'+
	  '\t white-space: nowrap \n\t}\n\n';

// nowrap en dernier car pas supporté par ie, ok pour op et ff.

cssheet = cssheet + 
'.overMenuHead { font-family: Arial, Helvetica, sans-serif; font-size: 11pt; \n'+
	  '\t text-align: center; \n'+
	  '\t border-right: 1px solid '+ borderColor +'; \n'+
	  '\t background-color: '+ bgcolor1 +'; \n'+
	  '\t color: '+ fgcolor1 +'; \n'+
	  '\t white-space: nowrap \n\t}\n\n';

// menuList
//z-index: 1; GOOD IE6 (not ie5), op et ff; MAIS pas indispensable

cssheet = cssheet + 
'.menuList {  z-index: 1; margin: 0; padding: 0; \n'+
// pour test	  '\t border: thick solid '+ 'red' +'; \n'+
   	  '\t border-top: 1px solid '+ borderColor +'; \n'+
	  '\t position: absolute; display: none; visibility: hidden \n\t}\n\n';

// NB : menulist pourrait prendre la couleur de repos bgcolor0 MAIS alors les items
// devraient osciller entre bgcolor1 (ON) et TRANSPARENT (OFF) avec tous les risques
// que cela comporte pdv gestion transparence-empilement par les navigateurs...
// DONC sol robuste devrait etre cellOFF cellON

/* NB: margin utile, padding inutile car traité par "cellspacing", cellspacing 
par ailleurs INDISPENSABLE pour tout navigateur pour VRAIMENT reduire toutes les marges
*/

/* MYSTERE Q PB : borderlow decell pas vaiement fait?
RAF URGENT TODO : forcer colortrait a fgcolor1...
ou color +- auto ? ..
tip css1 dit bien que def = fgcolor : pas rop mal non plus (mais white)
et mais en fait SUIT la fgcolor ! donc clignote blanc noir...
black black
*/
// menuItem


/*
cssheet = cssheet + 
'.menuItem A { text-decoration: none \n\t}\n\n';
'.overMenuItem A { text-decoration: none \n\t}\n\n';
*/

//		'A.menuItemLink { text-decoration: none; background-color: red; color: black \n\t}\n\n';

/* GOOD but NO MORE 20061022 */
// en fait utile pour FIN de mi (ie a droite); rappel : a gauche la marge est geree par text-indent
// en fait : bof
cssheet = cssheet + 
'.space { font-family:  monospace; font-size: 11pt \n\t}\n\n';


cssheet = cssheet + 
'.menuItem { font-family:  Arial, Helvetica, sans-serif; font-size: 11pt; \n'+
//	  '\t text-align: left; \n'+
// GOLD mais marge pas sym gauche-dr	  '\t text-align: left; text-indent: 1em; line-height: 1.5; \n'+
	  '\t text-align: left; line-height: 1.5; \n'+
	  '\t background-color: '+ bgcolor0 +'; \n'+
	  '\t color: '+ fgcolor0 +'; \n'+
	  '\t margin: 0; padding: 0; \n'+
//	  '\t margin: 0; \n'+
//	  '\t padding-top: 0; padding-bottom: 0; padding-left: 1em; padding-right: 0; \n'+
	  '\t border-bottom: 1px solid '+ borderColor +'; \n'+
	  '\t white-space: nowrap \n\t}\n\n';

cssheet = cssheet + 
'.overMenuItem { font-family:  Arial, Helvetica, sans-serif; font-size: 11pt; \n'+
//	  '\t text-align: left; \n'+
// GOLD mais marge pas sym gauche-dr	  '\t text-align: left; text-indent: 1em; line-height: 1.5; \n'+
	  '\t text-align: left; line-height: 1.5; \n'+
	  '\t background-color: '+ bgcolor1 +'; \n'+
	  '\t color: '+ fgcolor1 +'; \n'+
	  '\t margin: 0; padding: 0; \n'+
//	  '\t margin: 0; \n'+
//	  '\t padding-top: 0; padding-bottom: 0; padding-left: 1em; padding-right: 0; \n'+
	  '\t border-bottom: 1px solid '+ borderColor +'; \n'+
	  '\t white-space: nowrap \n\t}\n\n';

// Menu Item as Link
/* DE20061004 :
je crains que pour gerer correctement les memo de sel H-Item il ne faille
sacrifier la petite main des A, et gerer donc a la main par xx.lcation+target,
cf goto(url, target), les liens.
donc lien comme action.

autre sol : onclick sur a mais la ca devient pas beau et le user doit 
preciser ca luimeme...
par ailleurs zapping entre actionTD et a devient complexe.
sol? zpping de style sur en fait un span !? td nomore with style.

NE PAS PERDRE LE BUT  simple de vue :
le user doit pouvoir constuire facilement un menu DONT
les H ou les I peuvent etre aussi bien une Action (un script al lui, plusexcatment
une expresion de script a evaluer avec sa func-ses valeurs) que un link-tgt !!!
*/
/* good for bgcolor car transp donc "heritee de cell"
MAIS not good for fgcolor tjrs bleue !

cssheet = cssheet + 
'a { text-decoration: none; display: block; width: 100% \n\t}\n\n';

cssheet = cssheet + 
'a:hover { text-decoration: none; display: block; width: 100% \n\t}\n\n';
*/

cssheet = cssheet + 
'a { text-decoration: none; display: block; width: 100% \n\t}\n\n';



/*bof contre grisé autour de cellA qd selected : pas beau ! RAF URGNET TODO au 20061009
"bug" ie ff, pas op !

cssheet = cssheet + 
'a:hover { text-decoration: none; display: block; width: 100% \n\t}\n\n';

cssheet = cssheet + 
'a:active { text-decoration: none; display: block; width: 100% \n\t}\n\n';
*/
/* NOK
cssheet = cssheet + 
'a:active { text-decoration: none; display: block; width: 100%; border-style: none \n\t}\n\n';
*/
/* NOK
cssheet = cssheet + 
'a:focus { text-decoration: none; display: block; width: 100%; border-style: none \n\t}\n\n';
*/


/* GOLDISSIME A REST SI PB au 20061009

// inherit genial pour ff et op; nok ie
cssheet = cssheet + 
'a { text-decoration: none; display: block; width: 100%; \n'+
'    color: '+ fgcolor0 +' \n\t}\n\n';

//'    color: inherit \n\t}\n\n';

// nec pour ie
cssheet = cssheet + 
'a:hover { text-decoration: none; display: block; width: 100%; \n'+
'    color: '+ fgcolor1 +' \n\t}\n\n';

// conclusion : il ya tjrs un pb sur le style de la A selected sous IE!!!

*/




/* GOLD A REST 
cssheet = cssheet + 
'a { text-decoration: none; display: block; width: 100%; \n'+
'    color: '+ fgcolor0 +' \n\t}\n\n';

cssheet = cssheet + 
'a:hover { text-decoration: none; display: block; width: 100%; \n'+
'    color: '+ fgcolor1 +' \n\t}\n\n';
*/



/*

// new 20061009 si on veut que onsel le txt de la A ne soit PAS NOIR !
cssheet = cssheet + 
'a:active { text-decoration: none; display: block; width: 100%; \n'+
'    color: '+ '#00FF00' +' \n\t}\n\n';
cssheet = cssheet + 
'a:visited { text-decoration: none; display: block; width: 100%; \n'+
'    color: '+ 'red' +' \n\t}\n\n';
cssheet = cssheet + 
'a:focus { text-decoration: none; display: block; width: 100%; \n'+
'    color: '+ '#FF00FF' +' \n\t}\n\n';
*/

/*
cssheet = cssheet + 
'a:hover { text-decoration: none; display: block; width: 100%; \n'+
'    color: '+ fgcolor0 +' \n\t}\n\n';
*/

/*
cssheet = cssheet + 
'a { text-decoration: none; display: block; width: 100%; \n'+
'    background-color: '+ bgcolor0 +'; \n'+
'    color: '+ fgcolor0 +' \n\t}\n\n';

cssheet = cssheet + 
'a:hover { background-color: '+ bgcolor1 +'; \n'+
	'\t color: '+ fgcolor1 +' \n\t}\n\n';

*/


// Menu Item as Action

cssheet = cssheet + 
'.menuItemAction { display:block; width: 100% \n\t}\n\n';


/*
cssheet = cssheet + 
'.menuItem A { text-decoration: none \n\t}\n\n';
'.overMenuItem A { text-decoration: none \n\t}\n\n';
		*/

return(cssheet);
}

/* gold
document.writeln("<style type='text/css'>");
document.writeln(create_jsmenu_stylesheet("#71D8FF","#295FFD", "#000000", "#FFFFFF"));
document.writeln("</style>");

RAF: borderWidth : 1px tres fin : pas mal du tout
RAF : un style pour mb, pour bordr ext, et border pour mHead sur right



NB: un jour on pourrait virer styles TD et code js vs TD highlight CAR highlight
pris en charge par A,....MAIS on soblige ainsi a ce que tte option soit forcement un lien,
donc menu=joue le role de navigation interne = ie de tdm du site.
Or on peut imaginer des menus veritablement applicatifs activent des services, et pas 
frocemennt des liens.!
RAF a trancher car alourdit le code...


DE20061022: marge gauche dans item : HELAS merge insensible par padding : 
pas de petite main sur espace.
*/
/* RAF : clarifer la posiition abs ou rel de la MB:
en effet le pb se pose vs la iframe qui suit :
si mb abs, cette iframe se place en 0 et son top ne se voit pas car il sera masqué par la mb
DONC IDEE1= positionner la iframe APRES la MB (forcer un rel if vs Mb?how????)
idee2 batarde mais qui marche : pos rel de mb...mais alors plus possible de tester plusieurs
mb ensemble sur meme page.
idee3 : ne rien preciser du tout : virer abs et virer top left: simplement declarer la mb
en premier tag dans son body !+ 1 br + iframe?! a creuser.
pb alors : je ne pourrai pas la non plus user de 2 mb en test dans le meme pgm

*/