/**
* Classe JSDEV_Iframe
*
* document_parent  : objet document qui contient l'iframe
* id               : identité de la frame
*/
function JSDEV_Iframe(document_parent, id)
{
    this.id = id;  
    this.document_parent = document_parent;
    
    /* Déclaration des fonctions */
    
    /**
    * recpDocument()
    *
    * Récupère le document (objet) contenu dans l'iframe
    */
    this.recpDocument = 
    function ()
    {        
        if (this.document_parent.frames)
        {                
            obj_document = this.document_parent.frames[this.id].document;
        }
        else if (this.document_parent.getElementById)
        {        
            obj_document = this.document_parent.getElementById(this.id).contentDocument;
        }
        return obj_document;      
    }  
    
    /**
    * chSrc(url)
    *
    * Change l'URL source (src)
    */
    this.defSrc = 
    function (url)
    {
        if (this.document_parent.frames)
        {                
            this.document_parent.frames[this.id].location.replace(url);
        }
        else if (this.document_parent.getElementById)
        {        
            this.document_parent.getElementById(this.id).src = url;
        }     
    }
    
    /**
    * recpObjet()
    *
    * Renvoie l'objet correspondant à l'objet
    */
    this.recpObjet = 
    function ()
    {
        if (this.document_parent.frames)
        {                
            objet = this.document_parent.frames[this.id];
        }
        else if (this.document_parent.getElementById)
        {        
            objet = this.document_parent.getElementById(this.id);            
        }
        return objet;
    }
    
}

/**
* Classe JSDEV_Calque
*
* document_parent  : objet document qui contient le calque
* id               : identité du calque
*/
function JSDEV_Calque(document_parent, id)
{
    this.id = id;  
    this.document_parent = document_parent;
    
    /* Déclaration des fonctions */
    
    /**
    * recpObjet()
    *
    * Renvoie l'objet correspondant à l'objet
    */
    this.recpObjet = 
    function ()
    {    
        if (this.document_parent.all)
        {                
            objet =  this.document_parent.all[this.id];
        }
        else if (this.document_parent.getElementById)
        {        
            objet = this.document_parent.getElementById(this.id);            
        }
        return objet;
    }
    
    /**
    * montrer()    
    */
    this.montrer = 
    function ()
    {
        objet = this.recpObjet();
        objet.style.visibility = "visible";
    }
    
    /**
    * cacher()
    */
    this.cacher =
    function ()
    {
        objet = this.recpObjet();
        objet.style.visibility = "hidden";
    }
    
}
