/**********************************************************
					IMPORTANTE: 
Esta libreria contiene textos dinamizados en variables 
como RedesSocialesSeleccionSitio1,
setear esas variables al incluir esta librerķa.
***********************************************************/
var ventanaSeleccionRedSocial 					= new Object();
var ventanaSeleccionRedSocialColorSelected		= "#FFE1B4";
var ventanaSeleccionRedSocialColorDeselected	= "#FFFFFF";
var ventanaSeleccionRedSocialColorBack			= "#000000";
var IExplorer									= !!(window.attachEvent && !window.opera);

function getStyle(elemento, propiedadCss) {
	var valor = "";
	if(document.defaultView && document.defaultView.getComputedStyle){
		valor = document.defaultView.getComputedStyle(elemento,'').getPropertyValue(propiedadCss);
	}
	else if(elemento.currentStyle) {
		propiedadCss = propiedadCss.replace(/\-(\w)/g, function (strMatch, p1) {
			return p1.toUpperCase();
	});
	valor = elemento.currentStyle[propiedadCss];
	}
	return valor;
}

ventanaSeleccionRedSocial.inicializar = function(){
	this.lista 					= new Array();
	this.altoElementos			= 0; //indica el espacion interpretado en pixeles que ocupan las barras de seleccion de sitio
	this.ventana 				= false; //propiedad que contenra una referencia a un objeto de tipo ventanaModal
	this.seleccionado			= false; //elemento seleccionado de la lista
	this.desplazamiento 		= 50; //distancia entre sitio y sitio en px
	this.mostrarRedireccion 	= true;
	this.colorSitio				= "";
    this.errorLogicaCarro       = false;
};

