
/*---------------------------------------------------------------------------------------------------------------------*/
/* CONSTANTES HTML																				    */
/*---------------------------------------------------------------------------------------------------------------------*/
	HTMLHsFontHead			= 'font_normal' ;
	HTMLHsFontBottom		= 'font_normal' ;
/*---------------------------------------------------------------------------------------------------------------------*/
	HTMLBR         		= '<br />' ;
/*---------------------------------------------------------------------------------------------------------------------*/
	HTMLOpenTR     		= '<tr>' ;
/*---------------------------------------------------------------------------------------------------------------------*/
	HTMLCloseAcronym		= '</acronym>' ;
	HTMLCloseP     		= '</p>' ;
	HTMLCloseDiv   		= '</div>' ;
	HTMLCloseSpan  		= '</span>' ;
/*---------------------------------------------------------------------------------------------------------------------*/
	HTMLCloseTD    		= '</td>' ;
	HTMLCloseTR    		= '</tr>' ;
	HTMLCloseTDTR  		= '</td></tr>' ;
	HTMLCloseTable 		= '</table>' ;
/*---------------------------------------------------------------------------------------------------------------------*/
	HTMLCloseForm  		= '</form>' ;
/*---------------------------------------------------------------------------------------------------------------------*/

function HTMLPageAlign(pAlign)
{
	var iHTML = '' ;
	if (pAlign != '/')
	{
		(gNavigator == 'Microsoft Internet Explorer') ? iHTML += '<div style="text-align: ' + pAlign + ';">' :
											   iHTML += '<div align="' + pAlign + '">' ;
	}
	else iHTML += HTMLCloseDiv ;
	return iHTML ;
}

function HTMLOpenForm(pName,pSubmit,pMethod,pAction)
{
	var iHTML = '' ;
	iHTML += '<form ' ;
	iHTML += 'style="margin: 0px; padding: 0px;" ' ;
	iHTML += 'name="' + pName + '"' ;
	iHTML += (pSubmit != '') ? ' onsubmit="' + pSubmit + '"' : '' ;
	iHTML += (pMethod != '') ? ' method="' + pMethod + '"' : '' ;
	iHTML += (pAction != '') ? ' action="' + pAction + '"' : '' ;
	iHTML += '>' ;
	return iHTML ;
}

function HTMLOpenTable(pWidth,pHeight,pStyle,pClass)
{
	var iHTML   = '' ;
	var iWidth  = (pWidth  == null) ? '100%;' : (pWidth  + 'px;') ;
	var iHeight = (pHeight == null) ? '100%;' : (pHeight + 'px;') ;
	iHTML += '<table ' ;
	iHTML += 'style="' ;
	iHTML += (pStyle != '') ? (pStyle + ' ') : '' ;
	iHTML += ((pWidth  == null) || (pWidth  > 0)) ? ('width: '  + iWidth  + ' ') : '' ; 
	iHTML += ((pHeight == null) || (pHeight > 0)) ? ('height: ' + iHeight + ' ') : '' ;
	iHTML += 'border-width: 0px; border-collapse: collapse;" ' ;
	iHTML += 'cellspacing="0" cellpadding="0"' ;
	iHTML += (pClass  != '') ? (' class="' + pClass + '"') : '' ;
	iHTML += '>' ;
	return iHTML ;
}

function HTMLCellule(pWidth,pHeight,pColspan,pStyle,pClass,pCellule,pOkTR,pID)
{
	var iHTML    = '' ;
	var iWidth   = 'auto;' ;
	var iHeight  = 'auto;' ;
	if (pWidth  != 'auto') { iWidth  = (pWidth  == null) ? '100%;' : (pWidth  + 'px;') ; }
	if (pHeight != 'auto') { iHeight = (pHeight == null) ? '100%;' : (pHeight + 'px;') ; }
	iHTML += (pOkTR) ? HTMLOpenTR : '' ;
	iHTML += '<td ' ;
	iHTML += (pID    != null) ? ('id="' + pID + '" ') : '' ;
	iHTML += (pClass != ''  ) ? ('class="' + pClass + '" ') : '' ;
	iHTML += 'style="'
	iHTML += 'width: ' + iWidth + ' height: ' + iHeight ;
	iHTML += (pStyle != '') ? (' ' + pStyle) : '' ;
	iHTML += '"' ;
	iHTML += (pColspan >  1) ? (' colspan="' + pColspan + '"') : '' ;
	iHTML += '>' ;
	iHTML += pCellule ;
	iHTML += (pOkTR != null) ? '</td>' : '' ;
	iHTML += (pOkTR) ? HTMLCloseTR : '' ;
	return iHTML ;
}

