/**
* Gère l'insertion d'un iframe dans un calque
*
* @param String src URL de la page à intégrer dans le cadre
* @param String id Identifiant du cadre
* @param Integer width Largeur du cadre
* @param Integer height Hauteur du cadre
*/
function IframeObject(src, id, width, height) {
	/**
	 * URL de la page à intégrer dans le cadre.
	 *
	 * @var String
	 */
	this.src = src;
	
	/**
	 * Identifiant du cadre.
	 *
	 * @var String
	 */
	this.id = id;
	
	/**
	 * Largeur du cadre.
	 *
	 * @var Integer
	 */
	this.width = width;
	
	/**
	 * Hauteur du cadre.
	 *
	 * @var Integer
	 */
	this.height = height;
	
	/**
	* Intègre le cadre dans un calque.
	*
	* @param String blockID Identifiant du calque où intégrer le cadre
	* @return Boolean Réussite (true) ou échec (false) de l'opération
	*/
	this.write = function(blockID) {
		block = document.getElementById(blockID);
		if(block) {
			block.innerHTML = this.toIframe();
		}
	}
	
	/**
	* Génère le code HTML du cadre.
	*
	* @return String Code HTML du cadre
	*/
	this.toIframe = function() {
		code = '';
		
		code += '<iframe src="' + this.src + '" id="' + this.id + '" width="' + this.width + '" height="' + this.height + '"  frameborder="0"></iframe>';
		
		return code;
	}
}

