// ------------------------------------------------------------------------
// Componente fondo 1 | Version 1.0

function iconWebSiteFlash1(index){
	this.index = index
	this.zIndex = rootIWS.ordenZIndex
	rootIWS.ordenZIndex++	
	this.base = rootIWS.componentes[index]
	this.src = this.base.dirFlash + this.base.url
	this.init()
}

iconWebSiteFlash1.prototype.init = iconWebSiteFlashInit
function iconWebSiteFlashInit() {
	createLayer("flash" + this.index + "Div",
				 null,
				 null,
				 null,
				 null,
				 null,
				 null,
				 this.base.colorFondo,
				 "visible",
				 this.zIndex)
	this.flashImagen = new DynLayer("flash" + this.index + "Div")
	this.mainLayer = this.flashImagen
	this.setPosicion()	
}

iconWebSiteFlash1.prototype.ordenarZIndex = iconWebSiteFlash1OrdenarZIndex
function iconWebSiteFlash1OrdenarZIndex() {
	this.mainLayer.css.zIndex = this.zIndex
}

iconWebSiteFlash1.prototype.setPosicion = iconWebSiteFlashSetPosicion
function iconWebSiteFlashSetPosicion() {
		anchoPag = parent.rootIWS.getWindowW()
		altoPag = parent.rootIWS.getWindowH()
		fondoObj = parent.rootIWS.componentes[0].iconComponente
		fondoIndexImagen = fondoObj.indexImagen-1
		if(fondoIndexImagen < 0) fondoIndexImagen = fondoObj.base.img.length - 1
		fondo = fondoObj.base.img[fondoIndexImagen]
		ancho = this.base.ancho
		alto = this.base.alto	
		this.flashImagen.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' ID=movie width='" + ancho + "' height='" + alto + "'>"+
        "<param name=movie value='index.swf?fondo=" + fondo + "'>"+
        "<param name=quality value=high>"+
        "<param name=wmode value=transparent>"+
        "<embed src='index.swf?fondo=" + fondo + "' NAME=movie swLiveConnect=true quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='750' height='450'>"+
        "</embed>"+ 
      "</object>")
	  	this.flashImagen.moveTo( (anchoPag-ancho)/2, (altoPag-alto)/2 )
}

// ------------------------------------------------------------------------
