Linux lhjmq-records 5.15.0-118-generic #128-Ubuntu SMP Fri Jul 5 09:28:59 UTC 2024 x86_64
Your IP : 3.15.225.188
//INIT FUNCTION CALLS
var xml_path = "xml/";
var xsl_path = "xsl/";
var evolution_path = "_tableaux/evolution_v2/";
var relatifs_path = "_tableaux/relatifs/";
var pop_type = "0";
var ligue_last = "";
var equipe_last = "";
var franchise_last = "";
var btn_selection = "";
var final_file_name_without_year = "";
var drop_scheme = "";
var select_exists = false;
var pre_opened_browser = "";
var selected_type = "ligue";
var is_main_selector = false;
var p_lang = "fr";
var document_title = p_lang == "fr" ? ":: Livre des records de la LHJMQ ::" : ":: QMJHL's all-time records ::";
var version_to_validate = Number(6);
var get_nav_version;
var get_nav_agent_array;
var split_n = Number(0);
var navigator_error_fr = "La section « Livre des records de la LHJMQ » ne peut s'afficher que sous la version 6 (ou plus récente) d'Internet Explorer.\nVeuillez mettre à jour votre navigateur.";
var navigator_error_en = "To view the QMJHL Record's book website, Internet Explorer 6 or later version is required";
var subdirectory = default_rep2.split("||");
var subdirectory_path = subdirectory[0]+'/'+subdirectory[1];
var is_subdirectory_exists = 'L';
window.onload = function()
{
document.getElementById("section00").value = '-1';
//console.log(navigator.userAgent)
if(document.body)
{
if(document.location.href.indexOf('indexsk.php') != -1)
{
if (navigator.userAgent.indexOf('MSIE') != -1)
{
get_nav_agent_array = navigator.userAgent.split(";")
get_nav_version = get_nav_agent_array[1].split("MSIE ").join("")
split_n = parseFloat(get_nav_version.split("."))
if(split_n < version_to_validate)
{
//alert(eval("navigator_error_" + p_lang));
document.location.href = "./index.php"
return;
}
}
/*
if (navigator.userAgent.indexOf('Safari') != -1)
{
if(p_lang == 'en')
{
navigator_msg = "<center><div style='margin-top:50px; text-align:center; font-size:12px;font-family:Arial; color:#000; width:350px'>" +
"<a href='http://www.getfirefox.com' target='_blank' border='0' style='color:#000;'><img src='img/firefox_logo.png' /></a><br /><br />This site is optimized for the latest version of <a href='http://www.getfirefox.com' target='_blank' style='color:#ffffff;' alt='Téléchargez-le maintenant'><u>Firefox</u></a>.<br />Click on the logo to download free." +
"</div></center>";
}
else
{
navigator_msg = "<center><div style='margin-top:50px; text-align:center; font-size:12px;font-family:Arial; color:#000; width:350px'>" +
"<a href='http://www.mozilla-europe.org/fr/' target='_blank' border='0' style='color:#000;'><img src='img/firefox_logo.png' /></a><br /><br />Ce site est optimisé pour la version la plus récente de <a href='http://www.mozilla-europe.org/fr/' target='_blank' style='color:#000;' alt='Téléchargez-le maintenant'><u>Firefox</u></a>.<br />Cliquez sur le logo pour le télécharger gratuitement." +
"</div></center>";
}
document.write(navigator_msg);
}
*/
else
{
if(document.getElementById("search_tool"))
{
if(document.getElementById("main_records"))
{
document.getElementById("preload_msg").style.display = "none"
swf_header()
}
}
}
}
else
{
if(document.getElementById("search_tool"))
{
if(document.getElementById("main_records"))
{
document.getElementById("preload_msg").style.display = "none"
swf_header()
}
}
}
}
}
//INIT FUNCTION CALLS
function start_display()
{
this.window.name = "records_win"
document.title = document_title
if(document.location.href.indexOf("indexsk.php") > 0)
{
scheme = document.getElementById("section2_number").value + document.getElementById("section3_number").value
if(!scheme)
scheme = '11'
//-->TABLEAUX DETECTION
//alert('answer : is_catcher : ' + is_catcher);
if(is_catcher)
{
document.getElementById("section02").value = catch_rep
get_final_xml_name(catch_file, p_lang)
catcher_rep = catch_rep
}
else
{
document.getElementById("section02").value = subdirectory[0];
get_final_xml_name(default_xml_file_name, p_lang);
catcher_rep = subdirectory[0];
}
if(document.getElementById("main_records"))
load_and_transform(xml_path + 'root.xml', xsl_path + 'main_tool_selectors.xsl', 'main_level_tool', null, {lang: p_lang, level_type: scheme});
if(document.getElementById("main_level_tool"))
load_and_transform(xml_path + 'root.xml', xsl_path + 'saisons.xsl', 'main_seasons', null, {season_in: '0', season_out: '3000', lang: p_lang});
if(document.getElementById("main_seasons"))
load_and_transform(xml_path + 'root.xml', xsl_path + 'second_tool_selectors.xsl', 'second_level_tool', null, {lang: p_lang});
//alert('answer : final_file_name_without_year : ' + final_file_name_without_year);
//alert('answer : actual_record_file : ' + actual_record_file);
actual_record_file_no_slash = actual_record_file.split("/")
if (document.getElementById("section02").value == 'V'){
//alert('answer : actual_record_file_no_slash : ' + actual_record_file_no_slash[1]);
//PARSE ACTUAL_RECORD_FILE_NAME
actual_record_file_without_year = actual_record_file_no_slash[1].split("_"); // actual_record_file_no_slash[1].split("_")
}
else
{
//alert('answer : actual_record_file_no_slash : ' + actual_record_file_no_slash[2]);
actual_record_file_without_year = actual_record_file_no_slash[2].split("_"); // actual_record_file_no_slash[1].split("_")
}
//alert('answer : actual_record_file_without_year : ' + actual_record_file_without_year[1]);
if(actual_record_file_without_year[1])
final_file_name_without_year = actual_record_file_without_year[1];
else
final_file_name_without_year = null
if(actual_record_file_without_year[0])
final_file_name_with_year = actual_record_file_without_year[0]; //'Z';
else
final_file_name_with_year = null
//DETECT IF THERE IS A «CETTE SAISON» XML FILE
is_this_season_exists = is_file_exists(xml_path + selected_season + "/" + selected_season + "_" + final_file_name_without_year)
if(!is_this_season_exists)
file_path = 'false';
else
file_path = selected_season
//alert('answer final_file_name_without_year : ' + final_file_name_without_year);
//DETECT IF THERE IS A «EVOLUTION» XML FILE
//alert(xml_path + evolution_path + document.getElementById("section00").value + '/' + final_file_name_without_year);
//alert("1 : " + document.getElementById("section00").value);
if (document.getElementById("section00").value != '-1'){
is_evolution_exists = is_file_exists(xml_path + evolution_path + document.getElementById("section00").value + '/' + final_file_name_without_year);
is_subdirectory_exists = document.getElementById("section00").value;
}
else
{
is_evolution_exists = is_file_exists(xml_path + evolution_path + subdirectory[1] + '/' + final_file_name_without_year);
is_subdirectory_exists = subdirectory[1];
}
//alert('1: '+ is_subdirectory_exists);
//DETECT IF THERE IS A RELATIFS» XML FILE
//alert('section02 : ' + document.getElementById("section02").value);
// modification hugo remove records relatifs
if (document.getElementById("section02").value == 'V'){
is_relatifs_exists = is_file_exists(xml_path + relatifs_path + final_file_name_without_year);
}
else{
is_relatifs_exists = is_file_exists(xml_path + relatifs_path + "/" + default_rep + "/" + final_file_name_without_year);
}
// modification hugo remove records relatifs set value to false
is_relatifs_exists = false;
//<--TABLEAUX DETECTION
//CHANGED BY CAMIL 2009-02-23
//load_and_transform(xml_path + actual_record_file, xsl_path + 'records.xsl', 'main_records', null, {lang: p_lang, actual_file: actual_record_file_no_slash[1], thisseason: file_path, img_year: selected_season, is_evolution: is_evolution_exists, is_relatifs: is_relatifs_exists});
// modification hugo remove most populaire records get_pop_record(0)
//get_pop_record(0)
get_section_number(document.getElementById('section2_number'), '1')
get_section_number(document.getElementById('section3_number'), '1')
set_tool_texts(p_lang)
get_default(selected_type, null, null, null, true)
if(debug)
document.getElementById("debug_zone").style.display = "block"
else
document.getElementById("debug_zone").style.display = "none"
}
load_pub_sidebar();
}
//-->
function get_default(type, level_id_0, level_id_1, level_id_2, is_default, is_reload)
{
selected_type = type
if(!type)
type = 'ligue'
if(!level_id_0)
level_id_0 = '0'
if(!level_id_1)
level_id_1 = '11LJ'
if(!level_id_2)
level_id_2 = '1LJ2But'
level_id_3 = "1LJ3ButBPB"
level_id_4 = "1LJ4ButBPBPJO"
level_id_5 = "1LJ5ButBPBPJO1Sa"
drop_label_0 = p_lang == "fr" ? "Joueurs" : "Players";
drop_label_1 = p_lang == "fr" ? "Buts" : "Goals";
drop_label_2 = p_lang == "fr" ? "Plus de buts" : "Most goals";
drop_label_3 = p_lang == "fr" ? "Par un joueur" : "By a player";
drop_label_4 = p_lang == "fr" ? "En une saison" : "One season";
drop_label_5 = p_lang == "fr" ? "Dom. et étr." : "Home and away";
if(is_default)
{
document.getElementById("select_ligue").checked = true
document.getElementById("select_equipe").checked = false
document.getElementById("select_franchise").checked = false
document.getElementById("ligue_selector").style.display = "block"
document.getElementById("equipe_selector").style.display = "block"
document.getElementById("franchise_selector").style.display = "block"
document.getElementById("select_carriere").checked = true
document.getElementById("select_reg").checked = true
}
//if(is_reload)
//{
//}
//else
//{
document.getElementById("ligue_selector").style.display = "none"
document.getElementById("equipe_selector").style.display = "none"
document.getElementById("franchise_selector").style.display = "none"
this_selector = document.getElementById(type + "_selector")
//alert(this_selector.id)
if(this_selector.length > 0)
this_selector.style.display = "block";
//testing = document.getElementById("drop_second_level").value.split("@")
//alert(testing[0])
if(is_default)
{
if(type == 'ligue')
{
get_type_level_and_id('|' + type + '0|' + level_id_0, 'second_tool_selectors.xsl', 'second_level_tool', document.getElementById('ligue_selector'), drop_label_0);
get_type_level_and_id('|' + type + '1|' + level_id_1, 'third_tool_selectors.xsl', 'thrid_level_tool', document.getElementById('ligue_selector'), drop_label_1);
get_type_level_and_id('|' + type + '2|' + level_id_2, 'forth_tool_selectors.xsl', 'forth_level_tool', document.getElementById('ligue_selector'), drop_label_2);
get_type_level_and_id('|' + type + '3|' + level_id_3, 'fifth_tool_selectors.xsl', 'fifth_level_tool', document.getElementById('ligue_selector'), drop_label_3);
get_type_level_and_id('|' + type + '4|' + level_id_4, 'sixth_tool_selectors.xsl', 'sixth_level_tool', document.getElementById('ligue_selector'), drop_label_4);
get_type_level_and_id('|' + type + '5|' + level_id_5, 'seventh_tool_selectors.xsl', 'seventh_level_tool', document.getElementById('ligue_selector'), drop_label_5);
}
else if(type == 'equipe')
{
get_type_level_and_id('|' + type + '0|' + level_id_0, 'second_tool_selectors.xsl', 'second_level_tool', document.getElementById('equipe_selector'), "");
get_type_level_and_id('|' + type + '1|' + level_id_1, 'third_tool_selectors.xsl', 'thrid_level_tool', document.getElementById('equipe_selector'), "");
get_type_level_and_id('|' + type + '2|' + level_id_2, 'forth_tool_selectors.xsl', 'forth_level_tool', document.getElementById('equipe_selector'), "");
}
else if(type == 'franchise')
{
get_type_level_and_id('|' + type + '0|' + level_id_0, 'second_tool_selectors.xsl', 'second_level_tool', document.getElementById('franchise_selector'), "");
get_type_level_and_id('|' + type + '1|' + level_id_1, 'third_tool_selectors.xsl', 'thrid_level_tool', document.getElementById('franchise_selector'), "");
get_type_level_and_id('|' + type + '2|' + level_id_2, 'forth_tool_selectors.xsl', 'forth_level_tool', document.getElementById('franchise_selector'), "");
}
}
if(!is_default)
{
if(type == 'franchise')
{
get_section_letter(document.getElementById('section02'), "V");
get_section_number(section2_number, '1');
reload_drop_lists(true)
}
else
reload_drop_lists(true, selected_type)
}
//}
if(is_default)
{
get_section_letter(document.getElementById('section00'), document.getElementById("select_ligue").value, '0')
get_section_letter(document.getElementById('section01'), document.getElementById("ligue_selector").value)
get_section_letter(document.getElementById('section02'), document.getElementById("select_carriere").value)
get_section_letter(document.getElementById('section03'), document.getElementById("select_reg").value)
get_section_letter(document.getElementById('section04'), "ButBPBPJO1SaD-E")
}
}
//<--
//-->
function sortTypeDispatcher(field_name, div_name)
{
if(eval('typeof sort_type_' + field_name + '_' + div_name + ' != \'undefined\''))
{
if(eval("previous_field_" + div_name + "_name") != (field_name + '_' + div_name))
eval('sort_type_' + field_name + '_' + div_name + ' = \'ascending\'')
else if(eval('sort_type_' + field_name + '_' + div_name + ' == \'ascending\''))
eval('sort_type_' + field_name + '_' + div_name + ' = \'descending\'')
else
eval('sort_type_' + field_name + '_' + div_name + ' = \'ascending\'')
}
else
eval('sort_type_' + field_name + '_' + div_name + ' = \'ascending\'')
eval("previous_field_" + div_name + "_name = field_name + '_' + div_name");
return eval('sort_type_' + field_name + '_' + div_name);
}
//<--
//-->
function XmlTransform_ie(xt_xml, xt_xsl, xt_sort_field, xt_sort_order_type, param)
{
// Chargement XML
//var xmldoc = new ActiveXObject("MSXML2.DOMDocument.4.0")
/*var xmldoc = new ActiveXObject("MSXML2.DOMDocument")
xmldoc.async = false;
xmldoc.resolveExternals = true;
xmldoc.validateOnParse = true;
//xmldoc.load(xt_xml + "?" + new Date().getTime());
xmldoc.load(xt_xml);
if (xmldoc.parseError.errorCode != 0)
{
error = xmldoc.parseError;
//alert('Error parsing XML file:\n' + error.reason + '[' + error.url + ': line ' + error.line + ', col ' + error.linepos + ']');
}
// Chargement XSL
//var xsldoc = new ActiveXObject("MSXML2.FreeThreadedDOMDocument.4.0");
var xsldoc = new ActiveXObject("MSXML2.FreeThreadedDOMDocument");
xsldoc.async = false;
xsldoc.resolveExternals = true;
xsldoc.validateOnParse = true;
//xsldoc.load(xt_xsl + "?" + new Date().getTime());
xsldoc.load(xt_xsl);
if (xsldoc.parseError.errorCode != 0)
{
error = xsldoc.parseError;
//alert('Error parsing XSL file:\n' + error.reason + '[' + error.url + ': line ' + error.line + ', col ' + error.linepos + ']');
}
// Propriété de transformation
xsldoc.setProperty('SelectionLanguage','XPath')
xsldoc.setProperty('SelectionNamespaces','xmlns:xsl="http://www.w3.org/1999/XSL/Transform"')
//var xtemplate = new ActiveXObject("MSXML2.XSLTemplate.4.0");
var xtemplate = new ActiveXObject("MSXML2.XSLTemplate" );
xtemplate.stylesheet = xsldoc;
xprocessor = xtemplate.createProcessor();
xprocessor.input = xmldoc;
if(param)
{
for(var label in param)
{
xprocessor.addParameter(label, param[label]);
}
}
//-->CONDITION FOR SORTING ONLY
if (xt_sort_field != null)
{
if(typeof xt_sort_order_type != 'undefined')
{
xprocessor.addParameter("sort", xt_sort_field);
xprocessor.addParameter("sort_order_type", xt_sort_order_type);
}
}
//<--CONDITION FOR SORTING ONLY
// Transformation
xprocessor.transform();
output = xprocessor.output; ;
return output;*/
var returndata;
$.ajax({
type: "GET",
url: 'test2.php',
data: ({ xml : xt_xml, xsl : xt_xsl, param : param }),
dataType: "html",
async: false,
success: function(data) {
// Run the code here that needs
// to access the data returned
//$('#'+divname).html( data );
returndata = data;
},
error: function() {
alert('Error occured');
}
});
return returndata;
}
//<--
function loadXMLDoc(filename)
{
/*if (window.ActiveXObject)
{
xhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
else
{
xhttp = new XMLHttpRequest();
}*/
xhttp = new XMLHttpRequest();
xhttp.open("GET", filename, false);
try {xhttp.responseType = "msxml-document"} catch(err) {} // Helping IE11
xhttp.send("");
return xhttp.responseXML;
}
//-->
function XmlTransform_moz(xt_xml, xt_xsl, sort_field, sort_order_type, param)
{
var processor;
var xslt;
var xmlDoc;
//alert('11111111111');
xslt = document.implementation.createDocument("", "", null);
xslt.async = false;
//xslt.load(xt_xsl + "?" + new Date().getTime());
xslt = loadXMLDoc(xt_xsl);
//xslt.load(xt_xsl);
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.async = false;
//xmlDoc.load(xt_xml + "?" + new Date().getTime());
//xmlDoc.load(xt_xml);
xmlDoc = loadXMLDoc(xt_xml);
var processor = new XSLTProcessor();
processor.importStylesheet(xslt);
//-->CONDITION FOR SORTING ONLY
if (sort_field != null)
{
if(typeof sort_order_type != 'undefined')
{
processor.setParameter(null, "sort_order_type", sort_order_type);
processor.setParameter(null, "sort", sort_field);
}
}
//<--CONDITION FOR SORTING ONLY
if(param)
{
for(var label in param)
{
processor.setParameter(null, label, param[label]);
}
}
var XmlDom = processor.transformToDocument(xmlDoc);
//var XmlDom = processor.transformToFragment(xmlDoc,document);
var serializer = new XMLSerializer();
var output = serializer.serializeToString(XmlDom.documentElement);
return output;
/*var returndata;
$.ajax({
type: "GET",
url: 'test2.php',
data: ({ xml : xt_xml, xsl : xt_xsl, param : param }),
dataType: "html",
async: false,
async: false,
success: function(data) {
// Run the code here that needs
// to access the data returned
//$('#'+divname).html( data );
returndata = data;
},
error: function() {
alert('Error occured');
}
});
return returndata;*/
}
//<--
//-->
function load_and_transform(XMLData, xslFile, div_name, sort_field, param)
{
var output = '';
var sort_order_type = '';
sort_order_type = sortTypeDispatcher(sort_field, div_name)
var moz = (typeof document.implementation.createDocument != 'undefined');
var ie = (typeof window.ActiveXObject != 'undefined');
/*alert(XMLData);
alert(xslFile);
alert(div_name);*/
if (moz)
{
if (param)
{
//alert('aaaaaaaa');
//alert(param);
var output = XmlTransform_moz(XMLData, xslFile, null, null, param)
}
//----->CONDITION FOR SORTING ONLY
else if (sort_field != null)
{
if(typeof sort_order_type != 'undefined')
{
//alert('bbbbbbbbbbbbb');
var output = XmlTransform_moz(XMLData, xslFile, sort_field, sort_order_type)
}
}
else{
//alert('cccccccccc');
//----->CONDITION FOR SORTING ONLY
var output = XmlTransform_moz(XMLData, xslFile)
}
}
else if (ie)
{
if(param)
{
var output = XmlTransform_ie(XMLData, xslFile, null, null, param)
}
//----->CONDITION FOR SORTING ONLY
else if(sort_field && sort_order_type)
{
var output = XmlTransform_ie(XMLData, xslFile, sort_field, sort_order_type)
}
else
//----->CONDITION FOR SORTING ONLY
var output = XmlTransform_ie(XMLData, xslFile)
}
document.getElementById(div_name).innerHTML = output;
manage_available_data()
}
//<--
//-->
function get_season_by_selection(obj)
{
years = obj.split("|")
yr_in = years[1]
yr_out = years[2]
if(yr_in && yr_out)
load_and_transform(xml_path + "root.xml", xsl_path + "saisons.xsl", "main_seasons", null, {season_in: yr_in, season_out: yr_out, visible_state: get_season_visibility_state(), lang: p_lang})
}
//<--
//-->
function get_type_level_and_id(str, xsl_level_file, div_name, mode, selection, reload)
{
//console.log(str);
scheme = document.getElementById("section2_number").value + document.getElementById("section3_number").value
if(!selection)
selection = 'void'
if(mode)
{
document.getElementById("ligue_selector").style.display = "none";
document.getElementById("equipe_selector").style.display = "none";
document.getElementById("franchise_selector").style.display = "none";
if(mode.length > 0)
mode.style.display = "block";
}
final_str = str.split("|")
load_and_transform(xml_path + 'root.xml', xsl_path + xsl_level_file, div_name, null, {level_name: final_str[1], level_name_id: final_str[2], lang: p_lang, level_type: scheme, selection: selection})
//load_and_transform('xml/root.xml', 'xsl/seventh_tool_selectors.xsl', 'seventh_level_tool', null, {level_name: 'ligue5', level_name_id: '1LJ5ButBPBPJO1Sa', lang: 'fr', level_type: '11', selection: '(dom./étr.)')
if(!reload)
{
if(div_name == "second_level_tool")
{
if(document.getElementById("advanced_records"))
{
value_label = document.getElementById("advanced_records").options[document.getElementById("advanced_records").selectedIndex].innerHTML
get_drop_spec(document.getElementById('drop_second_level'), value_label + "@void|" + final_str[1] + "|" + final_str[2])
}
}
if(div_name == "thrid_level_tool")
{
if(document.getElementById("third_tool_select"))
{
value_label = document.getElementById("third_tool_select").options[document.getElementById("third_tool_select").selectedIndex].innerHTML
get_drop_spec(document.getElementById('drop_third_level'), value_label + "@void|" + final_str[1] + "|" + final_str[2])
}
}
if(div_name == "forth_level_tool")
{
if(document.getElementById("forth_tool_select"))
{
value_label = document.getElementById("forth_tool_select").options[document.getElementById("forth_tool_select").selectedIndex].innerHTML
get_drop_spec(document.getElementById('drop_forth_level'), value_label + "@void|" + final_str[1] + "|" + final_str[2])
}
}
else if(final_str[7])
{
load_and_transform(xml_path + 'root.xml', xsl_path + 'forth_tool_selectors.xsl', 'forth_level_tool', null, {level_name: final_str[6], level_name_id: final_str[7], lang: p_lang, level_type: scheme, selection: selection})
get_drop_spec(document.getElementById('drop_forth_level'), final_str[8] + '@void|' + final_str[6] + '|' + final_str[7] + '|')
}
if(div_name == "fifth_level_tool")
{
if(document.getElementById("fifth_tool_select"))
{
//if document.getElementById("fifth_tool_select").selectedIndex) > -1 {
//alert('qqqqqqq : '+document.getElementById("fifth_tool_select").selectedIndex);
value_label = document.getElementById("fifth_tool_select").options[document.getElementById("fifth_tool_select").selectedIndex].innerHTML
get_drop_spec(document.getElementById('drop_fifth_level'), value_label + "@void|" + final_str[1] + "|" + final_str[2])
//}
}
}
if(div_name == "sixth_level_tool")
{
if(document.getElementById("sixth_tool_select"))
{
value_label = document.getElementById("sixth_tool_select").options[document.getElementById("sixth_tool_select").selectedIndex].innerHTML
get_drop_spec(document.getElementById('drop_sixth_level'), value_label + "@void|" + final_str[1] + "|" + final_str[2])
}
}
if(div_name == "seventh_level_tool")
{
if(document.getElementById("seventh_tool_select"))
{
value_label = document.getElementById("seventh_tool_select").options[document.getElementById("seventh_tool_select").selectedIndex].innerHTML
get_drop_spec(document.getElementById('drop_seventh_level'), value_label + "@void|" + final_str[1] + "|" + final_str[2])
}
}
}
}
//<--
//-->
function get_section_letter(obj, letter, group)
{
if(obj.id == "section00")
{
if(group == "0")
{
value = document.getElementById("ligue_selector").value
document.getElementById("season_selector").selectedIndex = ligue_last
}
else if(group == "1")
{
value = document.getElementById("equipe_selector").value
document.getElementById("season_selector").selectedIndex = equipe_last
}
else if(group == "2")
{
value = document.getElementById("franchise_selector").value
document.getElementById("season_selector").selectedIndex = franchise_last
}
this_final_letter = value.split("|")
document.getElementById("section01").value = this_final_letter[0]
/*
section04_temp = document.getElementById('third_tool_select').value
section04_value = section04_temp.split("|")
document.getElementById("section04").value = section04_value[0]
*/
if(document.getElementById("season_selector").style.display == 'block')
{
value = document.getElementById("season_selector").value
this_final_letter = value.split("|")
document.getElementById("section02").value = this_final_letter
}
}
else if(obj.id == "section01")
{
if(document.getElementById("season_selector").style.display == 'block')
{
value = document.getElementById("season_selector").value
this_final_letter = value.split("|")
document.getElementById("section02").value = this_final_letter
}
}
final_letter = letter.split("|")
obj.value = final_letter[0]
if(document.getElementById("ligue_selector").style.display == 'block' && document.getElementById("season_selector").style.display == 'block')
{
ligue_last = document.getElementById("season_selector").selectedIndex
}
if(document.getElementById("equipe_selector").style.display == 'block' && document.getElementById("season_selector").style.display == 'block')
{
equipe_last = document.getElementById("season_selector").selectedIndex
}
if(document.getElementById("franchise_selector").style.display == 'block' && document.getElementById("season_selector").style.display == 'block')
{
franchise_last = document.getElementById("season_selector").selectedIndex
}
}
//<--
//-->
function get_record(xml)
{
//document.getElementById("search_msg").style.display = 'block';
actual_record_file = xml;
//alert('aaaa : '+actual_record_file);
xml_split = xml.split("/")
if(xml_split[2])
{
final_xml = xml_split[2];
}
else if(xml_split[1])
{
final_xml = xml_split[1];
}
else
{
final_xml = xml;
}
//alert('ssss : '+final_xml);
split_final_xml = final_xml.split("_")
//alert('qqqqqqq : '+split_final_xml[0]);
//alert('wwwwwww : '+split_final_xml[1]);
if(split_final_xml[1])
final_file_name_without_year = split_final_xml[1];
else
final_file_name_without_year = null
if(split_final_xml[0])
final_file_name_with_year = split_final_xml[0]; // ZZZ
else
final_file_name_with_year = null
//-->TABLEAUX DETECTION
//DETECT IF THERE IS A «CETTE SAISON» XML FILE
is_this_season_exists = is_file_exists(xml_path + selected_season + "/" + selected_season + "_" + final_file_name_without_year)
if(!is_this_season_exists)
file_path = 'false';
else
file_path = selected_season
//alert("2 : " + document.getElementById("section00").value);
//DETECT IF THERE IS A «EVOLUTION» XML FILE
if (document.getElementById("section00").value != '-1'){
is_evolution_exists = is_file_exists(xml_path + evolution_path + document.getElementById("section00").value + '/' + final_file_name_without_year);
is_subdirectory_exists = document.getElementById("section00").value;
}
else
{
is_evolution_exists = is_file_exists(xml_path + evolution_path + subdirectory[1] + '/' + final_file_name_without_year);
is_subdirectory_exists = subdirectory[1];
}
//alert('1: '+ is_subdirectory_exists);
//DETECT IF THERE IS A «RELATIFS» XML FILE
is_relatifs_exists = is_file_exists(xml_path + relatifs_path + final_file_name_with_year + "/" + final_file_name_without_year)
// modification hugo remove records relatifs set default value to false
is_relatifs_exists = false;
//<--TABLEAUX DETECTION
if(is_get_link)
{
if(final_file_name_without_year != null)
{
document.getElementById("denis_links").style.display = 'block';
document.getElementById("denis_links").style.color = '#ffffff';
document.getElementById("denis_links").style.fontWeight = 'bold';
document.getElementById("denis_links").style.fontSize = "10px";
final_id = final_file_name_without_year.split(".xml").join("");
document.getElementById("denis_links").innerHTML = "http://" + server_name + record_main_folder + "?rep=" + final_file_name_with_year + "&file_id=" + final_id + "&lang=" + p_lang;
}
else
document.getElementById("denis_links").innerHTML = 'Lien non disponible';
}
else
document.getElementById("denis_links").style.display = 'none';
//alert('xml : ' + xml);
load_and_transform(xml_path + xml, xsl_path + 'records_new.xsl', 'main_records', null, {lang: p_lang, actual_file: final_xml, thisseason: file_path, img_year: selected_season, is_evolution:is_evolution_exists, is_relatifs: is_relatifs_exists, is_subdirectory: is_subdirectory_exists});
// modification hugo remove most populaire records get_pop_record(0)
//get_pop_record(0)
window.location.hash = "#a1";
document.title = document_title.split("#a1").join("");
}
//<--
//-->
function get_pop_record(type)
{
load_and_transform(xml_path + 'most_pop_records_hugo.xml', xsl_path + 'most_pop_records_hugo.xsl', 'most_pop_records', null, {pop_type: type, lang: p_lang, is_subdirectory: is_subdirectory_exists});
}
//<--
//-->
function show_hide_season_section(obj)
{
if(obj.id == "select_saison")
document.getElementById("season_selector").style.display = "block";
else
document.getElementById("season_selector").style.display = "none";
}
//<--
//-->
function get_season_visibility_state()
{
season_selector_obj = document.getElementById("season_selector")
if(season_selector_obj.style.display == "none")
season_visibility = 'off'
else
season_visibility = 'on'
return season_visibility;
}
//<--
function IsNumeric(input){
var RE = /^-{0,1}\d*\.{0,1}\d+$/;
return (RE.test(input));
}
//-->
function get_final_xml_name2(final_file_name, act_lang){
//console.log(document.getElementById('third_tool_select').value);
var alert_message = act_lang == 'fr' ? 'Les sélecteurs identifiés d\'un astérisque sont obligatoires' : 'Selectors with an asteric are required';
if(document.getElementById('third_tool_select'))
{
if(document.getElementById('third_tool_select').value == "-1|||||")
{
alert(alert_message)
return;
}
}
if(document.getElementById('forth_tool_select'))
{
if(document.getElementById('forth_tool_select').selectedIndex == 0)
{
alert(alert_message)
return;
}
}
if(document.getElementById('fifth_tool_select'))
{
if(document.getElementById('fifth_tool_select').selectedIndex == 0)
{
alert(alert_message)
return;
}
}
if(document.getElementById('sixth_tool_select'))
{
if(document.getElementById('sixth_tool_select').selectedIndex == 0)
{
alert(alert_message)
return;
}
}
if(document.getElementById('seventh_tool_select'))
{
if(document.getElementById('seventh_tool_select').selectedIndex == 0)
{
alert(alert_message)
return;
}
}
record_file = final_file_name.split("_");
final_record_file = record_file[1].split(".xml");
//console.log(record_file);
//alert('http://lhjmq.local/xsl/records/book/indexsk.php?rep=V&file_id='+final_record_file[0]+'&lang='+act_lang);
//window.location.href='/xsl/records/book/indexsk.php?rep=V&file_id='+final_record_file[0]+'&lang='+act_lang;
}
function get_final_xml_name(final_file_name, act_lang)
{
var alert_message = act_lang == 'fr' ? 'Les sélecteurs identifiés d\'un astérisque sont obligatoires' : 'Selectors with an asteric are required';
//record_file = final_file_name.split("_");
//final_record_file = record_file[1].split(".xml");
//alert('http://lhjmq.local/xsl/records/book/indexsk.php?rep=V&file_id='+final_record_file[0]+'&lang='+act_lang);
/*if(final_file_name_without_year != null)
{
document.getElementById("denis_links").style.display = 'block';
document.getElementById("denis_links").style.color = '#ffffff';
document.getElementById("denis_links").style.fontWeight = 'bold';
document.getElementById("denis_links").style.fontSize = "10px";
final_id = final_file_name_without_year.split(".xml").join("");
document.getElementById("denis_links").innerHTML = "http://" + server_name + record_main_folder + "?rep=" + final_file_name_with_year + "&file_id=" + final_id + "&lang=" + p_lang;
}
else
document.getElementById("denis_links").innerHTML = 'Lien non disponible';
*/
//alert(document.getElementById("denis_links").innerHTML);
if(document.getElementById('third_tool_select'))
{
if(document.getElementById('third_tool_select').value == "-1|||||")
{
alert(alert_message)
return;
}
}
if(document.getElementById('forth_tool_select'))
{
if(document.getElementById('forth_tool_select').selectedIndex == 0)
{
alert(alert_message)
return;
}
}
if(document.getElementById('fifth_tool_select'))
{
if(document.getElementById('fifth_tool_select').selectedIndex == 0)
{
alert(alert_message)
return;
}
}
if(document.getElementById('sixth_tool_select'))
{
if(document.getElementById('sixth_tool_select').selectedIndex == 0)
{
alert(alert_message)
return;
}
}
if(document.getElementById('seventh_tool_select'))
{
if(document.getElementById('seventh_tool_select').selectedIndex == 0)
{
alert(alert_message)
return;
}
}
//alert(document.getElementById("section02").value);
//alert(IsNumeric(document.getElementById("section02").value));
//records_folder = document.getElementById("section02").value + "/";
if (document.getElementById("section02").value == 'V'){
/*alert('sec0 : ' + document.getElementById("section00").value);
alert('sec1 : ' + document.getElementById("section01").value);
alert('sec2 : ' + document.getElementById("section02").value);
alert('sec3 : ' + document.getElementById("section03").value);
alert('sec4 : ' + document.getElementById("section04").value); */
records_folder = "Z/"+document.getElementById("section00").value+"/";
//records_folder = document.getElementById("section02").value + "/";
}
else if (IsNumeric(document.getElementById("section02").value)){
records_folder = document.getElementById("section02").value + "/";
}
else{
records_folder = document.getElementById("section02").value + "/" + subdirectory[1] + "/";
}
if (is_catcher && new_repertoire != ''){
records_folder = document.getElementById("section02").value + "/" + new_repertoire + "/";
document.getElementById("section00").value = new_repertoire;
}
//alert(records_folder);
//alert('name : '+ xml_path + records_folder + final_file_name);
if(is_file_exists(xml_path + records_folder + final_file_name)){
//alert('path '+ records_folder + final_file_name);
get_record(records_folder + final_file_name);
}
else{
get_record('temp_rec/temp.xml');
}
}
//<--
//-->
function get_other_xml_name(final_file_name, act_lang)
{
if(is_file_exists(xml_path + final_file_name))
get_record(final_file_name)
else
if(act_lang == 'en')
alert("This record doesn't exists !")
else
alert("Ce record n'esiste pas !")
}
//<--
//-->
function is_file_exists(url)
{
var req= new AJ(); // XMLHttpRequest object
try {
req.open("HEAD", url, false);
req.send(null);
return req.status== 200 ? true : false;
}
catch (er) {
return false;
}
}
//<--
//-->
function AJ()
{
var obj;
if (window.XMLHttpRequest)
{
obj= new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
try {
obj= new ActiveXObject('MSXML2.XMLHTTP.3.0');
}
catch(er) {
try{
obj= new ActiveXObject("Microsoft.XMLHTTP");
}
catch(er) {
obj= false;
}
}
}
return obj;
}
//<--
//-->
function start_animation_id(str)
{
var essai = str
if(thisMovie("animation_call"))
thisMovie("animation_call").goHome(essai);
}
//<--
//-->
function thisMovie(movieName)
{
if (navigator.appName.indexOf("Microsoft") != -1)
{
return window[movieName]
}
else
{
return document[movieName]
}
}
//<--
//-->
function swap_image(obj, img_on, img_off)
{
obj.src="img/" + img_on
obj.onmouseout = function()
{
if(obj.id == 'img_0' && btn_selection == 'img_0')
this.src="img/" + "btn_gen_on.jpg"
else if(obj.id == 'img_1' && btn_selection == 'img_1')
this.src="img/" + "btn_jours_on.jpg"
else
this.src="img/" + img_off
}
}
//<--
//-->
function on_image(obj, img_on)
{
btn_selection = String(obj.id);
document.getElementById("img_0").src = "img/" + "btn_gen.jpg";
document.getElementById("img_1").src = "img/" + "btn_jours.jpg"
obj.src="img/" + img_on;
}
//<--
//-->
function set_over_image(id)
{
if(id == '0')
document.getElementById("img_0").src = "img/" + "btn_gen.jpg";
if(id == '1')
document.getElementById("img_1").src = "img/" + "btn_jours_on.jpg";
}
//<--
//-->
function call_swf_video(id, lang, player_name, h)
{
if(h)
h_ = h
else
h_ = "283"
$.get( "ajax/get_cms_joueur_info.php?player_id="+id+"&lang="+lang, function( data ) {
$( "#new_gui" ).html( data );
//alert( "Load was performed." );
});
// view code
/* var so = new SWFObject("flvs/numberOne.swf?" + new Date().getTime(), "movie", "345", h_, "#ffffff");
so.addParam("scale", "noscale");
so.addParam("wmode", "transparent");
so.addParam("menu", "false");
so.addVariable("id_register", id)
so.addVariable("f_lang", lang)
so.addVariable("player_name", player_name);
so.write("record_movie");
document.title = document_title.split("#a1").join("");
*/
}
//<--
//-->
function open_close_tool(obj)
{
if(p_lang == 'fr')
{
if(obj.style.display == 'none')
{
document.getElementById('tool_btn').innerHTML = '« Masquer l\'outil';
obj.style.display = 'block';
}
else
{
obj.style.display = 'none';
document.getElementById('tool_btn').innerHTML = 'Dévoiler l\'outil »';
}
}
else
{
if(obj.style.display == 'none')
{
document.getElementById('tool_btn').innerHTML = '« Hide this tool';
obj.style.display = 'block';
}
else
{
obj.style.display = 'none';
document.getElementById('tool_btn').innerHTML = 'Show this tool »';
}
}
}
//<--
//-->
function set_tool_texts(act_lang)
{
if(act_lang == 'fr')
{
//document.getElementById('cat_01_text').innerHTML = 'LES CATÉGORIES 1 (titre de travail) :';
document.getElementById("ligue_text").innerHTML = 'Ligue';
document.getElementById("team_text").innerHTML = 'Équipe';
document.getElementById("franchise_text").innerHTML = 'Franchise';
//document.getElementById("season_text_cat_02").innerHTML = 'LA SAISON 2 (titre de travail) :';
document.getElementById("career_text").innerHTML = 'À vie';
document.getElementById("in_season_text").innerHTML = 'En une saison';
//document.getElementById("season_type_cat_03").innerHTML = 'TYPE DE SAISON 3(titre de travail) :';
document.getElementById("regular_season_text").innerHTML = 'Saison régulière';
document.getElementById("playoffs_text").innerHTML = 'Séries éliminatoires';
document.getElementById("both_seasons").innerHTML = 'Saison et séries';
document.getElementById("nav_notice").innerHTML = "Les sélecteurs identifiés d'une * sont obligatoires"
//document.getElementById("search_btn").value="GO (titre de travail)";
//document.getElementById("lang_text").innerHTML="BASCULER EN ANGLAIS (test)";
}
else
{
//document.getElementById('cat_01_text').innerHTML = 'SECTION ONE (temporary head title) :';
document.getElementById("ligue_text").innerHTML = 'League';
document.getElementById("team_text").innerHTML = 'Team';
document.getElementById("franchise_text").innerHTML = 'Franchise';
//document.getElementById("season_text_cat_02").innerHTML = 'SEASON SECTION TWO (temporary head title) :';
document.getElementById("career_text").innerHTML = 'Lifetime';
document.getElementById("in_season_text").innerHTML = 'Single season';
//document.getElementById("season_type_cat_03").innerHTML = 'SEASON TYPE 3 (temp title) :';
document.getElementById("regular_season_text").innerHTML = 'Regular season';
document.getElementById("playoffs_text").innerHTML = 'Playoffs';
document.getElementById("both_seasons").innerHTML = 'Season and playoffs';
document.getElementById("nav_notice").innerHTML = "Selectors with * are required";
//document.getElementById("search_btn").value="GO (temp title)";
//document.getElementById("lang_text").innerHTML="SWITCH TO FRENCH (test)";
}
}
//<--
//-->
function swith_lang()
{
if(p_lang == 'fr')
p_lang = 'en'
else if(p_lang == 'en')
p_lang = 'fr'
get_record(actual_record_file)
set_tool_texts(p_lang)
}
//<--
//-->
function get_drop_spec(obj, val)
{
select_exists = false
select_array = Array('advanced_records', 'third_tool_select', 'forth_tool_select', 'fifth_tool_select', 'sixth_tool_select', 'seventh_tool_select')
drop_array = Array('drop_second_level', 'drop_third_level', 'drop_forth_level', 'drop_fifth_level', 'drop_sixth_level', 'drop_seventh_level')
for(i=0;i<select_array.length;i++)
{
if(document.getElementById(select_array[i]))
{
if(typeof(val) == 'object')
{
f_value = document.getElementById(select_array[i]).value
f_array = f_value.split("|")
document.getElementById(drop_array[i]).value = document.getElementById(select_array[i]).options[document.getElementById(select_array[i]).selectedIndex].innerHTML + '@' + 'void|' + f_array[5] + '|' + f_array[4]
}
else
{
document.getElementById(obj.id).value = val
}
}
else
{
if(is_main_selector)
document.getElementById(drop_array[i]).value = ''
}
}
}
//<--
//-->
function get_section_number(obj, n, bool)
{
document.getElementById(obj.id).value = n
}
//<--
//-->
//-- AUTRE CHANGEMENTS CAMIL - 2009-02-08
function reload_drop_lists(bool, tpe)
{
if(!tpe)
tpe = selected_type
if(bool)
{
if(document.getElementById('drop_second_level').value != '')
{
box_value = document.getElementById('drop_second_level').value;
box_value_array = box_value.split("@")
f_selection = box_value_array[0].split("'").join("\'")
value_to_change = box_value.split("|")
box_value = box_value_array[1].split(value_to_change[1]).join(tpe + "0")
get_type_level_and_id(box_value, 'second_tool_selectors.xsl', 'second_level_tool', null, f_selection, true);
}
if(document.getElementById('drop_third_level').value != '')
{
box_value = document.getElementById('drop_third_level').value;
box_value_array = box_value.split("@")
f_selection = box_value_array[0].split("'").join("\'")
value_to_change = box_value.split("|")
box_value = box_value_array[1].split(value_to_change[1]).join(tpe + "1")
ref_table_filter = value_to_change[2].substring(0, 3)
if(tpe == "equipe")
{
box_value = box_value.split("|" + ref_table_filter).join("|12E")
}
else if(tpe == "franchise")
{
box_value = box_value.split("|" + ref_table_filter).join("|13F")
}
else
{
box_value = box_value.split("|" + ref_table_filter).join("|11L")
}
get_type_level_and_id(box_value, 'third_tool_selectors.xsl', 'thrid_level_tool', null, f_selection, true);
}
if(document.getElementById('drop_forth_level').value != '')
{
box_value = document.getElementById('drop_forth_level').value;
box_value_array = box_value.split("@")
f_selection = box_value_array[0].split("'").join("\'")
value_to_change = box_value.split("|")
box_value = box_value_array[1].split(value_to_change[1]).join(tpe + "2")
ref_table_filter = value_to_change[2].substring(0, 2)
if(tpe == "equipe")
{
box_value = box_value.split("|" + ref_table_filter).join("|2E")
}
else if (tpe == "franchise")
{
box_value = box_value.split("|" + ref_table_filter).join("|3F")
}
else
{
box_value = box_value.split("|" + ref_table_filter).join("|1L")
}
get_type_level_and_id(box_value, 'forth_tool_selectors.xsl', 'forth_level_tool', null, f_selection, true);
}
if(document.getElementById('drop_fifth_level').value != '')
{
box_value = document.getElementById('drop_fifth_level').value;
box_value_array = box_value.split("@")
f_selection = box_value_array[0].split("'").join("\'")
value_to_change = box_value.split("|")
box_value = box_value_array[1].split(value_to_change[1]).join(tpe + "3")
ref_table_filter = value_to_change[2].substring(0, 2)
if(tpe == "equipe")
{
box_value = box_value.split("|" + ref_table_filter).join("|2E")
}
else if (tpe == "franchise")
{
box_value = box_value.split("|" + ref_table_filter).join("|3F")
}
else
{
box_value = box_value.split("|" + ref_table_filter).join("|1L")
}
get_type_level_and_id(box_value, 'fifth_tool_selectors.xsl', 'fifth_level_tool', null, f_selection, true);
}
if(document.getElementById('drop_sixth_level').value != '')
{
box_value = document.getElementById('drop_sixth_level').value;
box_value_array = box_value.split("@")
f_selection = box_value_array[0].split("'").join("\'")
value_to_change = box_value.split("|")
box_value = box_value_array[1].split(value_to_change[1]).join(tpe + "4")
ref_table_filter = value_to_change[2].substring(0, 2)
if(tpe == "equipe")
{
box_value = box_value.split("|" + ref_table_filter).join("|2E")
}
else if (tpe == "franchise")
{
box_value = box_value.split("|" + ref_table_filter).join("|3F")
}
else
{
box_value = box_value.split("|" + ref_table_filter).join("|1L")
}
get_type_level_and_id(box_value, 'sixth_tool_selectors.xsl', 'sixth_level_tool', null, f_selection, true);
}
if(document.getElementById('drop_seventh_level').value != '')
{
box_value = document.getElementById('drop_seventh_level').value;
box_value_array = box_value.split("@")
f_selection = box_value_array[0].split("'").join("\'")
value_to_change = box_value.split("|")
box_value = box_value_array[1].split(value_to_change[1]).join(tpe + "5")
ref_table_filter = value_to_change[2].substring(0, 2)
if(tpe == "equipe")
{
box_value = box_value.split("|" + ref_table_filter).join("|2E")
}
else if (tpe == "franchise")
{
box_value = box_value.split("|" + ref_table_filter).join("|3F")
}
else
{
box_value = box_value.split("|" + ref_table_filter).join("|1L")
}
get_type_level_and_id(box_value, 'seventh_tool_selectors.xsl', 'seventh_level_tool', null, f_selection, true);
}
}
}
//<--
//-->
function hide_this(obj)
{
//alert(obj.id)
document.getElementById(obj.id).style.display = "none"
document.getElementById("season_selector").style.display = "none"
document.getElementById("section02").value = document.getElementById("select_carriere").value
document.getElementById("select_saison").checked = false
document.getElementById("select_carriere").checked = true
}
//<--
//-->
function show_this(obj)
{
document.getElementById(obj.id).style.display = "block"
//document.getElementById("main_seasons").style.display = "block"
}
//<--
//-->
function hide_record_movie_div()
{
document.getElementById("record_movie").style.display = 'none';
}
//<--
//-->
function show_record_movie_div()
{
document.getElementById("record_movie").style.display = 'block';
}
//<--
//-->
function get_next_selector_label(thisobj, nextobj)
{
if(!document.getElementById(nextobj))
{
label = null
get_section_letter(document.getElementById('section04'), document.getElementById(thisobj).value);
}
else
{
label = document.getElementById(nextobj).options[document.getElementById(nextobj).selectedIndex].innerHTML
get_section_letter(document.getElementById('section04'), document.getElementById(nextobj).value);
}
return label;
}
//<--
//-->
function open_window_browser(str)
{
Shadowbox.open({ content: str, width: 1200, height: 800, player:'iframe' }); return false;
//this_records_lhjmq = window.open(str, "win_lhjmq", 'toolbar=yes,location=yes,directories=yes,resizable=yes,scrollbars=yes,menubar=yes');
//this_records_lhjmq.focus();
}
function open_window_browser2(str)
{
Shadowbox.open({ content: str, width: 1200, height: 800, player:'iframe' });
//this_records_lhjmq = window.open(str, "win_lhjmq", 'toolbar=yes,location=yes,directories=yes,resizable=yes,scrollbars=yes,menubar=yes');
//this_records_lhjmq.focus();
}
function load_pub_sidebar(){
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1452832437881-1'); });
}
function open_window_browser_dynamic(str,str2)
{
if (str2 != ''){
//Shadowbox.open({ content: str2, width: 1200, height: 800, player:'iframe' });
//window.open(str2, "win_lhjmq", 'toolbar=yes,location=yes,directories=yes,resizable=yes,scrollbars=yes,menubar=yes');
window.open(str2,'win_lhjmq','width=400,height=200,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes');
}
else
{
//Shadowbox.open({ content: str, width: 1200, height: 800, player:'iframe' });
window.open(str, "win_lhjmq", 'toolbar=yes,location=yes,directories=yes,resizable=yes,scrollbars=yes,menubar=yes');
}
//this_records_lhjmq.focus();
}
//<--
function swf_header()
{
//if(!hide_swf_header)
//{
// <![CDATA[
/*
var so = new SWFObject("swf/loaderRecord.swf", "animation_call", "945", "267", "8", "#ffffff");
so.addParam("scale", "noscale");
so.addParam("wmode", "transparent");
so.addParam("menu", "false");
so.addParam("allowScriptAccess", "always");
so.addVariable("f_lang", p_lang);
so.addVariable("is_home", home);
so.addVariable("current_page", thisPage);
so.write("flashcontent");
*/
// ]]>
//}
document.getElementById("display_search_tool").style.display = "block"
document.getElementById("page_to_preload").style.display = "block"
if(document.getElementById("flashcontent"))
{
start_display()
}
}
function is_main_selector_selection(bool)
{
is_main_selector = bool
}
function manage_available_data()
{
//-> CHANGEMENTS CAMIL - 2009-02-08
if(document.getElementById('second_tool_select'))
{
if(document.getElementById('second_tool_select').innerHTML == '')
{
document.getElementById('second_level_tool').style.display = 'none'
}
else
{
document.getElementById('second_level_tool').style.display = 'block'
}
}
if(document.getElementById('third_tool_select'))
{
if(document.getElementById('third_tool_select').innerHTML == '')
{
document.getElementById('thrid_level_tool').style.display = 'none'
}
else
{
document.getElementById('thrid_level_tool').style.display = 'block'
}
}
//WORKING HERE --------------->
if(document.getElementById('forth_tool_select'))
{
if(document.getElementById('forth_tool_select').innerHTML == '')
{
document.getElementById('forth_level_tool').style.display = 'none'
//previous_value = document.getElementById("third_tool_select").value
//get_type_level_and_id(previous_value, 'forth_tool_selectors.xsl', 'forth_level_tool', null, null)
var elSel = document.getElementById('third_tool_select');
if(elSel.value != '-1|||||')
{
if (elSel.selectedIndex >= 0)
{
var elOptNew = document.createElement('option');
elOptNew.text = p_lang == 'fr' ? '-FILTREZ PAR-' : '-FILTERED BY-';
elOptNew.value = '-1|||||';
elOptNew.selected = 'selected';
var elOptOld = elSel.options[elSel.selectedIndex];
try
{
elSel.add(elOptNew, elOptOld); // standards compliant; doesn't work in IE
}
catch(ex)
{
elSel.add(elOptNew, elSel.selectedIndex); // IE only
}
}
}
//alert(document.getElementById("third_tool_select").options[document.getElementById("third_tool_select").selectedIndex = 0].value)
//previous_value = document.getElementById("third_tool_select").options[document.getElementById("third_tool_select").selectedIndex = 0].value
}
else
{
document.getElementById('forth_level_tool').style.display = 'block'
//previous_value = document.getElementById("third_tool_select").value
//get_type_level_and_id(previous_value, 'forth_tool_selectors.xsl', 'forth_level_tool', null, null)
}
}
if(document.getElementById('fifth_tool_select'))
{
if(document.getElementById('fifth_tool_select').innerHTML == '')
{
document.getElementById('fifth_level_tool').style.display = 'none'
}
else
{
document.getElementById('fifth_level_tool').style.display = 'block'
}
}
if(document.getElementById('sixth_tool_select'))
{
if(document.getElementById('sixth_tool_select').innerHTML == '')
{
document.getElementById('sixth_level_tool').style.display = 'none'
}
else
{
document.getElementById('sixth_level_tool').style.display = 'block'
}
}
if(document.getElementById('seventh_tool_select'))
{
if(document.getElementById('seventh_tool_select').innerHTML == '')
{
document.getElementById('seventh_level_tool').style.display = 'none'
}
else
{
document.getElementById('seventh_level_tool').style.display = 'block'
}
}
}
|