function focusInput(path) {
if ( path.value == path.defaultValue ) {
path.value = '';
}
}

function blurInput(path) {
if ( path.value == '' ) {
path.value = path.defaultValue;
}
}

function launchSearch(myForm) {

if ( myForm.mc.value.length < 3 ) {
alert('Le mot-clé est trop court (3 caractères minimum)');
return false;
}

return true;

/*
if ( myForm.mc.value.length >= 4 ) {
window.location.href = myRoot + 'search/' + myForm.type.options[myForm.type.selectedIndex].value + '-' + myForm.mc.value;
}
*/
}

function searchLnk() {
frm = document.getElementById('cse-search-box');

if ( frm && frm.q.value != '' ) {
window.location = myRoot + 'divers/search.php?mc=' + frm.q.value;

// 'cancel' the "href"
return false;
}

return  true;
}

function editMenu() {
filePath = window.document.location.pathname;
start    = filePath.lastIndexOf('/') + 1;
end      = filePath.lastIndexOf('.');
len      = end - start;
fileID   = 'menu_' + filePath.substr(start, len);

if ( myLink = document.getElementById(fileID) ) {
myLink.className = 'red';
myLink.title     = 'Page actuelle';
}
}

function correctSearchForm() {
searchForm = document.getElementById('cse-search-box');

if ( searchForm && searchForm.q && searchForm.sa ) {

if ( searchForm.q.offsetTop != searchForm.sa.offsetTop ) {
searchForm.sa.style.top = searchForm.q.offsetTop + 'px';
}
}
}
window.onload = correctSearchForm;

// -------------------------------------------
// JS CODE 4 EXTERNAL SERVICES

show         = ( window.location.hostname != 'localhost' ) ? true : false;
gc           = new Array; // [0] = border, [1] = bg, [2] = link, [3] = url, [4] = text
gc['blue']   = ['E9F0F8', 'E9F0F8', '1F2887', '008000', '2C143D'];
gc['marron'] = ['FFF8F0', 'FFF8F0', '4F2500', '008000', '2C143D'];
gc['mauve']  = ['F0F0FF', 'F0F0FF', '8C42BD', '008000', '2C143D'];
gc['noir']   = ['2B2B56', '2B2B56', 'FF9900', '00CC00', 'FF9900'];
gc['vert']   = ['F7FBF7', 'F7FBF7', '233823', '008000', '2C143D'];
gc['def']    = ['FFFFFF', '0000FF', 'FFFFFF', '000000', '008000'];
uc           = gc[uc] ? uc : 'def';


function showXiTi() {

if ( show ) {
document.write('<a href="http://www.xiti.com/xiti.asp?s=55729" title="Mesurez votre audience">');

Xt_param = 's=55729&p=';
Xt_r = document.referrer;
Xt_h = new Date();
Xt_i = '<img width="39" height="25" border="0" ';
Xt_i += 'src="http://logv13.xiti.com/hit.xiti?'+Xt_param;
Xt_i += '&hl='+Xt_h.getHours()+'x'+Xt_h.getMinutes()+'x'+Xt_h.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xt_s=screen;Xt_i+='&r='+Xt_s.width+'x'+Xt_s.height+'x'+Xt_s.pixelDepth+'x'+Xt_s.colorDepth;}
document.write(Xt_i+'&ref='+Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$')+'" title="Analyse d\'audience">');

document.write('<noscript>');
document.write('audit et mesure d\'audience visiteurs internet par <img width="39" height="25" src="http://logv13.xiti.com/hit.xiti?s=55729&amp;p=" alt="Analyse d\'audience" />');
document.write('</noscript>');
document.write('</a>');
}
}