/** * Javascript file which contains functions for flash interaction * These function are called by the flash animation * **/ /** * Function which will load the Flash animation in the main div container named * flash content. * * string rub param is sent to the flash movie to make the animation test if the * video must be played */ function play_flash(rub, lang) { var so = new SWFObject("/inc/flash/home.swf", "flash_bg", "100%", "100%", "8", "#000000"); so.addParam("scale", "noscale"); so.addParam("wmode", "transparent"); so.addVariable("flash_folder", "/inc/flash/"); so.addVariable("lg", lang); so.addVariable("rub_flash", rub); so.write("flashcontent"); } /** * Function which show or hide the div containing the content of each page * boolean etat : true | false */ function show_content(etat) { var visibility = (etat == true ? 'visible' : 'hidden'); $("#pagecontent").css('visibility', visibility); } /** * Function which will load the content of a page in AJAX string rub : name of * the category */ function display_content( rub, lang, color) { // Not on homepage if (rub != 'homepage' && rub != '' && rub != '#') { if(lang == null) lang = 'en'; var new_href = '/html/' + lang + '/' + rub + '.php?js'; $("#loading").show(); $("#pagecontent"). css('background-color', color). css('visibility', 'visible'). load(new_href, '', function(){ $("#loading").hide() }); } else { show_content(false); } if ($.browser.msie && (ie55 || ie6)) { setTimeout("fixPng()", 50); } $("#version-fr").attr('href', '/fr/'+rub); $("#version-en").attr('href', '/en/'+rub); fixPng(); } function open_popup() { window.open( '/inc/flash/games.swf', 'game', 'width=600, height=470,toolbar=no, menubar=no, location=no, resizable=no, scrollbars=no, status=no'); } /** * Function which will fix PNG transparency problems under IE */ function fixPng() { $(document).pngFix(); }