function highlight(obj,action)
 {
    if (action == 1)
    {
	obj.className = 'bg_on';
    }
    else
    {
	obj.className = 'bg_off';
    }
 }
 
function swapClass(o,class1,class2)
{
	if (o.className == 'butt_off')
		{
			o.className = 'butt_on';
		}
		
}

function unswapClass(o,class1,class2)
{
	if (o.className == 'butt_on')
		{
			o.className = 'butt_off';
		}
		
}

function interceptContacts()
{
  	xajax.realCall = xajax.call;
    	xajax.call = function(sFunction, aArgs, sRequestType)
    	{
    		switch (sFunction)
    		{
    			case 'sendContacts':
        			xajax.$('ajaxMessage').style.display='block';
            		xajax.$('contactsForm').style.display='none';
            	break;
            	default:
            	break;
    		}
        	return this.realCall(sFunction, aArgs, sRequestType);
    	}

    	xajax.realProcessResponse = xajax.processResponse;
    	xajax.processResponse = function(xml)
    	{
            xajax.$('ajaxMessage').style.display = 'none';
            xajax.$('contactsForm').style.display='block';
        	return this.realProcessResponse(xml);
    	}
}


function interceptChpass()
{
  	xajax.realCall = xajax.call;
    	xajax.call = function(sFunction, aArgs, sRequestType)
    	{
    		switch (sFunction)
    		{
    			case 'chPass':
        			xajax.$('ajaxMessage').style.display='block';
            		xajax.$('chPassForm').style.display='none';
            	break;
            	default:
            	break;
    		}
        	return this.realCall(sFunction, aArgs, sRequestType);
    	}

    	xajax.realProcessResponse = xajax.processResponse;
    	xajax.processResponse = function(xml)
    	{
            xajax.$('ajaxMessage').style.display = 'none';
            xajax.$('chPassForm').style.display='block';
        	return this.realProcessResponse(xml);
    	}
}

function interceptRegistration()
{
  		xajax.realCall = xajax.call;
    	xajax.call = function(sFunction, aArgs, sRequestType)
    	{    		  
    		switch (sFunction)
    		{
    			case 'registerUser':     			   		
        			xajax.$('ajaxMessage').style.display='block'; 
            		xajax.$('registrationForm').style.display='none';
            	break;
            	default:
            	break;
    		}		
        	return this.realCall(sFunction, aArgs, sRequestType);
    	}    	
    	
    	xajax.realProcessResponse = xajax.processResponse;
    	xajax.processResponse = function(xml)
    	{        
            xajax.$('ajaxMessage').style.display = 'none';
            xajax.$('registrationForm').style.display='block';                    
        	return this.realProcessResponse(xml);
    	}     
}
    	
    	
function intercept()
{
	
        xajax.realCall = xajax.call;
    	xajax.call = function(sFunction, aArgs, sRequestType)
    	{
    		switch (sFunction)
    		{
    			case 'submitAd':
        			xajax.$('placing_ad').style.display='block'; 
            		xajax.$('newAdForm').style.display='none';
            	break;
            	default:
            	break;
    		}		
        		return this.realCall(sFunction, aArgs, sRequestType);
    	}    	
    	
    	xajax.realProcessResponse = xajax.processResponse;
    	xajax.processResponse = function(xml)
    	{           		
            xajax.$('placing_ad').style.display = 'none';
            xajax.$('newAdForm').style.display='block';                    
        	return this.realProcessResponse(xml);
    	}     
}
    	
 function submitSignup()
		{				
			xajax_submitAd(xajax.getFormValues("newad"));
			return false;
		}	
		
function filterSubmit(message,value)
		{		
			if (value == -1) 
			{
					alert(message);  
					return false; 
			}
			else
			{
				return true;	
			}
			
		}	
		

