	
	/*********
	AFTER THE LOGIN, THE USER WILL BE REDIRECTED TO THIS PAGE
	**********/
	var loginRedirect;
	var popURL;

	/*********
	IF THE USER TRYED TO ACCESS A PAGE THAT NEEDS TO BE LOGGED IN, WE CALL THE 
	LOGIN PAGE
	**********/
	function showLogin(){
		self.parent.TB_link('http://espanol.cleanandclear.com/enes/js/login.jsp','?keepThis=true&TB_flash=true&height=170&width=340');
	}
	
	function showLoginFlip(){
		self.parent.TB_link('http://espanol.cleanandclear.com/enes/js/login_pixelbook.jsp','?keepThis=true&TB_flash=true&height=170&width=340');
	}
	
	/*********
	IF THE USER TRYED TO ACCESS A PAGE THAT NEEDS TO BE LOGGED IN, THEN HE WILL
	BE FORWARD TO THIS PAGE AFTER DOING LOGGIN
	**********/
	function showPage(name){
	    if(loginRedirect == "none"){
	    	document.location.reload();
	    } else if (loginRedirect == "index") {
	    	document.location.href = "http://espanol.cleanandclear.com/enes/js/index.jsp";
	    } else if (loginRedirect == "soft-song") {
	    	document.location.href = "http://espanol.cleanandclear.com/enes/js/soft/song.jsp";
	    } else if (loginRedirect == "cool-stuff") {
	    	document.location.href = "http://espanol.cleanandclear.com/enes/js/cool-stuff.jsp";
	    } else if (loginRedirect == "bricks_coupons_print") {
	    	document.location.reload();
	    } else if (loginRedirect == "regimen-tks"){
	    	document.getElementById('redirectsaveregimen').innerHTML='true';
	    	TB_link(loginRedirect,'?TB_flash=true&height=120&width=360&productid=<%=request.getParameter("productid")%>');
	    } else if (loginRedirect == "http://espanol.cleanandclear.com/enes/js/buffer_generic2.jsp") {
	    	TB_link(loginRedirect,'?TB_flash=true&height=140&width=395');
	    } else if (loginRedirect == "bricks_coupons") {
	    	document.location.href = "http://espanol.cleanandclear.com/enes/js/cool-stuff.jsp";
	    	//window.open("http://bricks.coupons.com/Bstart.asp?o=9198&c=CC&p=atk5PDEN");
	    } else if (loginRedirect.match("bricks_coupons_product_[0-9]+")) {
	    	document.location.href = "http://espanol.cleanandclear.com/enes/js/productDetail.do?productid=" + loginRedirect.substring("bricks_coupons_product_".length, loginRedirect.length);
	    	window.open(popURL);
	    } else if(loginRedirect == "coupon"){
	    	document.location.href = "http://espanol.cleanandclear.com/enes/js/index.jsp";
	    	window.open("http://bricks.coupons.com/Bstart.asp?o=9616&c=CC&p=rjo4Wucw");
	    } else if (loginRedirect == "1CNCDRML1" || loginRedirect == "1CNCDRML2") {
	    	document.location.href = "http://espanol.cleanandclear.com/enes/js/index.jsp";
	    	window.open("http://bricks.coupons.com/Bstart.asp?o=9954&c=CC&p=C4OeyXFV");
	    } else if (loginRedirect == "pixelbook-register-thanks") {
	    	document.location.href = "http://espanol.cleanandclear.com/enes/js/pixelbook-register-thanks.jsp";
	    } else if (loginRedirect == "http://espanol.cleanandclear.com/enes/js/downloadImage.do?command=listImages&") {
			TB_link(loginRedirect,'?TB_flash=true&height=400&width=635');
	    } else if (loginRedirect == "countdown") {
			TB_link(loginRedirect,'?TB_flash=true&height=400&width=635');
	    } else {
			document.getElementById('ft_user_name').innerHTML = name;
			var ft_register_link = "<a href='" + ssiForm() + "http://espanol.cleanandclear.com/enes/js/register-new.jsp'>Editar mi informaci\363n</a>";
			var ft_link = "<a href='#' title='' class='thickbox' onclick='javascript: doLogout();'>Salir</a>";
			document.getElementById('ft_register_link').innerHTML = ft_register_link ; 
			document.getElementById('ft_link').innerHTML = ft_link ;
			TB_link(loginRedirect,'?TB_iframe=true&height=400&width=360&sms=true');
		} 
	}