ventanaSeleccionRedSocial.inicializar.prototype = {
	agregarSitio	:	function ( idSitioRedSocial , urlRedireccion , urlLogo , mensaje ){
		this.lista.push({
			"id"			: idSitioRedSocial,
			"redireccion"	: urlRedireccion,
			"logo"			: urlLogo,
			"mensaje"		: mensaje
		});
		this.altoElementos ++;
	},
	setColorSitio			:	function(color){
		ventanaSeleccionRedSocialColorSelected = color;
	},
	//se le pasa un objeto de tipo ventanaModal
	generarVentanaModal		:	function( verificarIE ){
		if ( verificarIE == false )
			IExplorer = false;
		if ( ! this.ventana )
			this.ventana = new ventanaModal.inicializar(341,246,false,false,false,true,"url(/imagenes/redessociales/FondoVentanaModalLoading.gif)",false,"");
		else{
			this.ventana.clearBody();
			this.ventana.clearTitulo();
            var modalW                          = this.ventana.obtenerNodoVentanaModal();
                modalW.style.width              = "341px";
                modalW.style.height             = "246px";
                modalW.style.backgroundImage    = "url(/imagenes/redessociales/FondoVentanaModalLoading.gif)";
            
            var modalT                          = document.getElementById(this.ventana.obtenerIdNodoTituloEncabezado());
                modalT.innerHTML = "";
            var bodyW = this.ventana.obtenerNodoVentanaModalCuerpo();
                bodyW.style.height = "274px";
		}
		if ( this.ventana ){
			var contenedor = document.getElementById(this.ventana.obtenerIdNodoVentanaModalCuerpo());
			var conter = 0;
			var textIntro	= document.createElement("p");
			textIntro.align = "left";
			textIntro.appendChild(
				document.createTextNode(RedesSocialesSeleccionSitio1)
			);
 
			textIntro.style.fontFamily	= "Verdana, Arial, Helvetica, sans-serif";
			textIntro.style.fontSize 	= "12px";
			textIntro.style.color		= "#000000";
			textIntro.style.position 	= "relative";
			textIntro.style.width		= "85%";
			textIntro.style.left		= "20px";				
			contenedor.appendChild(textIntro);
			
			for ( conter = 0 ; conter < this.lista.length ; conter ++ ){
				var divBoton						= document.createElement("div");
				divBoton.style.position				= "relative";
				divBoton.style.width				= "104px";
				divBoton.style.height				= "46px";
				divBoton.style.marginTop			= "5px";
				divBoton.style.left					= "117px";
				divBoton.style.border				= "3px solid #CCCCCC";
				divBoton.style.cursor				= "pointer";
				divBoton.style.backgroundColor		= "#FFFFFF";
				
				
				var imagenBoton						= document.createElement("img");
				imagenBoton.src						= this.lista[conter].logo;
				imagenBoton.id						= this.lista[conter].id;
				imagenBoton.style.position			= "absolute"
				if ( IExplorer ){
					imagenBoton.style.marginLeft		= "4px";
					imagenBoton.style.marginTop			= "4px";
				}
				else{
					imagenBoton.style.marginLeft		= "7px";
					imagenBoton.style.marginTop			= "7px";
				}
				imagenBoton.style.width				= "90px";
				imagenBoton.style.height			= "32px";
				imagenBoton.style.backgroundColor 	= "#FFFFFF";
                
                /*if ( this.errorLogicaCarro ){
                    imagenBoton.onclick	= function(){
    					vsrs.mostrarMensajeErrorCarro(this.id);
                    }
                }
                else{                
    				imagenBoton.onclick	= function(){
    					vsrs.mostrarMensaje(this.id);
                    }
                }*/
                imagenBoton.onclick	= function(){
    					vsrs.mostrarMensaje(this.id);
                }
				imagenBoton.onmouseover = function(){
					this.parentNode.style.border = "3px solid " + ventanaSeleccionRedSocialColorSelected;
				}
				imagenBoton.onmouseout = function(){
					this.parentNode.style.border = "3px solid #CCCCCC";
				}
				divBoton.appendChild(imagenBoton);
				contenedor.appendChild(divBoton);
				
			}
			var botonCancelar 					= document.createElement("div");
			//botonCancelar.type					= "button";
			botonCancelar.style.position 		= "absolute";
			botonCancelar.style.padding			= "3px";
			botonCancelar.style.paddingLeft		= "6px";
			botonCancelar.style.paddingRight	= "6px";
			botonCancelar.style.fontSize 		= "10px";
			botonCancelar.style.fontFamily		= "Verdana, Arial, Helvetica, sans-serif";
			botonCancelar.style.fontWeight		= "bold";
			botonCancelar.style.color 			= "#666666";
			botonCancelar.style.backgroundColor	= "#EEEEEE";
			botonCancelar.style.borderTop		= "1px solid #CCC";
			botonCancelar.style.borderBottom	= "2px solid #CCC";
			botonCancelar.style.borderLeft		= "1px solid #CCC";
			botonCancelar.style.borderRight		= "2px inset #CCC";
			botonCancelar.style.cursor 			= "pointer";		
			botonCancelar.style.bottom			= "70px";
			botonCancelar.style.left			= "200px";
			//botonCancelar.align					= "right";
			botonCancelar.appendChild(
				document.createTextNode(RedesSocialesSeleccionSitio2)
			);
			//botonCancelar.value 				= "Cancelar";
			//var textoCancelar = document.createTextNode("Cancelar");
			botonCancelar.onclick = function(){
				vsrs.hideModal();
			}

			//botonCancelar.appendChild(textoCancelar);
			contenedor.appendChild(botonCancelar);
			
			
			
		}
	},
	showModal				:	function(){
		if ( this.ventana )
			this.ventana.showModal();
		else
			alert("primero debes generar la ventana");
	},
	hideModal				:	function(){
		if ( this.ventana )
			this.ventana.hideModal();
	},
	mostrarAvisoRedireccion	:	function(){
		if ( this.mostrarRedireccion ){
			alert(this.seleccionado.mensaje);
		}
	},
	redirigir				:	function(){
		window.location = this.seleccionado.redireccion;
	},
	mostrarMensaje			:	function( idSitioRed ){
		this.seleccionado = vsrs.buscarSitioPorId( idSitioRed );
		if ( this.seleccionado ){
			this.ventana.clearBody();
			var idEncabezadoTituloVentana = this.ventana.obtenerIdNodoTituloEncabezado();
			document.getElementById(idEncabezadoTituloVentana).appendChild(
				document.createTextNode(RedesSocialesSeleccionSitio3)
			);
			
			var contenedor = document.getElementById(this.ventana.obtenerIdNodoVentanaModalCuerpo());
			var texto = document.createElement("div");
			texto.style.position 			= "absolute";
			texto.style.width				= "70%";
			texto.style.height 				= "50%";
			texto.style.top					= "10%";
			texto.style.left				= "80px";
			texto.style.overflow			= "auto";
			texto.align						= "left";
			texto.style.fontFamily			= "Verdana, Arial, Helvetica, sans-serif";
			texto.style.fontSize 			= "12px";
			texto.style.color				= "#000000";
						
			texto.appendChild( document.createTextNode(this.seleccionado.mensaje) );
			
			
			var imagenAlerta 			= document.createElement("img");
			imagenAlerta.src			= "/imagenes/redessociales/IconoAdvertencia.gif";
			imagenAlerta.style.position	= "absolute";
			imagenAlerta.style.top		= "45px";
			imagenAlerta.style.left		= "16px";
			
			
			var botonSeguir 					= document.createElement("div");
			//botonSeguir.type					= "button";
			//botonSeguir.className				= "";	
			botonSeguir.style.padding			= "3px";
			botonSeguir.style.paddingLeft		= "6px";
			botonSeguir.style.paddingRight		= "6px";
			botonSeguir.style.fontSize 			= "10px";
			botonSeguir.style.fontFamily		= "Verdana, Arial, Helvetica, sans-serif";
			botonSeguir.style.fontWeight		= "bold";
			botonSeguir.style.color 			= "#666666";
			botonSeguir.style.backgroundColor	= "#EEEEEE";
			botonSeguir.style.width				= "auto";
			botonSeguir.style.borderTop			= "1px solid #CCC";
			botonSeguir.style.borderBottom		= "2px solid #CCC";
			botonSeguir.style.borderLeft		= "1px solid #CCC";
			botonSeguir.style.borderRight		= "2px inset #CCC";
			botonSeguir.style.cursor 			= "pointer";
			botonSeguir.style.position 			= "absolute";
			botonSeguir.style.bottom			= "70px";
			botonSeguir.style.left				= "80px";
			botonSeguir.appendChild(
				document.createTextNode(RedesSocialesSeleccionSitio4)
			);
			//botonSeguir.value					= "Aceptar";
			
            if ( this.errorLogicaCarro ){
                    botonSeguir.onclick	= function(){
    					vsrs.mostrarMensajeErrorCarro(this.id);
                    }
                }
            else{                
                botonSeguir.onclick	= function(){
                    vsrs.redirigir();
                }
            }
			/*botonSeguir.onclick = function(){
				vsrs.redirigir();
			}*/
		
			var botonCancelar					= document.createElement("div");
			//botonCancelar.className				= "";
			//botonCancelar.type					= "button";
			botonCancelar.style.padding			= "3px";
			botonCancelar.style.paddingLeft		= "6px";
			botonCancelar.style.paddingRight	= "6px";
			botonCancelar.style.fontSize 		= "10px";
			botonCancelar.style.fontFamily		= "Verdana, Arial, Helvetica, sans-serif";
			botonCancelar.style.fontWeight		= "bold";
			botonCancelar.style.color 			= "#666666";
			botonCancelar.style.backgroundColor	= "#EEEEEE";
			botonCancelar.style.borderTop		= "1px solid #CCCCCC";
			botonCancelar.style.borderBottom	= "2px solid #CCCCCC";
			botonCancelar.style.borderLeft		= "1px solid #CCCCCC";
			botonCancelar.style.borderRight		= "2px inset #CCCCCC";
			botonCancelar.style.cursor 			= "pointer";
			botonCancelar.style.width			= "auto";
			botonCancelar.style.position 		= "absolute";
			botonCancelar.style.bottom			= "70px";
			botonCancelar.style.left			= "200px";
			//botonCancelar.value					= "Cancelar";
			botonCancelar.appendChild(
				document.createTextNode(RedesSocialesSeleccionSitio5)
			);
			
			botonCancelar.onclick = function(){
				vsrs.ventana.hideModal();
			}
						
			//botonSeguir.appendChild( document.createTextNode("Seguir") );
			contenedor.appendChild(imagenAlerta);
			contenedor.appendChild(texto);
			contenedor.appendChild(botonSeguir);
			contenedor.appendChild(botonCancelar);
		}				
	},
    mostrarMensajeErrorCarro    :   function ( idSitioRed ) {
        //this.seleccionado = vsrs.buscarSitioPorId( idSitioRed );
        this.ventana.clearBody();
        var modalW = this.ventana.obtenerNodoVentanaModal();
            modalW.style.display    = "none";
            modalW.style.width      = "471px";
            modalW.style.height     = "420px";
            modalW.style.backgroundImage = "url(/imagenes/redessociales/FondoVentanaModalErrorCarro.gif)";
            modalW.style.display = "block";
        var modalT                          = document.getElementById(this.ventana.obtenerIdNodoTituloEncabezado());
            modalT.innerHTML                = RedesSocialesSeleccionSitio6;


        
        var imagenAlerta 			= document.createElement("img");
            imagenAlerta.src			= "/imagenes/redessociales/IconoAdvertencia.gif";
            imagenAlerta.style.position	= "absolute";
            imagenAlerta.style.top		= "15px";
            imagenAlerta.style.left		= "25px";
        
        var textoAlerta = document.createElement("div");
			textoAlerta.style.position 			= "absolute";
			textoAlerta.style.width				= "75%";
			textoAlerta.style.height 			= "20px";
			textoAlerta.style.top				= "25px";
			textoAlerta.style.left				= "90px";
			textoAlerta.style.overflow			= "auto";
			textoAlerta.align					= "left";
			textoAlerta.style.fontFamily		= "Verdana, Arial, Helvetica, sans-serif";
			textoAlerta.style.fontSize 			= "12px";
			textoAlerta.style.color				= "#000000";
            
            textoAlerta.appendChild(document.createTextNode(RedesSocialesSeleccionSitio7));
        
        var textoAviso = document.createElement("div");
			textoAviso.style.position 			= "absolute";
			textoAviso.style.width				= "380px";
			//textoAviso.style.height 			= "15px";
            
			textoAviso.style.top				= "70px";
			textoAviso.style.left				= "25px";
			textoAviso.style.overflow			= "auto";
			textoAviso.align					= "left";
			textoAviso.style.fontFamily		    = "Verdana, Arial, Helvetica, sans-serif";
			textoAviso.style.fontSize 			= "12px";
			textoAviso.style.color				= "#000000";
        
            textoAviso.appendChild(document.createTextNode(RedesSocialesSeleccionSitio8));
        
        var textoDesicion = document.createElement("div");
			textoDesicion.style.position 			= "absolute";
			textoDesicion.style.width				= "380px";
			//textoDesicion.style.height 			             = "15px";
			textoDesicion.style.top				    = "130px";
			textoDesicion.style.left				= "25px";
			textoDesicion.style.overflow			= "auto";
			textoDesicion.align					    = "left";
			textoDesicion.style.fontFamily		    = "Verdana, Arial, Helvetica, sans-serif";
			textoDesicion.style.fontSize 			= "12px";
			textoDesicion.style.color				= "#000000";
            
            textoDesicion.appendChild(document.createTextNode(RedesSocialesSeleccionSitio9));
            
        var contenedorSeleccion1                    = document.createElement("div");
            contenedorSeleccion1.style.position 			= "absolute";
			contenedorSeleccion1.style.width				= "373px";
			contenedorSeleccion1.style.height 			    = "30px";
            contenedorSeleccion1.style.border               = "2px solid #9F9F9F";
			contenedorSeleccion1.style.top				    = "160px";
			contenedorSeleccion1.style.left				    = "25px";
			contenedorSeleccion1.style.overflow			    = "hidden";
			contenedorSeleccion1.align					    = "left";
			
			contenedorSeleccion1.style.color				= "#000000";
            contenedorSeleccion1.style.cursor               = "pointer";
            contenedorSeleccion1.style.backgroundColor      = "#FFFFFF";
            //contenedorSeleccion1.style.paddingLeft          = "7px";    
            //contenedorSeleccion1.style.paddingTop           = "10px";
            
            subcontenedorSeleccion1                     = document.createElement("p");
            subcontenedorSeleccion1.style.position      = "relative";
            subcontenedorSeleccion1.style.fontFamily	= "Verdana, Arial, Helvetica, sans-serif";
			subcontenedorSeleccion1.style.fontSize 		= "10px";
            subcontenedorSeleccion1.style.fontWeight    = "bold";
            subcontenedorSeleccion1.style.top           = "7px";
            subcontenedorSeleccion1.style.left          = "5px";    
            subcontenedorSeleccion1.appendChild(document.createTextNode(RedesSocialesSeleccionSitio10));
            
            contenedorSeleccion1.appendChild(subcontenedorSeleccion1);
            contenedorSeleccion1.onmouseover = function(){
                this.style.borderColor = "#FFC978";
            }
            contenedorSeleccion1.onmouseout = function(){
                this.style.borderColor = "#9F9F9F";
            }
            contenedorSeleccion1.onclick = function(){
                window.location        = "/carro/contenido_carrito.asp";
            }
        
        var contenedorSeleccion2                    = document.createElement("div");
            contenedorSeleccion2.style.position 			= "absolute";
			contenedorSeleccion2.style.width				= "373px";
			contenedorSeleccion2.style.height 			    = "30px";
            contenedorSeleccion2.style.border               = "2px solid #9F9F9F";
			contenedorSeleccion2.style.top				    = "205px";
			contenedorSeleccion2.style.left				    = "25px";
			contenedorSeleccion2.style.overflow			    = "hidden";
			contenedorSeleccion2.align					    = "left";
			//contenedorSeleccion2.style.fontFamily		    = "Verdana, Arial, Helvetica, sans-serif";
			//contenedorSeleccion2.style.fontSize 			= "10px";
            //contenedorSeleccion2.style.fontWeight           = "bold";
			contenedorSeleccion2.style.color				= "#000000";
            contenedorSeleccion2.style.cursor               = "pointer";
            contenedorSeleccion2.style.backgroundColor      = "#FFFFFF";
            //contenedorSeleccion2.style.paddingLeft          = "7px";    
            //contenedorSeleccion2.style.paddingTop           = "10px";
            
            
            subcontenedorSeleccion2                     = document.createElement("p");
            subcontenedorSeleccion2.style.position      = "relative";
            subcontenedorSeleccion2.style.fontFamily	= "Verdana, Arial, Helvetica, sans-serif";
			subcontenedorSeleccion2.style.fontSize 		= "10px";
            subcontenedorSeleccion2.style.fontWeight    = "bold";
            subcontenedorSeleccion2.style.top           = "7px";
            subcontenedorSeleccion2.style.left          = "5px";    
            subcontenedorSeleccion2.appendChild(document.createTextNode(RedesSocialesSeleccionSitio11));
            
            contenedorSeleccion2.appendChild(subcontenedorSeleccion2);
            contenedorSeleccion2.onmouseover    = function(){
                this.style.borderColor = "#FFC978";
            }
            contenedorSeleccion2.onmouseout     = function(){
                this.style.borderColor = "#9F9F9F";
            }
            contenedorSeleccion2.onclick        = function(){
                vsrs.redirectClearChart();
            }            
            
        
        var contenedorSeleccion3                    = document.createElement("div");
            contenedorSeleccion3.style.position 			= "absolute";
            contenedorSeleccion3.className                  = "";
			contenedorSeleccion3.style.width				= "373px";
			contenedorSeleccion3.style.height 			    = "30px";
            contenedorSeleccion3.style.border               = "2px solid #9F9F9F";
			contenedorSeleccion3.style.top				    = "250px";
			contenedorSeleccion3.style.left				    = "25px";
			contenedorSeleccion3.style.overflow			    = "hidden";
			contenedorSeleccion3.align					    = "left";
			//contenedorSeleccion3.style.fontFamily		    = "Verdana, Arial, Helvetica, sans-serif";
			//contenedorSeleccion3.style.fontSize 			= "10px";
            //contenedorSeleccion3.style.fontWeight           = "bold";
			contenedorSeleccion3.style.color				= "#000000";
            contenedorSeleccion3.style.cursor               = "pointer";
            contenedorSeleccion3.style.backgroundColor      = "#FFFFFF";
            //contenedorSeleccion3.style.paddingLeft          = "7px";    
            //contenedorSeleccion3.style.paddingTop           = "10px";
            
            subcontenedorSeleccion3                     = document.createElement("p");
            subcontenedorSeleccion3.style.position      = "relative";
            subcontenedorSeleccion3.style.fontFamily	= "Verdana, Arial, Helvetica, sans-serif";
			subcontenedorSeleccion3.style.fontSize 		= "10px";
            subcontenedorSeleccion3.style.fontWeight    = "bold";
            subcontenedorSeleccion3.style.top           = "7px";
            subcontenedorSeleccion3.style.left          = "5px";    
            subcontenedorSeleccion3.appendChild(document.createTextNode(RedesSocialesSeleccionSitio12));
          
            contenedorSeleccion3.appendChild(subcontenedorSeleccion3);
            contenedorSeleccion3.onmouseover = function(){
                this.style.borderColor = "#FFC978";
            }
            contenedorSeleccion3.onmouseout = function(){
                this.style.borderColor = "#9F9F9F";
            }
            contenedorSeleccion3.onclick        = function(){
                vsrs.redirigir();
            }   
            
        
        
        var contenedorSeleccion4                    = document.createElement("div");
            contenedorSeleccion4.style.position 			= "absolute";
			contenedorSeleccion4.style.width				= "373px";
			contenedorSeleccion4.style.height 			    = "30px";
            contenedorSeleccion4.style.border               = "2px solid #9F9F9F";
			contenedorSeleccion4.style.top				    = "295px";
			contenedorSeleccion4.style.left				    = "25px";
			contenedorSeleccion4.style.overflow			    = "hidden";
			contenedorSeleccion4.align					    = "left";
			//contenedorSeleccion4.style.fontFamily		    = "Verdana, Arial, Helvetica, sans-serif";
			//contenedorSeleccion4.style.fontSize 			= "10px";
            //contenedorSeleccion4.style.fontWeight           = "bold";
			contenedorSeleccion4.style.color				= "#000000";
            contenedorSeleccion4.style.cursor               = "pointer";
            contenedorSeleccion4.style.backgroundColor      = "#FFFFFF";
            //contenedorSeleccion4.style.paddingLeft          = "7px";    
            //contenedorSeleccion4.style.paddingTop           = "10px";
            
            subcontenedorSeleccion4                     = document.createElement("p");
            subcontenedorSeleccion4.style.position      = "relative";
            subcontenedorSeleccion4.style.fontFamily	= "Verdana, Arial, Helvetica, sans-serif";
			subcontenedorSeleccion4.style.fontSize 		= "10px";
            subcontenedorSeleccion4.style.fontWeight    = "bold";
            subcontenedorSeleccion4.style.top           = "7px";
            subcontenedorSeleccion4.style.left          = "5px";    
            subcontenedorSeleccion4.appendChild(document.createTextNode(RedesSocialesSeleccionSitio13));
            
            contenedorSeleccion4.appendChild(subcontenedorSeleccion4);
            contenedorSeleccion4.onmouseover = function(){
                this.style.borderColor = "#FFC978";
            }
            contenedorSeleccion4.onmouseout = function(){
                this.style.borderColor = "#9F9F9F";
            }
            contenedorSeleccion4.onclick = function(){
                vsrs.ventana.hideModal();
            }

        
        var bodyW = this.ventana.obtenerNodoVentanaModalCuerpo();
            bodyW.style.height = "400px";
            bodyW.appendChild(imagenAlerta);
            bodyW.appendChild(textoAlerta);
            bodyW.appendChild(textoAviso);
            bodyW.appendChild(textoDesicion);
            bodyW.appendChild(contenedorSeleccion1);
            bodyW.appendChild(contenedorSeleccion2);
            bodyW.appendChild(contenedorSeleccion3);
            bodyW.appendChild(contenedorSeleccion4);

        
    },
    redirectClearChart  :   function(){
        var formX           = document.createElement("form");
            formX.method    = "POST";
            formX.action    = "/Carro/acciones_carro.asp";            
            
        var hiddenRedirect          = document.createElement("input");
            hiddenRedirect.type     = "hidden";
            hiddenRedirect.value    = this.seleccionado.redireccion;
            hiddenRedirect.name     = "pagVolver";
            
        var hiddenAction            = document.createElement("input");
            hiddenAction.type       = "hidden";
            hiddenAction.value      = "VC";
            hiddenAction.name       = "accion";
            
        var hiidenBug               = document.createElement("input");
            hiidenBug.type          = "hidden";
            hiidenBug.value         = "00101110";
            hiidenBug.name          = "fromIntranet";            
        
        formX.appendChild(hiddenRedirect);
        formX.appendChild(hiddenAction);
        formX.appendChild(hiidenBug);
        (document.getElementsByTagName('Body')[0]).appendChild(formX);
        formX.submit();
    },
    setErrorLogicaCarro         :   function( res ){
        this.errorLogicaCarro = res;
    },
	buscarSitioPorId		:	function( id ){
		var conter 	= 0;
		var sitio	= false;
		while ( conter < this.lista.length && sitio == false ){
			if ( this.lista[conter].id == id ){
				sitio = this.lista[conter];
			}			
			conter++;
		}
		return sitio;
	}
};

var vsrs						= new ventanaSeleccionRedSocial.inicializar();

function getInstanciaVentanaSeleccionRedSocial(){
	vsrs = null;
	vsrs = new ventanaSeleccionRedSocial.inicializar();
	return vsrs;
}
