
var movieName = "menu_cybunk";

function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return parent.window[movieName]
  }	else {
    return parent.document[movieName]
  }
}

// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
  if (typeof(theMovie) != "undefined") {
    return theMovie.PercentLoaded() == 100;
  } else {
    return false;
  }
}

// function FLASH
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function jst_ree_acc_child(label){
  if (movieIsLoaded(thisMovie(movieName))) {
    thisMovie(movieName).jst_ree_acc_child(label);
  }
}

function reload_tree() 
{
    if(parent.parent==parent)
    {
        if (movieIsLoaded(thisMovie(movieName))) 
        {
            thisMovie(movieName).tree_reload();
        }
    }
    else
    {
        getrootparent().reload_tree();
    }
}



// function HTML
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function getrootparent()
{
    var elem=this;
    while(elem.parent!=elem)
        elem=elem.parent;
    return elem;
}

function reload_zone3(url) 
{
	if ((url==undefined)||(url==''))
	{
	    var zone3=getrootparent().document.getElementById("zone3");
	    if(zone3.contentDocument!=undefined)
            zone3.contentDocument.location.reload();
        else
            zone3.contentWindow.location.reload();
	} 
	else 
	{
	    if(zone3.contentDocument!=undefined)
            zone3.contentDocument.location.href=url;
        else
            zone3.contentWindow.location.href=url;
	}
}

function reload_total() 
{
   	getrootparent().document.location.reload();
}

function zone2_hide() 
{
	parent.document.getElementById("zone2").style.height="0";
	parent.document.getElementById("zone3").style.height="100%";
}
function zone2_show() 
{
	parent.document.getElementById("zone2").style.height="50%";
	parent.document.getElementById("zone3").style.height="50%";
}


// function Alerte suppresion enregistrement ....
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function msg_alert(msg) { // V0.1
		alert(msg)
}
function msg_valider(msg) { // V0.1
		alert(msg)
}
function msg_confirm(msg) { // V0.1

	if (window.confirm(msg)) 
    {
		return true;
	} else {
		return false;
	}
	
}