function HTMLCelluleMargin(pWidth,pHeight,pMargin,pStyle,pClass,pCellule,pID)
{
	var iHTML = '' ;
	iHTML += HTMLOpenTR ;
	iHTML += HTMLCellule(pMargin,pHeight,1,'','','',false) ;
	iHTML += HTMLCellule(pWidth ,pHeight,1,pStyle,pClass,pCellule,false,pID) ;
	iHTML += HTMLCellule(pMargin,pHeight,1,'','','',false) ;
	iHTML += HTMLCloseTR ;
	return iHTML ;
}

function HTMLBlock(pBalise,pStyle,pClass,pBlock,pOkBalise,pID)
{
	var iHTML = '' ;
	iHTML += '<' + pBalise ;
	iHTML += (pID != null) ? (' id="' + pID + '"') : '' ;
	iHTML += (pClass != '') ? (' class="' + pClass + '"') : '' ;
	iHTML += (pStyle != '') ? (' style="' + pStyle + '"') : '' ;
	iHTML += '>' ;
	iHTML += pBlock ;
	iHTML += (pOkBalise) ? '</' + pBalise + '>' : '' ;
	return iHTML ;
}

function HTMLLink(pString,pUrl,pTitle,pClass,pTarget,pID)
{
	var iHTML = '' ;
	iHTML += '<a ' ;
	iHTML += 'title="' + pTitle + '"' ;
	iHTML += (pID != null) ? (' id="' + pID + '"') : '' ;
	iHTML += (pUrl != '') ? (' href="' + pUrl + '"') : '' ;
	iHTML += (pClass != '') ? (' class="' + pClass + '"') : '' ;
	iHTML += (pTarget != '') ? (' target="' + pTarget + '"') : '' ;
	iHTML += '>' ;
	iHTML += pString ;
	iHTML += '</a>' ;
	return iHTML ;
}

function HTMLAcronym(pTitle)
{
	return '<acronym title="' + pTitle + '" style="border: 0px;">' ;
}

function HTML_IMG(pDATA,pEXT,pIMG,pOver,pWidth,pHeight,pBorder,pStyle,pAlign,pAlternate,pl,pID)
{
	var iHTML   = '' ;
	var iOver   = pIMG + '_over' ;
	var iFormat = '.' + pEXT ;
	var iUrl    = (pl != '') ? (gDataPath + pDATA + '/' + pl + '/') : (gDataPath + pDATA + '/') ;
	iHTML += '<img ' ;
	iHTML += (pID != null) ? ('id="' + pID + '" ') : '' ;
	iHTML += 'alt="' + pAlternate + '" ' ;
	iHTML += 'src="' + iUrl + pIMG + iFormat + '" ' ;
	iHTML += 'style="'
	iHTML += 'width: ' + pWidth + 'px; ' ; 
	iHTML += 'height: ' + pHeight + 'px; ' ;
	iHTML += 'border: ' + pBorder ;
	iHTML += (pStyle  != '') ? (' ' + pStyle) : '' ;
	iHTML += '"' ;
	iHTML += (pOver) ? (' onmouseover="this.src=\'' + iUrl + iOver + iFormat + '\'"') : '' ;
	iHTML += (pOver) ? (' onmouseout="this.src=\'' + iUrl + pIMG + iFormat + '\'"') : '' ;
	iHTML += (pAlign != '') ? (' align="' + pAlign + '"') : '' ;
	iHTML += ' />' ;
	return iHTML ;
}

function HTMLImage(pImage,pOver,pWidth,pHeight,pBorder,pStyle,pAlign,pAlternate,pl,pID)
{
	return HTML_IMG('data/gif','gif',pImage,pOver,pWidth,pHeight,pBorder,pStyle,pAlign,pAlternate,pl,pID) ;
}

function HTMLPicture(pImage,pOver,pWidth,pHeight,pBorder,pStyle,pAlign,pAlternate,pl,pID)
{
	return HTML_IMG('data/png','png',pImage,pOver,pWidth,pHeight,pBorder,pStyle,pAlign,pAlternate,pl,pID) ;
}

function HTMLPhoto(pPhoto,pOver,pWidth,pHeight,pBorder,pStyle,pAlign,pAlternate,pl,pID)
{
	return HTML_IMG('data/jpeg','jpg',pPhoto,pOver,pWidth,pHeight,pBorder,pStyle,pAlign,pAlternate,pl,pID) ;
}

