
	function setupSmiles(promoid)
	{
	
	       $$('.replyform').each(function(el){
                    el.addEvent('submit', function(e) {
                 		e.stop();
                        
                        var replyarea = el.getParent().getParent();
                        replyarea.fade('out');
                        
                        replyarea.set('html', '');
                        replyarea.set('html', '<div id="spinner"><br/><br/><img src="/js_2010/greybox/indicator.gif"> Saving your reply...</div>');

                     		this.set('send', {evalScripts: true, onComplete: function(response) { 
                                replyarea.set('html', response);
                                replyarea.fade('in');
                                //loadComments(promoid,'t');
                     		}});
                          	this.send();
                     	});
                     	
                },this);
            
            
	
        $$('.fadeA').each(function(el){
        	el.addEvent('mouseenter', function() {
        	    //unfade any others that may be stuck
        	    $$('.fadeA').each(function(el2){
    	    	    el2.getFirst().fade(1);
        	    });
        	    $$('.fadeB').each(function(el2){
    	    	    el2.getFirst().fade(1);
        	    });
    	    
        		el.getFirst().fade(0.50);	
        		el.getFirst().setStyle('cursor','pointer'); 
        	});
        	el.addEvent('mouseleave', function() {
        		el.getFirst().fade(1);
        	});
    	
        	el.addEvent('click', function() {
        	    el.getFirst().fade(1);
        	    el.getFirst().setProperty('src','http://www.mupromo.com/newlayout/images/bumpDown_off.png');
    	    
        		var imgid = el.getFirst().id.substring(1,el.getFirst().id.length);
        		var numspan = 't'+ imgid;
        		var myRequest = new Request({method: 'get', url: '/bumpcomment.php', async:false, onComplete: function(response){ 
        		    if (response.length > 0)
        		    {
        		        $(numspan).set('html', response);  
        		    }
        		} 
        		});
    			myRequest.send('z=d&rid='+imgid);
    			el.disabled = 1;
        		el.removeEvents();
        		el.getFirst().fade(1);
        		el.getFirst().setStyle('cursor',null); 
    		
        		//also disbale the other smiley
        		//alert($('B'+imgid).getParent().className);
        		$('B'+imgid).fade(1);
        		$('B'+imgid).disabled = 0;
        		$('B'+imgid).setStyle('cursor',null); 
        		$('B'+imgid).setProperty('src','http://www.mupromo.com/newlayout/images/bumpUp.png');
        		//$('B'+imgid).setStyle('cursor',null); 
        		//$('B'+imgid).getParent().removeEvents();
        		
        		//re-add events
        		
        		
        		$('B'+imgid).addEvents({
        		    'mouseover': function(){
                            
                        },
                        
                        'mouseleave': function(){
                                
                            },
                        'click': function(){
                           
                            	$('A'+imgid).fade(1);
                        		$('A'+imgid).disabled = 1;
                        		$('A'+imgid).setStyle('cursor',null);
                        }
                        
                        
        		    
        		    
        		});
        		
        		
    		
        	});
    	
    	
        },this);
    

        $$('.fadeB').each(function(el){
        	el.addEvent('mouseenter', function() {
        	    //unfade any others that may be stuck
        	    $$('.fadeB').each(function(el2){
    	    	    el2.getFirst().fade(1);
        	    });
        	    $$('.fadeA').each(function(el2){
    	    	    el2.getFirst().fade(1);
        	    });
    	    
        		el.getFirst().fade(0.50);	
        		el.getFirst().setStyle('cursor','pointer'); 
        	});
    	
        	el.addEvent('mouseleave', function() {
        		el.getFirst().fade(1);
        	});
    	
        	el.addEvent('click', function() {
    	    
        	    el.getFirst().fade(1);
        	    el.getFirst().setProperty('src','http://www.mupromo.com/newlayout/images/bumpUp_off.png');
        	    var imgid = el.getFirst().id.substring(1,el.getFirst().id.length);
        		var numspan = 't'+ imgid;
        		var myRequest = new Request({method: 'get', url: '/bumpcomment.php', async:false, onComplete: function(response){ 
        		    if (response.length > 0)
        		    {
        		        $(numspan).set('html', response);  
        		    }
        		} 
        		});
        		myRequest.send('z=u&rid='+imgid);
        		el.disabled = 1;
                el.removeEvents();
        		el.getFirst().fade(1);
        		el.getFirst().setStyle('cursor',null); 
    		
        		//also disbale the other smiley
        		//alert($('B'+imgid).getParent().className);
        		$('A'+imgid).fade(1);
        		$('A'+imgid).disabled = 0;
        		$('A'+imgid).setStyle('cursor',null); 
        		$('A'+imgid).setProperty('src','http://www.mupromo.com/newlayout/images/bumpDown.png');
        		//$('A'+imgid).setStyle('cursor',null); 
        		//$('A'+imgid).getParent().removeEvents();
        		
        		
        		//re-add events
        		
        		
        		$('A'+imgid).addEvents({
        		    'mouseover': function(){
                            
                        },
                        
                        'mouseleave': function(){
                                
                            },
                        'click': function(){
                            $('B'+imgid).fade(1);
                    		$('B'+imgid).disabled = 1;
                    		$('B'+imgid).setStyle('cursor',null);
                        }
                        
                        
        		    
        		    
        		});
    		
    		
        	});

        },this);
		
		
		
    	$$('.reply').each(function(el){
        	el.addEvent('mouseenter', function() {
        		el.getFirst().fade(0.80);	
        		el.getFirst().setStyle('cursor','pointer'); 
        	});
    	
        	el.addEvent('mouseleave', function() {
        		el.getFirst().fade(1);
        	});
    	
        	el.addEvent('click', function() {
    	    
        	    el.getFirst().fade(1);
    	    
        	        //hid others
        	    	$$('.reply').each(function(el){
        	    	    var rid = el.getFirst().id;
                		var formdiv = 'r'+ rid.substring(2,rid.length);
                		$(formdiv).setStyle('display','none');
    	    	    });
    	    
        	    var rid = el.getFirst().id;
        	    //alert(rid.substring(0,rid.length));
        		var formdiv = 'r'+ rid.substring(2,rid.length);
    		
        		var commentarea = 'c'+ rid.substring(2,rid.length);
        	    //alert($(formdiv));
        	    $(formdiv).setStyle('display','block');
        	    $(commentarea).focus();
        	});
    	
    	
        },this);	
    
    
    }
