/**
  *	This method is responsible for enoding URL arguments
  *
  *	@author Vytenis Urbonavicius <vytenis.urbonavicius@myhost.lt>
  *	@version 0.0
  *
  * 	@param string url_type may be one of known url types
  *	@param string url address
  *
  *	@return string new arguments
  */
function encodeUrlArguments( url_type, address ) {
	
	if ( url_type == 'STANDART' ) {
		
		return address;
		
	} else if ( url_type == 'FRIENDLY_SINGLEPASS' ) {
		
		var new_address = address.replace(/^([^?]*?\?)?((.*?)(&))?item_id=([0-9]+)(.*)$/,"$1$5$4$3$6").replace( /&|\?|=/g, '/' );
		
		return new_address;
		
	} else {
		
		return address;
		
	}
	
}
