//**********************************************************************
// Parámetros de configuración
//**********************************************************************
if (typeof(sClassIwant)=='undefined') var sClassIwant="IwantText";
if (typeof(sBgClassIwant)=='undefined') var sBgClassIwant="marcoRecursiva";
if (typeof(sSelectedClass)=='undefined') var sSelectedClass="#96826B";
if (typeof(sImgPath)=='undefined') var sImgPath="/img/";
//***********************************************************************
var i_want_layer_to_hide
var nIdSetTimeOut
function i_want(pnNameImg,pnWidthQuiero,pnTimeout,pnFlash){
	
	this.nTimeout=pnTimeout;
	this.nWidth=pnWidthQuiero;
	this.arrElements=new Array();
	this.oLayer=null;
	this.sBgColor=sBgClassIwant;
	this.sTextClass=sClassIwant;
	this.sSelectedClass=sSelectedClass;
	this.urlFlash = pnFlash;
	this.add_link=add_link;
	this.show_i_want=show_i_want;
	this.hide_i_want=hide_i_want;
	this.hide_i_want_timeout=hide_i_want_timeout;
	this.init=init_i_want;
	this.nameImg=pnNameImg;
	this.generate_i_want_HTML=generate_i_want_HTML;
}

function add_link(psDescription,psURL){
	var newElement = new Array();
	newElement["ImgName"]=psDescription;
	newElement["URL"]=psURL;
	this.arrElements[this.arrElements.length]=newElement;
}
function show_i_want(){
	window.clearTimeout(nIdSetTimeOut);
	showLayer(this.oLayer);
}
function hide_i_want(){
	window.clearTimeout(nIdSetTimeOut);
	hideLayer(this.oLayer);
}
function hide_i_want_timeout(){
	window.clearTimeout(nIdSetTimeOut);
	i_want_layer_to_hide=this.oLayer;
	nIdSetTimeOut=window.setTimeout("hideLayer(i_want_layer_to_hide);",this.nTimeout);
}
function init_i_want(sDiv){
	this.oLayer=findObj(sDiv);
}

function over_i_want(i){
	if (obj_i_want[i])
		if (obj_i_want[i].arrElements.length>0) obj_i_want[i].show_i_want();
}
function out_i_want(i){
	if(obj_i_want[i]) 
		obj_i_want[i].hide_i_want();
}

function show_divArea(){
		var oLayer=findObj("divArea");
		if (oLayer) showLayer(oLayer);
}
function generate_i_want_HTML(act){
	if(act){
		var sHTML="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\""+(this.nWidth-3)+"\">";
		sHTML+="<tr><td height=\"10\"><img src=\"images/pixel.gif\" width=\"141\" height=\"10\"></td></tr>";
		for (var i=0;i<this.arrElements.length;i++){
				sHTML+="<tr><td><a href=\""+this.arrElements[i]["URL"]+"\"><img src=\"images/"+this.arrElements[i]["ImgName"]+"off.gif\" border=\"0\" onMouseOver=\"javascript:cambiaImagen(this, '" + this.arrElements[i]["ImgName"] + "', 'on', 'gif');\" onMouseOut=\"javascript:cambiaImagen(this, '" + this.arrElements[i]["ImgName"] + "', 'off', 'gif');\"></a></td></tr>"
		}
		sHTML+="</table>";
		
		writeLayer(this.oLayer, sHTML);
	}
}


