// champs obligatoires
function checkrequiredfields() {
    for(i=0; i < checkrequiredfields.arguments.length; i++) {
        if (document.myform.elements[checkrequiredfields.arguments[i]].value == "") {
            alert("Mandatory field ");
            document.myform.elements[checkrequiredfields.arguments[i]].focus();
            return false;
        }
    }
    return true;
}


// menu 
sfHover = function() {
    if (document.getElementById("menu")) {
        var ellt = document.getElementById("menu").getElementsByTagName("li");
        for (var i=0; i<ellt.length; i++) {
            ellt[i].onmouseover=function() {
                this.className+=" sfhover";
            }
            ellt[i].onmouseout=function() {
                this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
            }
        }
    }
}
if (window.attachEvent) {
    window.attachEvent("onload", sfHover);
}

function getSwf(id, src, width, height, color) {
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '" id="' + id + '" align="middle">\n');
    document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
    document.write('<param name="movie" value="' + src + '" />\n');
    document.write('<param name="quality" value="high" />\n');
    document.write('<param name="wmode" value="transparent" />\n');
    document.write('<param name="bgcolor" value="' + color + '" />\n');
    document.write('<embed src="' + src + '" quality="high" wmode="transparent" bgcolor="' + color + '" width="' + width + '" height="' + height + '" name="' + id + '" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
    document.write('</object>\n');
}

function init_page(ln) {
	document.myform.action = ln + ',search.html';
	document.myform.s_page.value = 1;
	document.myform.submit();
}
	
function change_search_page(page,ln,search) {
	document.myform.action = ln + ',search.html';
	document.myform.p_action.value = 'search';
	document.myform.s_page.value = page;
	document.myform.search.value = search;
	document.myform.submit();
}

function get_search_result(ln) {
	document.myform.action = ln + ',search.html';;
	document.myform.p_action.value = 'search';
	document.myform.s_page.value = 1;
	document.myform.submit();
}