function HTMLPhotoGalleryClass(pPhoto,pDirectory,pWidth,pHeight,pBorder,pClass,pAlign,pAlternate)
{
	var iHTML   = '' ;
	var iDiapo  = 'diapo_' + pPhoto ;
	var iPhoto  = 'photo_' + pPhoto ;
	var iFormat = '.jpg' ;
	var iUrl    = gDataPath + 'data/jpeg/' ;
	if (pDirectory != 'none')
	{
		iUrl += pDirectory + '/' ;
	}
	iHTML += '<a href="' + iUrl + iPhoto + iFormat + '" class="highslide" onclick="return hs.expand(this);">' ;
	iHTML += '<img ' ;
	iHTML += (pClass) ? 'class="' + pClass + '" ' : '' ;
	iHTML += (pAlign) ? 'align="' + pAlign + '" ' : '' ;
	iHTML += 'alt="' + pAlternate + '" ' ;
	iHTML += 'src="' + iUrl + iDiapo + iFormat + '" ' ;
	iHTML += 'style="border: ' ;
	iHTML += (pBorder) ? ('1px solid #' + pBorder + ';') : '0px;' ;
	iHTML += (pWidth ) ? (' width: '  + pWidth  + 'px;') : '' ; 
	iHTML += (pHeight) ? (' height: ' + pHeight + 'px;') : '' ;
	iHTML += '" /></a>' ;
	return iHTML ;
}

function HTMLPhotoGallery(pPhoto,pDirectory,pWidth,pHeight,pColor)
{
	var iHTML   = '' ;
	var iDiapo  = 'diapo_' + pPhoto ;
	var iPhoto  = 'photo_' + pPhoto ;
	var iFormat = '.jpg' ;
	var iUrl    = gDataPath + 'data/jpeg/' ;
	if (pDirectory != 'none')
	{
		iUrl += pDirectory + '/' ;
	}
	iHTML += '<a href="' + iUrl + iPhoto + iFormat + '" class="highslide" ' ;
	iHTML += 'onclick="return hs.expand(this, { wrapperClassName: \'borderless floating-caption\' })">' ;
	iHTML += '<img ' ;
	iHTML += 'alt="" ' ;
	iHTML += 'src="' + iUrl + iDiapo + iFormat + '" ' ;
	iHTML += 'style="margin' ;
	iHTML += (pColor != 'none') ? ('-top: 10px; margin-bottom: 10px; margin-left: 0px; margin-right: 20px; padding: 0px; border: 1px solid #' + pColor + '; ') : (': 0px; padding: 0px; ') ;
	iHTML += 'width: ' + pWidth + 'px; ' ; 
	iHTML += 'height: ' + pHeight + 'px;"' ;
	iHTML += ' /></a>' ;
	return iHTML ;
}

function HTMLPhotoContent(pPhoto,pUrl,pWidth,pHeight,pStyle,pAlign,pTitle,pDownload,pClose)
{
	var iHTML   = '' ;
	var iDiapo  = 'diapo_' + pPhoto ;
	var iPhoto  = 'photo_' + pPhoto ;
	var iFormat = '.jpg' ;
	iHTML += '<a href="' + pUrl + iPhoto + iFormat + '" class="highslide" onclick="return hs.expand(this);">' ;
	iHTML += '<img ' ;
	iHTML += 'alt="' + pTitle + '" ' ;
	iHTML += 'src="' + pUrl + iDiapo + iFormat + '" ' ;
	iHTML += 'style="'
	iHTML += 'width: ' + pWidth + 'px; ' ; 
	iHTML += 'height: ' + pHeight + 'px;' ;
	iHTML += (pStyle  != '') ? (' ' + pStyle) : '' ;
	iHTML += '"' ;
	iHTML += (pAlign != '') ? (' align="' + pAlign + '"') : '' ;
	iHTML += ' /></a>' ;
	if (pTitle)
	{
		iHTML += '<span class="highslide-heading">' ; 
		iHTML += '<span class="' + HTMLHsFontHead + '">' ;
		iHTML += pTitle.bold() ;
		iHTML += '</span></span>' ;
	}
	if ((pDownload) || (pClose))
	{
		iHTML += '<span class="highslide-caption" style="text-align: right;">' ; 
		iHTML += '<span class="' + HTMLHsFontBottom + '">' ;
		iHTML += (pDownload) ? ('<a href="javascript: Download_Photo(\'' + iPhoto + iFormat + '\');">' + pDownload + '</a>') : '' ;
		iHTML += ((pDownload) && (pClose)) ? ' | ' : '' ;
		iHTML += (pClose) ? ('<a href="#" onclick="return hs.close(this)">' + pClose + '</a>') : '' ;
		iHTML += '</span></span>' ;
	}
	return iHTML ;
}
function HTMLPhotoContentLink(pLink,pUrl,pTitle,pDownload,pClose)
{
	var iHTML = '' ;
	iHTML += '<a href="' + pUrl + '" class="highslide" onclick="return hs.expand(this);">' + pLink + '</a>' ;
	if (pTitle)
	{
		iHTML += '<span class="highslide-heading">' ; 
		iHTML += '<span class="' + HTMLHsFontHead + '">' ;
		iHTML += pTitle.bold() ;
		iHTML += '</span></span>' ;
	}
	if ((pDownload) || (pClose))
	{
		iHTML += '<span class="highslide-caption" style="text-align: right;">' ; 
		iHTML += '<span class="' + HTMLHsFontBottom + '">' ;
		iHTML += (pDownload) ? ('<a href="javascript: Download_Photo(\'' + iPhoto + iFormat + '\');">' + pDownload + '</a>') : '' ;
		iHTML += ((pDownload) && (pClose)) ? ' | ' : '' ;
		iHTML += (pClose) ? ('<a href="#" onclick="return hs.close(this)">' + pClose + '</a>') : '' ;
		iHTML += '</span></span>' ;
	}
	return iHTML ;
}

function HTMLContent(pId,pContent,pStyle,pTitle,pClose)
{
	var iHTML = '' ;
	iHTML += '<div class="highslide-html-content" id="my-content-' + pId + '" style="' + pStyle + '">' ;
	iHTML += (pTitle) ? pTitle : '' ;
	iHTML += ((pTitle) && (pClose)) ? ' | ' : '' ;
	iHTML += (pClose) ? '<a href="#" onclick="hs.close(this)">' + pClose + '</a>' : '' ;
	iHTML += '<div class="highslide-body">' + pContent + '</div>' ;
	iHTML += '</div>' ;
	return iHTML ;
}

function HTMLDewplayer(pMp3,pDew,pWidth,pHeight,pAuto)
{
	var iHTML = '' ;
	var iUrl  = 'http://www.creationdesitesweb-webartmedia.com/ressources/swf/dewplayer' + pDew + '.swf?son=' ;
	var iAuto = (pAuto) ? '&autoplay=1' : '' ;
	iHTML += '<object ' ;
	iHTML += 'type="application/x-shockwave-flash" ' ;
	iHTML += 'data="' + iUrl + pMp3 + iAuto + '" ' ;
	iHTML += 'style="width: ' + pWidth + 'px; height: ' + pHeight + 'px; vertical-align: middle;"' ;
	iHTML += '>' ;
	iHTML += '<param name="movie" value="' + iUrl + pMp3 + '" />' ;
	iHTML += '<param name="wmode" value="transparent" />' ;
	iHTML += (pAuto) ? '<param name="autoplay" value="1" />' : '' ;
	iHTML += '</object>' ;
	return iHTML ;
}

function HTMLFlvplayer(pFlv,pWidth,pHeight,pColor1,pColor2,pColor3,pClass,pAuto,pShow)
{
	var iHTML = '' ;
	var iUrl  = 'http://www.creationdesitesweb-webartmedia.com/ressources/swf/flvplayer.swf' ;
	var iAuto = (pAuto) ? '&autoplay=1' : '' ;
	var iShow = (pShow) ? '&showplayer=autohide' : '&showplayer=never&loop=1' ;
	iHTML += '<object type="application/x-shockwave-flash" data="' + iUrl + '" style="border: 0px; width: ' + pWidth + 'px; height: ' + pHeight + 'px;"' ;
	iHTML += (pClass != null) ? ' class="' + pClass + '">' : '>';
	iHTML += '<param name="movie" value="' + iUrl + '" />' ;
	iHTML += '<param name="flashvars" value="flv=' + pFlv ;
	iHTML += '&width=' + pWidth + '&height=' + pHeight ;
	iHTML += '&skin=http://www.creationdesitesweb-webartmedia.com/ressources/jpeg/flvplayer_' + pWidth + 'x' + pHeight + '.jpg' ;
	iHTML += '&margin=1' ;
	iHTML += '&autoload=1' + iAuto + iShow ;
	iHTML += '&loadingcolor=' + pColor3 ;
	iHTML += '&buttoncolor=' + pColor1 ;
	iHTML += '&buttonovercolor=' + pColor2 ;
	iHTML += '&slidercolor1=' + pColor1 ;
	iHTML += '&slidercolor2=' + pColor1 ;
	iHTML += '&sliderovercolor=' + pColor2 ;
	iHTML += '&playertimeout=500' ;
	iHTML += '&volume=200" />' ;
	iHTML += '<param name="wmode" value="transparent" />' ;
	iHTML += '</object>' ;
	return iHTML ;
}

function HTMLLogoWAM(pColor)
{
	var iImage = '<img alt="WEB &#149; ART &#149; MEDIA" src="http://www.creationdesitesweb-webartmedia.com/ressources/gif/logo_wam_' + pColor + '.gif" style="border: 0px; width: 60px; height: 40px; vertical-align: middle;" />' ;
	return HTMLLink(iImage,'http://www.creationdesitesweb-webartmedia.com','WEB &#149; ART &#149; MEDIA','','_blank') ;
}
